Customer/Supplier Name in sales/purchase analytics (#8717)
This commit is contained in:
parent
6e7407962f
commit
7228e1af6e
@ -35,11 +35,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
item_key: "supplier",
|
item_key: "supplier",
|
||||||
parent_field: "parent_supplier_type",
|
parent_field: "parent_supplier_type",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
// return repl('<a href="#Report/stock-invoices/customer=%(enc_value)s">%(value)s</a>', {
|
return item.supplier_name ? item.supplier_name + " (" + item.name + ")" : item.name;
|
||||||
// value: item.name,
|
|
||||||
// enc_value: encodeURIComponent(item.name)
|
|
||||||
// });
|
|
||||||
return item.name;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Supplier": {
|
"Supplier": {
|
||||||
@ -47,7 +43,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
show: false,
|
show: false,
|
||||||
item_key: "supplier",
|
item_key: "supplier",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
return item.name;
|
return item.supplier_name ? item.supplier_name + " (" + item.name + ")" : item.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item Group": {
|
"Item Group": {
|
||||||
|
@ -34,14 +34,16 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
show: true,
|
show: true,
|
||||||
item_key: "customer",
|
item_key: "customer",
|
||||||
parent_field: "parent_customer_group",
|
parent_field: "parent_customer_group",
|
||||||
formatter: function(item) { return item.customer_name || item.name; }
|
formatter: function(item) {
|
||||||
|
return item.customer_name? item.customer_name + " (" + item.name + ")" : item.name;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Customer": {
|
"Customer": {
|
||||||
label: __("Customer"),
|
label: __("Customer"),
|
||||||
show: false,
|
show: false,
|
||||||
item_key: "customer",
|
item_key: "customer",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
return item.customer_name || item.name;
|
return item.customer_name? item.customer_name + " (" + item.name + ")" : item.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item Group": {
|
"Item Group": {
|
||||||
@ -67,7 +69,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
item_key: "customer",
|
item_key: "customer",
|
||||||
parent_field: "parent_territory",
|
parent_field: "parent_territory",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
return item.name;
|
return item.customer_name? item.customer_name + " (" + item.name + ")" : item.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user