From ab50211e18bdac06fd5a719b8dcb73e997de0d6f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 11 Feb 2019 18:22:36 +0530 Subject: [PATCH] fix: show project even if PI is directly created --- erpnext/accounts/report/purchase_register/purchase_register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index 5d2409651e..e33b90d019 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -193,7 +193,7 @@ def get_invoice_po_pr_map(invoice_list): pi_items = frappe.db.sql(""" select parent, purchase_order, purchase_receipt, po_detail, project from `tabPurchase Invoice Item` - where parent in (%s) and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '') + where parent in (%s) """ % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) invoice_po_pr_map = {}