feat: add customer group filter in sales register (#38365)
feat: add customer group filter in sales register (cherry picked from commit 5a97fa633631a3cb7dd0f4f7305cde293fd80ce2) Co-authored-by: Nandhinidevi123 <nandhini.devi@thirvusoft.in>
This commit is contained in:
parent
c797c533ed
commit
185b715d43
@ -22,6 +22,12 @@ frappe.query_reports["Sales Register"] = {
|
||||
"fieldtype": "Link",
|
||||
"options": "Customer"
|
||||
},
|
||||
{
|
||||
"fieldname":"customer_group",
|
||||
"label": __("Customer Group"),
|
||||
"fieldtype": "Link",
|
||||
"options": "Customer Group"
|
||||
},
|
||||
{
|
||||
"fieldname":"company",
|
||||
"label": __("Company"),
|
||||
|
@ -449,6 +449,9 @@ def get_invoices(filters, additional_query_columns):
|
||||
if filters.get("customer"):
|
||||
query = query.where(si.customer == filters.customer)
|
||||
|
||||
if filters.get("customer_group"):
|
||||
query = query.where(si.customer_group == filters.customer_group)
|
||||
|
||||
query = get_conditions(filters, query, "Sales Invoice")
|
||||
query = apply_common_conditions(
|
||||
filters, query, doctype="Sales Invoice", child_doctype="Sales Invoice Item"
|
||||
|
Loading…
x
Reference in New Issue
Block a user