mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
- Dont try to get valuation rate if row has no item code
- Dont try to add exploded items if row has no item code
(cherry picked from commit 292419bc9e)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
@@ -308,6 +308,9 @@ class BOM(WebsiteGenerator):
|
|||||||
existing_bom_cost = self.total_cost
|
existing_bom_cost = self.total_cost
|
||||||
|
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
|
if not d.item_code:
|
||||||
|
continue
|
||||||
|
|
||||||
rate = self.get_rm_rate({
|
rate = self.get_rm_rate({
|
||||||
"company": self.company,
|
"company": self.company,
|
||||||
"item_code": d.item_code,
|
"item_code": d.item_code,
|
||||||
@@ -600,7 +603,7 @@ class BOM(WebsiteGenerator):
|
|||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if d.bom_no:
|
if d.bom_no:
|
||||||
self.get_child_exploded_items(d.bom_no, d.stock_qty)
|
self.get_child_exploded_items(d.bom_no, d.stock_qty)
|
||||||
else:
|
elif d.item_code:
|
||||||
self.add_to_cur_exploded_items(frappe._dict({
|
self.add_to_cur_exploded_items(frappe._dict({
|
||||||
'item_code' : d.item_code,
|
'item_code' : d.item_code,
|
||||||
'item_name' : d.item_name,
|
'item_name' : d.item_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user