fix(plaid): withdrawals and deposits are recorded incorrectly (#25784)
This commit is contained in:
parent
507a211c81
commit
6a62ad325f
@ -183,11 +183,11 @@ def new_bank_transaction(transaction):
|
|||||||
bank_account = frappe.db.get_value("Bank Account", dict(integration_id=transaction["account_id"]))
|
bank_account = frappe.db.get_value("Bank Account", dict(integration_id=transaction["account_id"]))
|
||||||
|
|
||||||
if float(transaction["amount"]) >= 0:
|
if float(transaction["amount"]) >= 0:
|
||||||
debit = float(transaction["amount"])
|
|
||||||
credit = 0
|
|
||||||
else:
|
|
||||||
debit = 0
|
debit = 0
|
||||||
credit = abs(float(transaction["amount"]))
|
credit = float(transaction["amount"])
|
||||||
|
else:
|
||||||
|
debit = abs(float(transaction["amount"]))
|
||||||
|
credit = 0
|
||||||
|
|
||||||
status = "Pending" if transaction["pending"] == "True" else "Settled"
|
status = "Pending" if transaction["pending"] == "True" else "Settled"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user