mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
perf: query one item price only
This commit is contained in:
@@ -911,6 +911,7 @@ def get_item_price(args, item_code, ignore_party=False):
|
|||||||
.orderby(ip.valid_from, order=frappe.qb.desc)
|
.orderby(ip.valid_from, order=frappe.qb.desc)
|
||||||
.orderby(IfNull(ip.batch_no, ""), order=frappe.qb.desc)
|
.orderby(IfNull(ip.batch_no, ""), order=frappe.qb.desc)
|
||||||
.orderby(ip.uom, order=frappe.qb.desc)
|
.orderby(ip.uom, order=frappe.qb.desc)
|
||||||
|
.limit(1)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not ignore_party:
|
if not ignore_party:
|
||||||
|
|||||||
Reference in New Issue
Block a user