From f9d89c7ce6a877602d9a94b1b4496dd1a594db21 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 14 Apr 2022 18:34:47 +0530 Subject: [PATCH] fix: SO analysis rpt will fetch SO's without Delivery note as well (cherry picked from commit e28e6726f17954ba292a57e0c90d4b28a143f5e9) # Conflicts: # erpnext/selling/report/sales_order_analysis/sales_order_analysis.py --- .../report/sales_order_analysis/sales_order_analysis.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py index 465bb2d7452f..b284ffc0e054 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py @@ -77,7 +77,15 @@ def get_data(conditions, filters): `tabSales Order` so, `tabSales Order Item` soi LEFT JOIN `tabSales Invoice Item` sii +<<<<<<< HEAD ON sii.so_detail = soi.name and sii.docstatus = 1 +======= + ON sii.so_detail = soi.name and sii.docstatus = 1) + LEFT JOIN `tabDelivery Note Item` dni + on dni.so_detail = soi.name + LEFT JOIN `tabDelivery Note` dn + on dni.parent = dn.name and dn.docstatus = 1 +>>>>>>> e28e6726f1 (fix: SO analysis rpt will fetch SO's without Delivery note as well) WHERE soi.parent = so.name and so.status not in ('Stopped', 'Closed', 'On Hold')