Merge branch 'hotfix'
This commit is contained in:
commit
2d2b12c800
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '8.9.0'
|
__version__ = '8.9.1'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -125,14 +125,15 @@ def get_purchase_receipts_against_purchase_order(item_list):
|
|||||||
po_pr_map = frappe._dict()
|
po_pr_map = frappe._dict()
|
||||||
po_item_rows = list(set([d.po_detail for d in item_list]))
|
po_item_rows = list(set([d.po_detail for d in item_list]))
|
||||||
|
|
||||||
purchase_receipts = frappe.db.sql("""
|
if po_item_rows:
|
||||||
select parent, purchase_order_item
|
purchase_receipts = frappe.db.sql("""
|
||||||
from `tabPurchase Receipt Item`
|
select parent, purchase_order_item
|
||||||
where docstatus=1 and purchase_order_item in (%s)
|
from `tabPurchase Receipt Item`
|
||||||
group by purchase_order_item, parent
|
where docstatus=1 and purchase_order_item in (%s)
|
||||||
""" % (', '.join(['%s']*len(po_item_rows))), tuple(po_item_rows), as_dict=1)
|
group by purchase_order_item, parent
|
||||||
|
""" % (', '.join(['%s']*len(po_item_rows))), tuple(po_item_rows), as_dict=1)
|
||||||
|
|
||||||
for pr in purchase_receipts:
|
for pr in purchase_receipts:
|
||||||
po_pr_map.setdefault(pr.po_detail, []).append(pr.parent)
|
po_pr_map.setdefault(pr.po_detail, []).append(pr.parent)
|
||||||
|
|
||||||
return po_pr_map
|
return po_pr_map
|
@ -127,15 +127,16 @@ def get_delivery_notes_against_sales_order(item_list):
|
|||||||
so_dn_map = frappe._dict()
|
so_dn_map = frappe._dict()
|
||||||
so_item_rows = list(set([d.so_detail for d in item_list]))
|
so_item_rows = list(set([d.so_detail for d in item_list]))
|
||||||
|
|
||||||
delivery_notes = frappe.db.sql("""
|
if so_item_rows:
|
||||||
select parent, so_detail
|
delivery_notes = frappe.db.sql("""
|
||||||
from `tabDelivery Note Item`
|
select parent, so_detail
|
||||||
where docstatus=1 and so_detail in (%s)
|
from `tabDelivery Note Item`
|
||||||
group by so_detail, parent
|
where docstatus=1 and so_detail in (%s)
|
||||||
""" % (', '.join(['%s']*len(so_item_rows))), tuple(so_item_rows), as_dict=1)
|
group by so_detail, parent
|
||||||
|
""" % (', '.join(['%s']*len(so_item_rows))), tuple(so_item_rows), as_dict=1)
|
||||||
|
|
||||||
for dn in delivery_notes:
|
for dn in delivery_notes:
|
||||||
so_dn_map.setdefault(dn.so_detail, []).append(dn.parent)
|
so_dn_map.setdefault(dn.so_detail, []).append(dn.parent)
|
||||||
|
|
||||||
return so_dn_map
|
return so_dn_map
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ def execute(filters=None):
|
|||||||
dict(fieldtype='Data', label='Invoice Type', width=120),
|
dict(fieldtype='Data', label='Invoice Type', width=120),
|
||||||
dict(fieldtype='Data', label='Export Type', width=120),
|
dict(fieldtype='Data', label='Export Type', width=120),
|
||||||
dict(fieldtype='Data', label='E-Commerce GSTIN', width=130),
|
dict(fieldtype='Data', label='E-Commerce GSTIN', width=130),
|
||||||
dict(fieldtype='Data', label='HSN Code', width=120)
|
dict(fieldtype='Data', label='HSN Code', width=120),
|
||||||
|
dict(fieldtype='Data', label='Supplier Invoice No', width=120)
|
||||||
], additional_query_columns=[
|
], additional_query_columns=[
|
||||||
'supplier_gstin',
|
'supplier_gstin',
|
||||||
'company_gstin',
|
'company_gstin',
|
||||||
@ -21,5 +22,6 @@ def execute(filters=None):
|
|||||||
'invoice_type',
|
'invoice_type',
|
||||||
'export_type',
|
'export_type',
|
||||||
'ecommerce_gstin',
|
'ecommerce_gstin',
|
||||||
'gst_hsn_code'
|
'gst_hsn_code',
|
||||||
|
'bill_no'
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user