From 675c1d3a5ac2d53146264f74e6b4cebaffdaffd6 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 6 Feb 2019 09:47:13 +0530 Subject: [PATCH] refactor(dashboard): Move Soure settings to account_balance_timeline.js --- .../account_balance_timeline.js | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js diff --git a/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js b/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js new file mode 100644 index 0000000000..c9a046f557 --- /dev/null +++ b/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js @@ -0,0 +1,44 @@ +frappe.dashboard_chart_sources["Account Balance Timeline"] = { + method_path: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get", + filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + default: frappe.defaults.get_user_default("Company"), + reqd: 1 + }, + { + fieldname: "account", + label: __("Account"), + fieldtype: "Link", + options: "Account", + reqd: 1 + }, + { + fieldname: "timespan", + label: __("Period"), + fieldtype: "Select", + options: [ + {value: "Last Year", label: __("Last Year")}, + {value: "Last Quarter", label: __("Last Quarter")}, + {value: "Last Month", label: __("Last Month")}, + {value: "Last Week", label: __("Last Week")} + ], + reqd: 1 + }, + { + fieldname: "timegrain", + label: __("Periodicity"), + fieldtype: "Select", + options: [ + {value: "Quarterly", label: __("Quarterly")}, + {value: "Monthly", label: __("Monthly")}, + {value: "Weekly", label: __("Weekly")}, + {value: "Daily", label: __("Daily")} + ], + reqd: 1 + }, + ] +}; \ No newline at end of file