mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-34713
This commit is contained in:
@@ -674,7 +674,7 @@ def get_bin_qty(item_code, warehouse):
|
|||||||
|
|
||||||
def get_pos_reserved_qty(item_code, warehouse):
|
def get_pos_reserved_qty(item_code, warehouse):
|
||||||
reserved_qty = frappe.db.sql(
|
reserved_qty = frappe.db.sql(
|
||||||
"""select sum(p_item.qty) as qty
|
"""select sum(p_item.stock_qty) as qty
|
||||||
from `tabPOS Invoice` p, `tabPOS Invoice Item` p_item
|
from `tabPOS Invoice` p, `tabPOS Invoice Item` p_item
|
||||||
where p.name = p_item.parent
|
where p.name = p_item.parent
|
||||||
and ifnull(p.consolidated_invoice, '') = ''
|
and ifnull(p.consolidated_invoice, '') = ''
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ def queue_bom_cost_jobs(
|
|||||||
|
|
||||||
while current_boms_list:
|
while current_boms_list:
|
||||||
batch_no += 1
|
batch_no += 1
|
||||||
batch_size = 20_000
|
batch_size = 7_000
|
||||||
boms_to_process = current_boms_list[:batch_size] # slice out batch of 20k BOMs
|
boms_to_process = current_boms_list[:batch_size] # slice out batch of 20k BOMs
|
||||||
|
|
||||||
# update list to exclude 20K (queued) BOMs
|
# update list to exclude 20K (queued) BOMs
|
||||||
@@ -212,7 +212,7 @@ def resume_bom_cost_update_jobs():
|
|||||||
["name", "boms_updated", "status"],
|
["name", "boms_updated", "status"],
|
||||||
)
|
)
|
||||||
incomplete_level = any(row.get("status") == "Pending" for row in bom_batches)
|
incomplete_level = any(row.get("status") == "Pending" for row in bom_batches)
|
||||||
if not bom_batches or not incomplete_level:
|
if not bom_batches or incomplete_level:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Prep parent BOMs & updated processed BOMs for next level
|
# Prep parent BOMs & updated processed BOMs for next level
|
||||||
@@ -252,9 +252,6 @@ def get_processed_current_boms(
|
|||||||
current_boms = []
|
current_boms = []
|
||||||
|
|
||||||
for row in bom_batches:
|
for row in bom_batches:
|
||||||
if not row.boms_updated:
|
|
||||||
continue
|
|
||||||
|
|
||||||
boms_updated = json.loads(row.boms_updated)
|
boms_updated = json.loads(row.boms_updated)
|
||||||
current_boms.extend(boms_updated)
|
current_boms.extend(boms_updated)
|
||||||
boms_updated_dict = {bom: True for bom in boms_updated}
|
boms_updated_dict = {bom: True for bom in boms_updated}
|
||||||
|
|||||||
Reference in New Issue
Block a user