Merge pull request #33465 from s-aga-r/fix/po-fg_item_qty
fix: `fg_item_qty` in non-subcontracted PO
This commit is contained in:
commit
882f92e732
@ -207,7 +207,8 @@ class PurchaseOrder(BuyingController):
|
||||
)
|
||||
|
||||
def validate_fg_item_for_subcontracting(self):
|
||||
if self.is_subcontracted and not self.is_old_subcontracting_flow:
|
||||
if self.is_subcontracted:
|
||||
if not self.is_old_subcontracting_flow:
|
||||
for item in self.items:
|
||||
if not item.fg_item:
|
||||
frappe.throw(
|
||||
@ -232,6 +233,10 @@ class PurchaseOrder(BuyingController):
|
||||
item.idx, item.item_code
|
||||
)
|
||||
)
|
||||
else:
|
||||
for item in self.items:
|
||||
item.set("fg_item", None)
|
||||
item.set("fg_item_qty", 0)
|
||||
|
||||
def get_schedule_dates(self):
|
||||
for d in self.get("items"):
|
||||
|
Loading…
x
Reference in New Issue
Block a user