fix: default qty if not found

This commit is contained in:
Ankush Menat 2022-02-03 15:26:57 +05:30 committed by GitHub
parent be09551cfa
commit 9b60e3f187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -449,7 +449,7 @@ class WorkOrder(Document):
def update_ordered_qty(self):
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:
qty += self.qty