Merge pull request #16640 from nabinhait/pur_reg_fix

fix: show project even if PI is directly created
This commit is contained in:
Nabin Hait 2019-02-12 13:01:18 +05:30 committed by GitHub
commit ca536efe7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ def get_invoice_po_pr_map(invoice_list):
pi_items = frappe.db.sql(""" pi_items = frappe.db.sql("""
select parent, purchase_order, purchase_receipt, po_detail, project select parent, purchase_order, purchase_receipt, po_detail, project
from `tabPurchase Invoice Item` 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) """ % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
invoice_po_pr_map = {} invoice_po_pr_map = {}