Merge pull request #31076 from frappe/mergify/bp/version-13-hotfix/pr-31004

fix: duplicate entries in payment terms report output (backport #31004)
This commit is contained in:
Deepesh Garg
2022-05-25 17:09:15 +05:30
committed by GitHub

View File

@@ -187,8 +187,9 @@ def get_so_with_invoices(filters):
.on(soi.parent == so.name)
.join(ps)
.on(ps.parent == so.name)
.select(so.name)
.distinct()
.select(
so.name,
so.customer,
so.transaction_date.as_("submitted"),
ifelse(datediff(ps.due_date, functions.CurDate()) < 0, "Overdue", "Unpaid").as_("status"),