refactor: rename to in SLE query functions

This commit is contained in:
Khushi Rawat
2024-09-02 11:48:41 +05:30
parent 272f42eaf2
commit a84a5b43e2

View File

@@ -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,
)