mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
fix: LCV updates wrong future qty/Bin qty
- As -ve LCV SLE case is returned from `repost_current_voucher`, future qty is not updated - This just doubly shifts all future qty which is then fixed by a repost - Until the repost balance values are wrong - Bin continues to show wrong projected qty even after repost, this is fixed by next SLE that recalculates Bin
This commit is contained in:
@@ -95,9 +95,7 @@ def repost_current_voucher(args, allow_negative_stock=False, via_landed_cost_vou
|
||||
if not args.get("posting_date"):
|
||||
args["posting_date"] = nowdate()
|
||||
|
||||
if args.get("is_cancelled") and via_landed_cost_voucher:
|
||||
return
|
||||
|
||||
if not (args.get("is_cancelled") and via_landed_cost_voucher):
|
||||
# Reposts only current voucher SL Entries
|
||||
# Updates valuation rate, stock value, stock queue for current transaction
|
||||
update_entries_after(
|
||||
@@ -116,6 +114,7 @@ def repost_current_voucher(args, allow_negative_stock=False, via_landed_cost_vou
|
||||
)
|
||||
|
||||
# update qty in future sle and Validate negative qty
|
||||
# For LCV: update future balances with -ve LCV SLE, which will be balanced by +ve LCV SLE
|
||||
update_qty_in_future_sle(args, allow_negative_stock)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user