[design] Fixed Grid Reports
This commit is contained in:
parent
90e270a8aa
commit
3f5e95a99e
@ -9,7 +9,7 @@ frappe.pages['financial-analytics'].onload = function(wrapper) {
|
||||
title: __('Financial Analytics'),
|
||||
single_column: true
|
||||
});
|
||||
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
|
||||
erpnext.financial_analytics = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
|
||||
frappe.add_breadcrumbs("Accounts")
|
||||
|
||||
}
|
||||
@ -41,14 +41,11 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
||||
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year", fieldname: "fiscal_year",
|
||||
default_value: __("Select Fiscal Year...")},
|
||||
{fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
|
||||
{fieldtype:"Label", label: __("To")},
|
||||
{fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
|
||||
{fieldtype:"Select", label: __("Range"), fieldname: "range",
|
||||
options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"},
|
||||
{label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"},
|
||||
{label: __("Yearly"), value: "Yearly"}]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
{label: __("Yearly"), value: "Yearly"}]}
|
||||
],
|
||||
setup_columns: function() {
|
||||
var std_columns = [
|
||||
|
@ -98,14 +98,11 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
||||
{fieldtype:"Select", label: __("Company"), link:"Company", fieldname: "company",
|
||||
default_value: __("Select Company...")},
|
||||
{fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
|
||||
{fieldtype:"Label", label: __("To")},
|
||||
{fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
|
||||
{fieldtype:"Select", label: __("Range"), fieldname: "range",
|
||||
options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"},
|
||||
{label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"},
|
||||
{label: __("Yearly"), value: "Yearly"}]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
{label: __("Yearly"), value: "Yearly"}]}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
@ -67,10 +67,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
|
||||
default_value: __("Select Fiscal Year...")},
|
||||
{fieldtype: "Date", label: __("From Date"), fieldname: "from_date"},
|
||||
{fieldtype: "Label", label: __("To")},
|
||||
{fieldtype: "Date", label: __("To Date"), fieldname: "to_date"},
|
||||
{fieldtype: "Button", label: __("Refresh"), icon:"icon-refresh icon-white",
|
||||
cssClass:"btn-primary"},
|
||||
{fieldtype: "Button", label: __("Reset Filters"), icon: "icon-filter"},
|
||||
{fieldtype: "Date", label: __("To Date"), fieldname: "to_date"}
|
||||
],
|
||||
setup_filters: function() {
|
||||
this._super();
|
||||
|
@ -62,12 +62,9 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||
{fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", fieldname: "warehouse",
|
||||
default_value: __("Select Warehouse...")},
|
||||
{fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
|
||||
{fieldtype:"Label", label: __("To")},
|
||||
{fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
|
||||
{fieldtype:"Select", label: __("Range"), fieldname: "range",
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
@ -105,9 +105,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
||||
{fieldtype:"Select", label: __("Range"), fieldname: "range",
|
||||
options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"},
|
||||
{label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"},
|
||||
{label: __("Yearly"), value: "Yearly"}]},
|
||||
{fieldtype:"Button", fieldname: "refresh", label: __("Refresh"), icon:"icon-refresh"},
|
||||
{fieldtype:"Button", fieldname: "reset_filters", label: __("Reset Filters"), icon:"icon-filter"}
|
||||
{label: __("Yearly"), value: "Yearly"}]}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
@ -80,12 +80,9 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
{fieldtype:"Date", label: __("From Date"), filter: function(val, item) {
|
||||
return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Label", label: __("To")},
|
||||
{fieldtype:"Date", label: __("To Date"), filter: function(val, item) {
|
||||
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
}}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
|
@ -97,9 +97,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
{fieldtype:"Select", label: __("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val;
|
||||
}},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
}}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
|
@ -30,12 +30,9 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
|
||||
default_value: __("Select Fiscal Year") + "..."},
|
||||
{fieldtype:"Date", label: __("From Date")},
|
||||
{fieldtype:"Label", label: __("To")},
|
||||
{fieldtype:"Date", label: __("To Date")},
|
||||
{fieldtype:"Select", label: __("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}
|
||||
],
|
||||
|
||||
setup_columns: function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user