From f311a0fc1ca80be3bda349175d1cb36f3009bb12 Mon Sep 17 00:00:00 2001 From: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:07:07 +0530 Subject: [PATCH] Fix: add parenttype condition to payment schedule query in accounts receivable report (#46370) fix: add parenttype condition to payment schedule query in accounts receivable report --- .../accounts/report/accounts_receivable/accounts_receivable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index eeff456291a..b082d45c520 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -498,7 +498,7 @@ class ReceivablePayableReport: ps.description, ps.paid_amount, ps.discounted_amount from `tab{row.voucher_type}` si, `tabPayment Schedule` ps where - si.name = ps.parent and + si.name = ps.parent and ps.parenttype = '{row.voucher_type}' and si.name = %s and si.is_return = 0 order by ps.paid_amount desc, due_date