mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
[fix] fix planned qty
This commit is contained in:
@@ -6,8 +6,9 @@ import frappe
|
||||
from erpnext.stock.stock_balance import get_planned_qty, update_bin_qty
|
||||
|
||||
def execute():
|
||||
for item_code, warehouse in frappe.db.sql("""select distinct production_item, fg_warehouse
|
||||
for item_code, warehouse in frappe.db.sql("""select distinct production_item, fg_warehouse
|
||||
from `tabProduction Order`"""):
|
||||
update_bin_qty(item_code, warehouse, {
|
||||
"planned_qty": get_planned_qty(item_code, warehouse)
|
||||
})
|
||||
if frappe.db.exists("Item", item_code) and frappe.db.exists("Warehouse", warehouse):
|
||||
update_bin_qty(item_code, warehouse, {
|
||||
"planned_qty": get_planned_qty(item_code, warehouse)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user