From 6703b7d1aea159d02c4eae6f45e486b27138e29c Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 15 Oct 2024 18:38:42 +0530 Subject: [PATCH] fix: do not check for payment terms details for return invoices. --- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index f362d10a9548..891d36581b40 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -505,7 +505,8 @@ def get_payment_terms(self, row): from `tab{row.voucher_type}` si, `tabPayment Schedule` ps where si.name = ps.parent and - si.name = %s + si.name = %s and + si.is_return = 0 order by ps.paid_amount desc, due_date """, row.voucher_no,