refactor: rename to in SLE query functions

This commit is contained in:
Khushi Rawat
2024-09-02 11:48:41 +05:30
parent 193d7981ea
commit e185a06a15

View File

@@ -1991,7 +1991,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
@@ -2008,12 +2008,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 (
@@ -2034,7 +2034,7 @@ def get_future_sle_with_negative_batch_qty(args):
and posting_datetime >= %(posting_datetime)s
limit 1
""",
args,
sle_args,
as_dict=1,
)