From fdd167cac123a6f2fea11ccdd73f3b12a65f2f8d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 24 Aug 2022 12:24:55 +0530 Subject: [PATCH] fix: include payment against PO in AR/AP report --- .../report/accounts_receivable/accounts_receivable.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index e937edbeb2..eb2959e197 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -178,6 +178,11 @@ class ReceivablePayableReport(object): key = (ple.against_voucher_type, ple.against_voucher_no, ple.party) row = self.voucher_balance.get(key) + + if not row: + # no invoice, this is an invoice / stand-alone payment / credit note + row = self.voucher_balance.get((ple.voucher_type, ple.voucher_no, ple.party)) + return row def update_voucher_balance(self, ple):