mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-23 13:12:22 +01:00
* fix(pos invoice): search using customer name (cherry picked from commit20fd071c4e) # Conflicts: # erpnext/selling/page/point_of_sale/point_of_sale.py * refactor: use or_filters for customer and customer_name (cherry picked from commit6a401bcfbb) # Conflicts: # erpnext/selling/page/point_of_sale/point_of_sale.py * refactor: refactored for version 15 --------- Co-authored-by: ravibharathi656 <ravibharathi656@gmail.com> Co-authored-by: diptanilsaha <diptanil@frappe.io>
This commit is contained in:
@@ -344,7 +344,11 @@ def get_past_order_list(search_term, status, limit=20):
|
|||||||
if search_term and status:
|
if search_term and status:
|
||||||
invoices_by_customer = frappe.db.get_list(
|
invoices_by_customer = frappe.db.get_list(
|
||||||
"POS Invoice",
|
"POS Invoice",
|
||||||
filters={"customer": ["like", f"%{search_term}%"], "status": status},
|
filters={"status": status},
|
||||||
|
or_filters={
|
||||||
|
"customer_name": ["like", f"%{search_term}%"],
|
||||||
|
"customer": ["like", f"%{search_term}%"],
|
||||||
|
},
|
||||||
fields=fields,
|
fields=fields,
|
||||||
page_length=limit,
|
page_length=limit,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user