Merge pull request #27465 from nextchamp-saqib/so-analytics-report-fix

fix: cancelled sales invoices are considered in billed qty calculation
This commit is contained in:
Deepesh Garg 2021-09-14 10:05:36 +05:30 committed by GitHub
commit c7ceb37b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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')