* fix: use get_list to check permissions
(cherry picked from commit a08bc6b913)
# Conflicts:
# erpnext/selling/page/point_of_sale/point_of_sale.py
* fix: resolve conflicts
---------
Co-authored-by: Sanket322 <shahsanket322003.com>
Co-authored-by: ljain112 <ljain112@gmail.com>
This commit is contained in:
@@ -275,12 +275,12 @@ def get_past_order_list(search_term, status, limit=20):
|
||||
invoice_list = []
|
||||
|
||||
if search_term and status:
|
||||
invoices_by_customer = frappe.db.get_all(
|
||||
invoices_by_customer = frappe.db.get_list(
|
||||
"POS Invoice",
|
||||
filters={"customer": ["like", f"%{search_term}%"], "status": status},
|
||||
fields=fields,
|
||||
)
|
||||
invoices_by_name = frappe.db.get_all(
|
||||
invoices_by_name = frappe.db.get_list(
|
||||
"POS Invoice",
|
||||
filters={"name": ["like", f"%{search_term}%"], "status": status},
|
||||
fields=fields,
|
||||
@@ -288,7 +288,7 @@ def get_past_order_list(search_term, status, limit=20):
|
||||
|
||||
invoice_list = invoices_by_customer + invoices_by_name
|
||||
elif status:
|
||||
invoice_list = frappe.db.get_all("POS Invoice", filters={"status": status}, fields=fields)
|
||||
invoice_list = frappe.db.get_list("POS Invoice", filters={"status": status}, fields=fields)
|
||||
|
||||
return invoice_list
|
||||
|
||||
|
||||
Reference in New Issue
Block a user