mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 07:32:50 +00:00
refactor: DB independent quoting and truthy/falsy values (#31358)
* refactor: DB independent quoting and truthy/falsy values * style: reformat to black spec * fix: ifnull -> coalesce * fix: coalesce -> Coalesce * fix: revert pypika comparison * refactor: convert queries to QB * fix: incorrect value types for query `=` query makes no sense with list of values * fix: remove warehouse docstatus condition * fix: keep using base rate as rate Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -890,7 +890,7 @@ def get_item_price(args, item_code, ignore_party=False):
|
||||
return frappe.db.sql(
|
||||
""" select name, price_list_rate, uom
|
||||
from `tabItem Price` {conditions}
|
||||
order by valid_from desc, batch_no desc, uom desc """.format(
|
||||
order by valid_from desc, ifnull(batch_no, '') desc, uom desc """.format(
|
||||
conditions=conditions
|
||||
),
|
||||
args,
|
||||
|
||||
Reference in New Issue
Block a user