mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
Co-authored-by: archielister <archie.lister@lush.co.uk> fix(stock): get_actual_qty during cancellations (#55388)
This commit is contained in:
@@ -264,8 +264,9 @@ def update_qty(bin_name, args):
|
|||||||
# actual qty is already updated by processing current voucher
|
# actual qty is already updated by processing current voucher
|
||||||
actual_qty = bin_details.actual_qty or 0.0
|
actual_qty = bin_details.actual_qty or 0.0
|
||||||
|
|
||||||
# actual qty is not up to date in case of backdated transaction
|
# actual qty is not up to date in case of backdated transactions
|
||||||
if future_sle_exists(args):
|
# or when cancellations are the most recent SLE
|
||||||
|
if future_sle_exists(args) or args.get("is_cancelled"):
|
||||||
actual_qty = get_actual_qty(args.get("item_code"), args.get("warehouse"))
|
actual_qty = get_actual_qty(args.get("item_code"), args.get("warehouse"))
|
||||||
|
|
||||||
ordered_qty = flt(bin_details.ordered_qty) + flt(args.get("ordered_qty"))
|
ordered_qty = flt(bin_details.ordered_qty) + flt(args.get("ordered_qty"))
|
||||||
|
|||||||
Reference in New Issue
Block a user