mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Merge pull request #2637 from neilLasrado/batch-patch
patch fix for Batch problem
This commit is contained in:
@@ -92,4 +92,4 @@ execute:frappe.delete_doc("DocType", "Contact Control")
|
|||||||
erpnext.patches.v4_2.recalculate_bom_costs
|
erpnext.patches.v4_2.recalculate_bom_costs
|
||||||
erpnext.patches.v4_2.discount_amount
|
erpnext.patches.v4_2.discount_amount
|
||||||
erpnext.patches.v4_2.update_landed_cost_voucher
|
erpnext.patches.v4_2.update_landed_cost_voucher
|
||||||
erpnext.patches.v4_2.set_item_batch
|
erpnext.patches.v4_2.set_item_has_batch
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ def get_sle_count():
|
|||||||
def get_sle_with_batch():
|
def get_sle_with_batch():
|
||||||
sle_with_batch = {}
|
sle_with_batch = {}
|
||||||
for d in frappe.db.sql("""select item_code, count(name) as cnt from `tabStock Ledger Entry`
|
for d in frappe.db.sql("""select item_code, count(name) as cnt from `tabStock Ledger Entry`
|
||||||
where batch_no != '' group by item_code""", as_dict=1):
|
where ifnull(batch_no, '') != '' group by item_code""", as_dict=1):
|
||||||
sle_with_batch.setdefault(d.item_code, d.cnt)
|
sle_with_batch.setdefault(d.item_code, d.cnt)
|
||||||
|
|
||||||
return sle_with_batch
|
return sle_with_batch
|
||||||
@@ -53,7 +53,7 @@ def get_sle_with_batch():
|
|||||||
def get_sle_with_serial():
|
def get_sle_with_serial():
|
||||||
sle_with_serial = {}
|
sle_with_serial = {}
|
||||||
for d in frappe.db.sql("""select item_code, count(name) as cnt from `tabStock Ledger Entry`
|
for d in frappe.db.sql("""select item_code, count(name) as cnt from `tabStock Ledger Entry`
|
||||||
where serial_no != '' group by item_code""", as_dict=1):
|
where ifnull(serial_no, '') != '' group by item_code""", as_dict=1):
|
||||||
sle_with_serial.setdefault(d.item_code, d.cnt)
|
sle_with_serial.setdefault(d.item_code, d.cnt)
|
||||||
|
|
||||||
return sle_with_serial
|
return sle_with_serial
|
||||||
Reference in New Issue
Block a user