-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
Now to change the existing values... |
Not ready to merge. I'm seeing weird data values in our DB, got to investigate more... => SELECT amount, due, is_funded FROM current_payment_instructions WHERE due > 10 AND amount > 0 AND is_funded;
amount | due | is_funded
--------+--------+-----------
1.00 | 14.00 | t
10.00 | 140.00 | t
5.00 | 70.00 | t
1.00 | 11.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
5.00 | 70.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
2.25 | 31.50 | t
8.00 | 80.00 | t
2.00 | 28.00 | t
1.00 | 14.00 | t
1.00 | 14.00 | t
5.00 | 70.00 | t
1.00 | 14.00 | t
1.00 | 11.00 | t
1.00 | 12.00 | t
0.75 | 10.50 | t
1.00 | 14.00 | t
(24 rows) How do funded payments get to a value greater than the minimum charge??? |
^ cc: @rorepo |
Looks like none of these ~users have CCs attached... Do we not mark |
Aha. These are people who have never attached a CC. The tips were funded because of their gratipay balance. We used to refresh these values after every Payday (before we moved to charging in arrears and never using one's balance to fund tips). I guess running |
@@ -27,7 +27,7 @@ | |||
|
|||
|
|||
with open('sql/payday.sql') as f: | |||
PAYDAY = f.read() | |||
PAYDAY = f.read() % {'minimum_charge': MINIMUM_CHARGE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, I'll see if I can get this done in a cleaner fashion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the approach in 2493792, @rohitpaulk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. A further improvement could be to call it payday_settings
, and create it as a temporary table as part of payday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having it as a permanent table makes sense - If we start to write heavy SQL outside of payday, it could be useful.
Initial punchlist:
I still need to slow down and read this code to understand what we're doing here ... |
I'm not sure what's up with this Travis failure. I'm pretty sure it's present on master, too ... |
Hoping to read and grok this PR tomorrow. |
Build is failing on master: https://travis-ci.org/gratipay/gratipay.com/builds/98361516. Reticketed as #3885. |
I've kicked Travis post-#3891. |
Looks like there is still some breakage ... |
/me kicks Travis again.. |
2493792
to
12057d5
Compare
@whit537 - What's left here? |
Not much ... looks like I pushed some commits that didn't end up on this branch? |
Ohhhhhh |
I might've forced pushed :/ Do you have the branch on your local? If so, please push it to a different branch and I'll merge the two manually |
No worries. My commits are still in GitHub: https://github.com/gratipay/gratipay.com/commits/249379279a931a3ece8d29e2e9ec255665c997ad. |
;-)
|
Alright, brought those back. We'll see if Travis is okay with them. |
bd8d9b9
to
5f75997
Compare
718a193
to
ab4f549
Compare
ab4f549
to
16e42d8
Compare
16e42d8
to
af05120
Compare
Rebased on master again. |
bb3439e
to
ab9df0e
Compare
The commit log on this is pretty confusing - makes it hard to review. I'm going to squash this down to 2-3 meaningful commits. |
I'm seeing three major changes here, the rest is just noise.
|
I'm going to cherry pick 1 into a separate PR - and retain 2 and 3 as part of this PR. |
#3818