diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 4fcb3cf98a917700d42f6633b03300e8be8b1e02..9131bddc9d6f4447b86677fb699e29daed7139fe 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -997,14 +997,6 @@ def get_item_price(args, item_code, ignore_party=False, force_batch_no=False) -> # Prices without Company only. query = query.where(IfNull(ip.company, "") == "") - if args.get("qty"): - # Prefer where qty is multiple of packing list, if not found then generic price. - query = query.where((IfNull(ip.packing_unit, 0) == 0) | (args.get("qty") % ip.packing_unit == 0)) - query = query.orderby(IfNull(ip.packing_unit, 0), order=frappe.qb.desc) - else: - # Prices without Packing Unit only. - query = query.where(IfNull(ip.packing_unit, 0) == 0) - if not ignore_party: if args.get("customer"): query = query.where(ip.customer == args.get("customer"))