mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-20 03:47:11 +00:00
refactor(subcontracting): drop redundant scio_item_name check
In `update_inward_order_item`, the walrus assignment `scio_item_name :=` is already part of the truthy `if` condition, so the nested `if scio_item_name:` is always true. Remove it and dedent the body.
This commit is contained in:
@@ -645,10 +645,9 @@ class SubcontractingInwardController:
|
|||||||
"Work Order", self.work_order, "subcontracting_inward_order_item"
|
"Work Order", self.work_order, "subcontracting_inward_order_item"
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
if scio_item_name:
|
frappe.get_doc(
|
||||||
frappe.get_doc(
|
"Subcontracting Inward Order Item", scio_item_name
|
||||||
"Subcontracting Inward Order Item", scio_item_name
|
).update_manufacturing_qty_fields()
|
||||||
).update_manufacturing_qty_fields()
|
|
||||||
elif self.purpose in ["Subcontracting Delivery", "Subcontracting Return"]:
|
elif self.purpose in ["Subcontracting Delivery", "Subcontracting Return"]:
|
||||||
fieldname = "delivered_qty" if self.purpose == "Subcontracting Delivery" else "returned_qty"
|
fieldname = "delivered_qty" if self.purpose == "Subcontracting Delivery" else "returned_qty"
|
||||||
qty_map = defaultdict(lambda: defaultdict(float))
|
qty_map = defaultdict(lambda: defaultdict(float))
|
||||||
|
|||||||
Reference in New Issue
Block a user