Skip to content

Commit

Permalink
fix: multiple entries for same payment term
Browse files Browse the repository at this point in the history
(cherry picked from commit e826093)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed May 20, 2022
1 parent f519dc6 commit 90b1147
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 90b1147

Please sign in to comment.