Skip to content

Commit

Permalink
fix: pending_so_items_for_purchase_request_report
Browse files Browse the repository at this point in the history
  • Loading branch information
Gopal8848 committed Oct 1, 2024
1 parent 25b912b commit e912695
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ def get_data():
so.transaction_date,
so.customer,
so.territory,
sum(so_item.qty) as total_qty,
SUM(so_item.qty) AS total_qty,
so.company
FROM `tabSales Order` so, `tabSales Order Item` so_item
FROM
"tabSales Order" so
JOIN "tabSales Order Item" so_item ON so.name = so_item.parent
WHERE
so.docstatus = 1
and so.name = so_item.parent
and so.status not in ('Closed','Completed','Cancelled')
AND so.status NOT IN ('Closed', 'Completed', 'Cancelled')
GROUP BY
so.name,so_item.item_code
so.name, so_item.item_code, so_item.item_name, so_item.description, so.customer, so.territory, so.company, so.transaction_date
""",
as_dict=1,
)
Expand Down

0 comments on commit e912695

Please sign in to comment.