take care of transaction's net amounts (closes #1694)
The account balance is impacted by the net amount, because Paypal's fee is deducted at source.
This commit is contained in:
parent
4530278c1e
commit
2edc1b0627
1 changed files with 6 additions and 2 deletions
|
|
@ -108,10 +108,14 @@ class NewPartHistoryPage(Page):
|
|||
raw = transaction['displayType']
|
||||
t.parse(date=date, raw=raw)
|
||||
try:
|
||||
amount = transaction['displayAmount']
|
||||
amount = transaction['netAmount']
|
||||
except KeyError:
|
||||
return
|
||||
t.set_amount(amount)
|
||||
if transaction['isCredit']:
|
||||
t.set_amount(credit=amount)
|
||||
else:
|
||||
t.set_amount(debit=amount)
|
||||
t._currency = transaction['currencyCode']
|
||||
|
||||
return t
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue