diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index f985ea4b812..9c27ce3f6f8 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1992,7 +1992,7 @@ def is_negative_with_precision(neg_sle, is_batch=False): return qty_deficit < 0 and abs(qty_deficit) > 0.0001 -def get_future_sle_with_negative_qty(args): +def get_future_sle_with_negative_qty(sle_args): return frappe.db.sql( # nosemgrep """ select @@ -2009,12 +2009,12 @@ def get_future_sle_with_negative_qty(args): order by posting_date asc, posting_time asc limit 1 """, - args, + sle_args, as_dict=1, ) -def get_future_sle_with_negative_batch_qty(args): +def get_future_sle_with_negative_batch_qty(sle_args): return frappe.db.sql( # nosemgrep """ with batch_ledger as ( @@ -2035,7 +2035,7 @@ def get_future_sle_with_negative_batch_qty(args): and posting_datetime >= %(posting_datetime)s limit 1 """, - args, + sle_args, as_dict=1, )