refactor: use CURRENT_DATE instead of CURDATE() (#31356)
* refactor: use CURRENT_DATE instead of CURDATE() * style: reformat to black spec * refactor: use QB for auto_close queries Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -691,7 +691,7 @@ def get_doctype_wise_filters(filters):
|
||||
def get_batch_numbers(doctype, txt, searchfield, start, page_len, filters):
|
||||
query = """select batch_id from `tabBatch`
|
||||
where disabled = 0
|
||||
and (expiry_date >= CURDATE() or expiry_date IS NULL)
|
||||
and (expiry_date >= CURRENT_DATE or expiry_date IS NULL)
|
||||
and name like {txt}""".format(
|
||||
txt=frappe.db.escape("%{0}%".format(txt))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user