mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
@@ -553,7 +553,7 @@ class StockEntry(StockController):
|
||||
from erpnext.manufacturing.doctype.bom.bom import get_bom_items_as_dict
|
||||
|
||||
# item dict = { item_code: {qty, description, stock_uom} }
|
||||
item_dict = get_bom_items_as_dict(self.bom_no, qty=qty, fetch_exploded = self.use_multi_level_bom)
|
||||
item_dict = get_bom_items_as_dict(self.bom_no, self.company, qty=qty, fetch_exploded = self.use_multi_level_bom)
|
||||
|
||||
for item in item_dict.values():
|
||||
item.from_warehouse = self.from_warehouse or item.default_warehouse
|
||||
|
||||
@@ -163,16 +163,17 @@ class StockReconciliation(StockController):
|
||||
})
|
||||
if previous_sle:
|
||||
if row.qty in ("", None):
|
||||
row.qty = previous_sle.get("qty_after_transaction")
|
||||
row.qty = previous_sle.get("qty_after_transaction", 0)
|
||||
|
||||
if row.valuation_rate in ("", None):
|
||||
row.valuation_rate = previous_sle.get("valuation_rate")
|
||||
row.valuation_rate = previous_sle.get("valuation_rate", 0)
|
||||
|
||||
if row.qty and not row.valuation_rate:
|
||||
frappe.throw(_("Valuation Rate required for Item {0}").format(row.item_code))
|
||||
|
||||
if previous_sle and row.qty == previous_sle.get("qty_after_transaction") \
|
||||
and row.valuation_rate == previous_sle.get("valuation_rate"):
|
||||
if ((previous_sle and row.qty == previous_sle.get("qty_after_transaction")
|
||||
and row.valuation_rate == previous_sle.get("valuation_rate"))
|
||||
or (not previous_sle and not row.qty)):
|
||||
continue
|
||||
|
||||
self.insert_entries(row)
|
||||
|
||||
Reference in New Issue
Block a user