mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
[report] filter added base on territory in sales personwise transaction summary
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-04-16 11:31:13",
|
"creation": "2013-04-16 11:31:13",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-04-30 17:54:47",
|
"modified": "2013-05-24 12:02:52",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"creation": "2013-05-03 14:38:34",
|
"creation": "2013-05-23 17:42:24",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-05-07 11:19:40",
|
"modified": "2013-05-24 12:20:17",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"add_total_row": 1,
|
"add_total_row": 1,
|
||||||
|
"disabled": 0,
|
||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
|
|||||||
@@ -50,5 +50,11 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = {
|
|||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Customer",
|
options: "Customer",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname:"territory",
|
||||||
|
label: "Territory",
|
||||||
|
fieldtype: "Link",
|
||||||
|
options: "Territory",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -54,6 +54,7 @@ def get_conditions(filters, date_field):
|
|||||||
conditions = ""
|
conditions = ""
|
||||||
if filters.get("company"): conditions += " and dt.company = '%s'" % filters["company"]
|
if filters.get("company"): conditions += " and dt.company = '%s'" % filters["company"]
|
||||||
if filters.get("customer"): conditions += " and dt.customer = '%s'" % filters["customer"]
|
if filters.get("customer"): conditions += " and dt.customer = '%s'" % filters["customer"]
|
||||||
|
if filters.get("territory"): conditions += " and dt.territory = '%s'" % filters["territory"]
|
||||||
|
|
||||||
if filters.get("from_date"): conditions += " and dt.%s >= '%s'" % \
|
if filters.get("from_date"): conditions += " and dt.%s >= '%s'" % \
|
||||||
(date_field, filters["from_date"])
|
(date_field, filters["from_date"])
|
||||||
|
|||||||
Reference in New Issue
Block a user