diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 63657b75abb..bd79835d58a 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -162,8 +162,7 @@ def item_details(doctype, txt, searchfield, start, page_len, filters): from erpnext.controllers.queries import get_match_cond return frappe.db.sql("""select name, item_name, description from `tabItem` where name in ( select item_code FROM `tabDelivery Note Item` - where parent= %s - and ifnull(qty, 0) > ifnull(packed_qty, 0)) + where parent= %s) and %s like "%s" %s limit %s, %s """ % ("%s", searchfield, "%s", get_match_cond(doctype), "%s", "%s"),