From 550fc695f1ce0a52b8d67066e2d1a48f56a378ca Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 19 Sep 2018 19:03:40 +0530 Subject: [PATCH] [Fix] Precision issue in the accounts receivable report (#15440) --- .../report/accounts_receivable/accounts_receivable.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 186d86a97f..98a6d43c76 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -253,14 +253,16 @@ class ReceivablePayableReport(object): for e in self.get_gl_entries_for(gle.party, gle.party_type, gle.voucher_type, gle.voucher_no): if getdate(e.posting_date) <= report_date and e.name!=gle.name: - amount = flt(e.get(reverse_dr_or_cr)) - flt(e.get(dr_or_cr)) + amount = flt(e.get(reverse_dr_or_cr), currency_precision) - flt(e.get(dr_or_cr), currency_precision) if e.voucher_no not in return_entries: payment_amount += amount else: credit_note_amount += amount - outstanding_amount = flt((flt(gle.get(dr_or_cr)) - flt(gle.get(reverse_dr_or_cr)) \ - - payment_amount - credit_note_amount), currency_precision) + outstanding_amount = (flt((flt(gle.get(dr_or_cr), currency_precision) + - flt(gle.get(reverse_dr_or_cr), currency_precision) + - payment_amount - credit_note_amount), currency_precision)) + credit_note_amount = flt(credit_note_amount, currency_precision) return outstanding_amount, credit_note_amount