mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
refactor(treewide): formatting and ruff fixes, + manually enabled F401
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
@@ -93,7 +93,7 @@ def get_all_items(date_range, company, field, limit=None):
|
||||
select_field = "sum(actual_qty)" if field == "available_stock_qty" else "sum(stock_value)"
|
||||
results = frappe.db.get_all(
|
||||
"Bin",
|
||||
fields=["item_code as name", "{0} as value".format(select_field)],
|
||||
fields=["item_code as name", f"{select_field} as value"],
|
||||
group_by="item_code",
|
||||
order_by="value desc",
|
||||
limit=limit,
|
||||
@@ -224,9 +224,7 @@ def get_date_condition(date_range, field):
|
||||
if date_range:
|
||||
date_range = frappe.parse_json(date_range)
|
||||
from_date, to_date = date_range
|
||||
date_condition = "and {0} between {1} and {2}".format(
|
||||
field, frappe.db.escape(from_date), frappe.db.escape(to_date)
|
||||
)
|
||||
date_condition = f"and {field} between {frappe.db.escape(from_date)} and {frappe.db.escape(to_date)}"
|
||||
return date_condition
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user