fix: stock ledger entry created against draft stock entry (#25539)
This commit is contained in:
parent
1fd1e2bb60
commit
2e38f1514f
@ -416,7 +416,7 @@ class update_entries_after(object):
|
||||
frappe.db.set_value("Stock Entry Detail", sle.voucher_detail_no, "basic_rate", outgoing_rate)
|
||||
|
||||
# Update outgoing item's rate, recalculate FG Item's rate and total incoming/outgoing amount
|
||||
stock_entry = frappe.get_doc("Stock Entry", sle.voucher_no)
|
||||
stock_entry = frappe.get_doc("Stock Entry", sle.voucher_no, for_update=True)
|
||||
stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False)
|
||||
stock_entry.db_update()
|
||||
for d in stock_entry.items:
|
||||
|
@ -172,7 +172,7 @@ def get_bin(item_code, warehouse):
|
||||
bin_obj.flags.ignore_permissions = 1
|
||||
bin_obj.insert()
|
||||
else:
|
||||
bin_obj = frappe.get_cached_doc('Bin', bin)
|
||||
bin_obj = frappe.get_doc('Bin', bin, for_update=True)
|
||||
bin_obj.flags.ignore_permissions = True
|
||||
return bin_obj
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user