mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 14:55:13 +00:00
fix(stock): update bin to zero when no previous sle exists (#54236)
This commit is contained in:
committed by
GitHub
parent
488747eb5d
commit
2f025272d7
@@ -556,6 +556,16 @@ class update_entries_after:
|
||||
previous_sle = get_previous_sle_of_current_voucher(args)
|
||||
if previous_sle:
|
||||
self.prev_sle_dict[(args.get("item_code"), args.get("warehouse"))] = previous_sle
|
||||
else:
|
||||
self.prev_sle_dict[(args.get("item_code"), args.get("warehouse"))] = frappe._dict(
|
||||
{
|
||||
"qty_after_transaction": 0.0,
|
||||
"valuation_rate": 0.0,
|
||||
"stock_value": 0.0,
|
||||
"prev_stock_value": 0.0,
|
||||
"stock_queue": [],
|
||||
}
|
||||
)
|
||||
|
||||
warehouse_dict.previous_sle = previous_sle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user