From 89bc6525719a3005b1676fc2201b986258a0825c Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Tue, 21 Dec 2021 14:51:13 +0530 Subject: [PATCH] feat: add Export to P&L, BS and TB --- reports/BalanceSheet/viewConfig.js | 2 ++ reports/ProfitAndLoss/viewConfig.js | 2 ++ reports/TrialBalance/viewConfig.js | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reports/BalanceSheet/viewConfig.js b/reports/BalanceSheet/viewConfig.js index a8dc323d..15f91ff8 100644 --- a/reports/BalanceSheet/viewConfig.js +++ b/reports/BalanceSheet/viewConfig.js @@ -1,4 +1,5 @@ import frappe from 'frappejs'; +import getCommonExportActions from '../commonExporter'; export default { title: 'Balance Sheet', @@ -25,6 +26,7 @@ export default { default: 'Monthly', }, ], + actions: getCommonExportActions('balance-sheet'), getColumns(data) { const columns = [ { label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 2 }, diff --git a/reports/ProfitAndLoss/viewConfig.js b/reports/ProfitAndLoss/viewConfig.js index 273db287..04878d51 100644 --- a/reports/ProfitAndLoss/viewConfig.js +++ b/reports/ProfitAndLoss/viewConfig.js @@ -1,4 +1,5 @@ import frappe from 'frappejs'; +import getCommonExportActions from '../commonExporter'; const title = 'Profit and Loss'; @@ -39,6 +40,7 @@ export default { fieldname: 'periodicity', }, ], + actions: getCommonExportActions('profit-and-loss'), getColumns(data) { const columns = [ { label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 2 }, diff --git a/reports/TrialBalance/viewConfig.js b/reports/TrialBalance/viewConfig.js index b33a7009..083f66a9 100644 --- a/reports/TrialBalance/viewConfig.js +++ b/reports/TrialBalance/viewConfig.js @@ -1,4 +1,5 @@ import frappe from 'frappejs'; +import getCommonExportActions from '../commonExporter'; const title = 'Trial Balance'; @@ -30,7 +31,7 @@ export default { }, }, ], - actions: [], + actions: getCommonExportActions('trial-balance'), getColumns(data) { const columns = [ { label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 2 },