fix: incorrect qty after transaction in SLE (backport #43103) (#43104)

fix: incorrect qty after transaction in SLE (#43103)

(cherry picked from commit 5ff87edc85)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-09-07 17:34:22 +05:30
committed by GitHub
parent 4bd7ce3e0b
commit 77892f4e24

View File

@@ -1237,7 +1237,7 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc
voucher_no = args.get("voucher_no")
voucher_condition = f"and voucher_no != '{voucher_no}'"
elif args.get("creation"):
elif args.get("creation") and args.get("sle_id"):
creation = args.get("creation")
operator = "<="
voucher_condition = f"and creation < '{creation}'"