Skip to content

Commit

Permalink
fix: Purchase Order Analysis Report Data (#42387)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Jul 18, 2024
1 parent 79a46ad commit 67bf9be
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def get_data(filters):
frappe.qb.from_(po)
.from_(po_item)
.left_join(pi_item)
.on(pi_item.po_detail == po_item.name)
.on(pi_item.po_detail == po_item.name & pi_item.docstatus == 1)
.left_join(pi)
.on(pi.name == pi_item.parent)
.on(pi.name == pi_item.parent & pi.docstatus == 1)
.select(
po.transaction_date.as_("date"),
po_item.schedule_date.as_("required_date"),
Expand All @@ -72,7 +72,6 @@ def get_data(filters):
po_item.name,
)
.where((po_item.parent == po.name) & (po.status.notin(("Stopped", "Closed"))) & (po.docstatus == 1))
.where(pi.docstatus == 1)
.groupby(po_item.name)
.orderby(po.transaction_date)
)
Expand Down

0 comments on commit 67bf9be

Please sign in to comment.