Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3629 from gratipay/eliminate-balance-holds
Browse files Browse the repository at this point in the history
Stop holding balance to cover next week's payments
  • Loading branch information
chadwhitacre committed Jul 22, 2015
2 parents ad73c1a + 3618777 commit 17c0318
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions bin/masspay.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,20 @@ def compute_input_csv():
routes = get_ready_payout_routes_by_network(db, 'paypal')
writer = csv.writer(open(INPUT_CSV, 'w+'))
print_rule(88)
headers = "username", "email", "fee cap", "balance", "tips", "amount"
print("{:<24}{:<32} {:^7} {:^7} {:^7} {:^7}".format(*headers))
headers = "username", "email", "fee cap", "amount"
print("{:<24}{:<32} {:^7} {:^7}".format(*headers))
print_rule(88)
total_gross = 0
for route in routes:
total = route.participant.giving
amount = route.participant.balance - total
amount = route.participant.balance
if amount < 0.50:
# Minimum payout of 50 cents. I think that otherwise PayPal upcharges to a penny.
# See https://github.com/gratipay/gratipay.com/issues/1958.
continue
total_gross += amount
print("{:<24}{:<32} {:>7} {:>7} {:>7} {:>7}".format( route.participant.username
print("{:<24}{:<32} {:>7} {:>7}".format( route.participant.username
, route.address
, route.fee_cap
, route.participant.balance
, total
, amount
))
row = (route.participant.username, route.address, route.fee_cap, amount)
Expand Down
2 changes: 1 addition & 1 deletion tests/py/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_participant_can_view_history(self):

def test_admin_can_view_closed_participant_history(self):
self.make_exchange('braintree-cc', -30, 0, self.alice)
self.alice.close(None)
self.alice.close()

self.make_participant('bob', claimed_time='now', is_admin=True)
response = self.client.GET('/~alice/history/?year=%s' % self.past_year, auth_as='bob')
Expand Down

0 comments on commit 17c0318

Please sign in to comment.