Merge pull request #17048 from rohitwaghchaure/fixed_bank_reconciliation_not_working

fix: bank reconciliation not working
This commit is contained in:
rohitwaghchaure 2019-03-29 09:27:50 +05:30 committed by GitHub
commit c268682772
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ class BankReconciliation(Document):
for d in entries:
row = self.append('payment_entries', {})
amount = d.get('debit', 0) - d.get('credit', 0)
amount = flt(d.get('debit', 0)) - flt(d.get('credit', 0))
formatted_amount = fmt_money(abs(amount), 2, d.account_currency)
d.amount = formatted_amount + " " + (_("Dr") if amount > 0 else _("Cr"))