mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
fix: add default if qty is not found
This commit is contained in:
@@ -449,7 +449,7 @@ class WorkOrder(Document):
|
|||||||
|
|
||||||
def update_ordered_qty(self):
|
def update_ordered_qty(self):
|
||||||
if self.production_plan and self.production_plan_item:
|
if self.production_plan and self.production_plan_item:
|
||||||
qty = frappe.get_value("Production Plan Item", self.production_plan_item, "ordered_qty")
|
qty = frappe.get_value("Production Plan Item", self.production_plan_item, "ordered_qty") or 0.0
|
||||||
|
|
||||||
if self.docstatus == 1:
|
if self.docstatus == 1:
|
||||||
qty += self.qty
|
qty += self.qty
|
||||||
|
|||||||
Reference in New Issue
Block a user