fix: cancelled sales invoices are considered in billed quantity calculation

This commit is contained in:
Saqib Ansari 2021-09-13 16:50:11 +05:30
parent 7292f5476d
commit 44139fbac5

View File

@ -73,7 +73,7 @@ def get_data(conditions, filters):
`tabSales Order` so,
`tabSales Order Item` soi
LEFT JOIN `tabSales Invoice Item` sii
ON sii.so_detail = soi.name
ON sii.so_detail = soi.name and sii.docstatus = 1
WHERE
soi.parent = so.name
and so.status not in ('Stopped', 'Closed', 'On Hold')