Fixed reserved qty for production logic and patch for reposting (#11691)
This commit is contained in:
parent
a90274fed9
commit
cda4d50063
@ -461,3 +461,4 @@ execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
|
||||
erpnext.patches.v9_0.update_employee_loan_details
|
||||
erpnext.patches.v9_2.delete_healthcare_domain_default_items
|
||||
erpnext.patches.v9_2.rename_translated_domains_in_en
|
||||
erpnext.patches.v9_2.repost_reserved_qty_for_production
|
@ -0,0 +1,7 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
bins = frappe.db.sql("select name from `tabBin` where reserved_qty_for_production > 0")
|
||||
for d in bins:
|
||||
bin_doc = frappe.get_doc("Bin", d[0])
|
||||
bin_doc.update_reserved_qty_for_production()
|
@ -88,11 +88,10 @@ class Bin(Document):
|
||||
and item.source_warehouse = %s
|
||||
and pro.status not in ("Stopped", "Completed")''', (self.item_code, self.warehouse))[0][0]
|
||||
|
||||
if self.reserved_qty_for_production:
|
||||
self.set_projected_qty()
|
||||
self.set_projected_qty()
|
||||
|
||||
self.db_set('reserved_qty_for_production', self.reserved_qty_for_production)
|
||||
self.db_set('projected_qty', self.projected_qty)
|
||||
self.db_set('reserved_qty_for_production', flt(self.reserved_qty_for_production))
|
||||
self.db_set('projected_qty', self.projected_qty)
|
||||
|
||||
|
||||
def update_item_projected_qty(item_code):
|
||||
|
Loading…
Reference in New Issue
Block a user