Merge pull request #40577 from barredterra/one-item-price

perf: query one item price only
This commit is contained in:
Deepesh Garg
2024-03-25 17:22:49 +05:30
committed by GitHub

View File

@@ -913,6 +913,7 @@ def get_item_price(args, item_code, ignore_party=False) -> list[dict]:
.orderby(ip.valid_from, order=frappe.qb.desc)
.orderby(IfNull(ip.batch_no, ""), order=frappe.qb.desc)
.orderby(ip.uom, order=frappe.qb.desc)
.limit(1)
)
if not ignore_party: