fix: set raw material's batch based on main item's batch only if RM has batch no (#18977)
This commit is contained in:
parent
0254217314
commit
88e8688a4b
@ -337,7 +337,7 @@ class BuyingController(StockController):
|
||||
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]:
|
||||
rm.consumed_qty = required_qty
|
||||
rm.description = bom_item.description
|
||||
if item.batch_no and not rm.batch_no:
|
||||
if item.batch_no and frappe.db.get_value("Item", rm.rm_item_code, "has_batch_no") and not rm.batch_no:
|
||||
rm.batch_no = item.batch_no
|
||||
|
||||
# get raw materials rate
|
||||
|
Loading…
x
Reference in New Issue
Block a user