Remove unnecessary columns Analytics Reports (#13344)
This commit is contained in:
parent
4fc74333bd
commit
34dd079a68
@ -67,10 +67,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
||||
this.tree_grid = this.tree_grids[this.tree_type];
|
||||
|
||||
var std_columns = [
|
||||
{id: "_check", name: __("Plot"), field: "_check", width: 30,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300},
|
||||
{id: "total", name: "Total", field: "total", plot: false,
|
||||
formatter: this.currency_formatter}
|
||||
];
|
||||
@ -103,8 +100,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
||||
|
||||
this.trigger_refresh_on_change(["value_or_qty", "tree_type", "based_on", "company"]);
|
||||
|
||||
this.show_zero_check()
|
||||
this.setup_chart_check();
|
||||
this.show_zero_check();
|
||||
},
|
||||
init_filter_values: function() {
|
||||
this._super();
|
||||
|
@ -42,10 +42,7 @@ erpnext.AppointmentAnalytics = frappe.views.TreeGridReport.extend({
|
||||
this.tree_grid = this.tree_grids[this.tree_type];
|
||||
|
||||
var std_columns = [
|
||||
{id: "_check", name: __("Plot"), field: "_check", width: 40,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300},
|
||||
{id: "total", name: "Total", field: "total", plot: false,
|
||||
formatter: this.currency_formatter}
|
||||
];
|
||||
@ -87,7 +84,6 @@ erpnext.AppointmentAnalytics = frappe.views.TreeGridReport.extend({
|
||||
this.trigger_refresh_on_change(["tree_type", "physician", "department", "status", "type"]);
|
||||
|
||||
// this.show_zero_check()
|
||||
this.setup_chart_check();
|
||||
},
|
||||
init_filter_values: function() {
|
||||
this._super();
|
||||
|
@ -26,9 +26,7 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
setup_columns: function() {
|
||||
|
||||
var std_columns = [
|
||||
{id: "_check", name: __("Plot"), field: "_check", width: 30,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: __("Status"), field: "name", width: 100},
|
||||
{id: "name", name: __("Status"), field: "name", width: 100}
|
||||
];
|
||||
|
||||
this.make_date_range_columns();
|
||||
@ -51,8 +49,7 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
this.trigger_refresh_on_change(["company"]);
|
||||
this.trigger_refresh_on_change(["range"]);
|
||||
|
||||
this.show_zero_check()
|
||||
this.setup_chart_check();
|
||||
this.show_zero_check();
|
||||
|
||||
},
|
||||
init_filter_values: function() {
|
||||
@ -64,7 +61,9 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
|
||||
var chart_data = this.get_chart_data ? this.get_chart_data() : null;
|
||||
|
||||
this.chart = new Chart(".chart", {
|
||||
const parent = this.wrapper.find('.chart')[0];
|
||||
this.chart = new Chart(parent, {
|
||||
height: 200,
|
||||
data: chart_data,
|
||||
type: 'line'
|
||||
});
|
||||
|
@ -36,8 +36,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
|
||||
},
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "name", name: __("Account"), field: "name", width: 300, cssClass: "cell-title",
|
||||
formatter: this.tree_formatter},
|
||||
{id: "name", name: __("Account"), field: "name", width: 300, cssClass: "cell-title"},
|
||||
{id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr", width: 100,
|
||||
|
@ -34,10 +34,7 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||
},
|
||||
setup_columns: function() {
|
||||
var std_columns = [
|
||||
{id: "_check", name: __("Plot"), field: "_check", width: 30,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: __("Item"), field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{id: "name", name: __("Item"), field: "name", width: 300},
|
||||
{id: "brand", name: __("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "opening", name: __("Opening"), field: "opening", hidden: true,
|
||||
@ -77,7 +74,6 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||
this.trigger_refresh_on_change(["value_or_qty", "brand", "warehouse", "range"]);
|
||||
|
||||
this.show_zero_check();
|
||||
this.setup_chart_check();
|
||||
},
|
||||
init_filter_values: function() {
|
||||
this._super();
|
||||
|
@ -34,7 +34,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
||||
item_key: "customer",
|
||||
parent_field: "parent_customer_group",
|
||||
formatter: function(item) {
|
||||
return item.customer_name? item.customer_name + " (" + item.name + ")" : item.name;
|
||||
return item.customer_name? item.customer_name + " (" + item.name + ")" : item.name;
|
||||
}
|
||||
},
|
||||
"Customer": {
|
||||
@ -77,10 +77,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
||||
this.tree_grid = this.tree_grids[this.tree_type];
|
||||
|
||||
var std_columns = [
|
||||
{id: "check", name: "Plot", field: "check", width: 30,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300},
|
||||
{id: "total", name: "Total", field: "total", plot: false,
|
||||
formatter: this.currency_formatter}
|
||||
];
|
||||
@ -114,8 +111,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
||||
|
||||
this.trigger_refresh_on_change(["value_or_qty", "tree_type", "based_on", "company"]);
|
||||
|
||||
this.show_zero_check()
|
||||
this.setup_chart_check();
|
||||
this.show_zero_check();
|
||||
},
|
||||
init_filter_values: function() {
|
||||
this._super();
|
||||
|
@ -33,7 +33,7 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
{fieldname: "range", fieldtype:"Select", label: __("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"], default_value: "Monthly"}
|
||||
],
|
||||
|
||||
|
||||
init_filter_values: function() {
|
||||
this._super();
|
||||
this.filter_inputs.range.val('Monthly');
|
||||
@ -41,8 +41,6 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
|
||||
setup_columns: function() {
|
||||
var std_columns = [
|
||||
{id: "_check", name: __("Plot"), field: "_check", width: 30,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: __("Status"), field: "name", width: 100},
|
||||
];
|
||||
this.make_date_range_columns();
|
||||
|
Loading…
x
Reference in New Issue
Block a user