From 530453e4fc1e51e98fc751be17f887075a41b27e Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Wed, 19 Dec 2018 18:12:58 +0530 Subject: [PATCH] Added temp variables for outstanding, credit_note_amt instead of function calling --- .../report/accounts_receivable/accounts_receivable.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 1fd82d9a56..161f845e4f 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -188,6 +188,10 @@ class ReceivablePayableReport(object): if self.is_receivable_or_payable(gle, self.dr_or_cr, future_vouchers): outstanding_amount, credit_note_amount, payment_amount = self.get_outstanding_amount( gle,self.filters.report_date, self.dr_or_cr, return_entries) + + temp_outstanding_amt = outstanding_amount + temp_credit_note_amt = credit_note_amount + if abs(outstanding_amount) > 0.1/10**self.currency_precision: if self.filters.based_on_payment_terms and self.payment_term_map.get(gle.voucher_no): for d in self.payment_term_map.get(gle.voucher_no): @@ -212,11 +216,8 @@ class ReceivablePayableReport(object): data.append(row) if credit_note_amount: - outstanding_amount, credit_note_amount, payment_amount = self.get_outstanding_amount( - gle,self.filters.report_date, self.dr_or_cr, return_entries) - - row = self.prepare_row_without_payment_terms(party_naming_by, args, gle, outstanding_amount, - credit_note_amount) + row = self.prepare_row_without_payment_terms(party_naming_by, args, gle, temp_outstanding_amt, + temp_credit_note_amt) data.append(row) else: