Skip to content

Commit 32335da

Browse files
fix: add parenttype condition to payment schedule query in accounts receivable report (backport #46370) (#46499)
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 (cherry picked from commit f311a0f) Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com>
1 parent c47cc05 commit 32335da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

erpnext/accounts/report/accounts_receivable/accounts_receivable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ def get_payment_terms(self, row):
520520
ps.description, ps.paid_amount, ps.discounted_amount
521521
from `tab{row.voucher_type}` si, `tabPayment Schedule` ps
522522
where
523-
si.name = ps.parent and
523+
si.name = ps.parent and ps.parenttype = '{row.voucher_type}' and
524524
si.name = %s and
525525
si.is_return = 0
526526
order by ps.paid_amount desc, due_date

0 commit comments

Comments
 (0)