mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
fix: set raw material's batch based on main item's batch only if RM has batch no (#18977)
This commit is contained in:
@@ -337,7 +337,7 @@ class BuyingController(StockController):
|
|||||||
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]:
|
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]:
|
||||||
rm.consumed_qty = required_qty
|
rm.consumed_qty = required_qty
|
||||||
rm.description = bom_item.description
|
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
|
rm.batch_no = item.batch_no
|
||||||
|
|
||||||
# get raw materials rate
|
# get raw materials rate
|
||||||
|
|||||||
Reference in New Issue
Block a user