diff --git a/models/doctype/Party/RegionalChanges.js b/models/doctype/Party/RegionalChanges.js index 9b933f8d..e3b77f40 100644 --- a/models/doctype/Party/RegionalChanges.js +++ b/models/doctype/Party/RegionalChanges.js @@ -6,11 +6,11 @@ party.fields.splice(3, 0, { label: 'GSTIN No.', fieldtype: 'Data', hidden: form => { - return form.individualType === 'Registered Regular' ? 0 : 1; + return form.gstType === 'Registered Regular' ? 0 : 1; } }); party.fields.splice(4, 0, { - fieldname: 'individualType', + fieldname: 'gstType', label: 'GST Registration Type', fieldtype: 'Select', options: ['Unregistered', 'Registered Regular', 'Consumer'] diff --git a/reports/BankReconciliation/viewConfig.js b/reports/BankReconciliation/viewConfig.js index 93b735b3..683823af 100644 --- a/reports/BankReconciliation/viewConfig.js +++ b/reports/BankReconciliation/viewConfig.js @@ -55,6 +55,11 @@ module.exports = { label: 'Balance', fieldtype: 'Currency' }, + { + label: 'Clearance Date', + fieldtype: 'Date', + fieldname: 'clearanceDate' + }, { label: 'Ref. Type', fieldtype: 'Data', @@ -70,11 +75,7 @@ module.exports = { fieldtype: 'Date', fieldname: 'referenceDate' }, - { - label: 'Clearance Date', - fieldtype: 'Date', - fieldname: 'clearanceDate' - }, + { label: 'Party', fieldtype: 'Link' diff --git a/reports/GeneralLedger/viewConfig.js b/reports/GeneralLedger/viewConfig.js index 640fed4e..20f79582 100644 --- a/reports/GeneralLedger/viewConfig.js +++ b/reports/GeneralLedger/viewConfig.js @@ -1,44 +1,43 @@ let title = 'General Ledger'; -let filterFields = [ - { - fieldtype: 'Select', - options: ['', 'Invoice', 'Payment', 'Bill'], - label: 'Reference Type', - fieldname: 'referenceType' - }, - { - fieldtype: 'DynamicLink', - references: 'referenceType', - label: 'Reference Name', - fieldname: 'referenceName' - }, - { - fieldtype: 'Link', - target: 'Account', - label: 'Account', - fieldname: 'account' - }, - { - fieldtype: 'Link', - target: 'Party', - label: 'Party', - fieldname: 'party' - }, - { - fieldtype: 'Date', - label: 'From Date', - fieldname: 'fromDate' - }, - { - fieldtype: 'Date', - label: 'To Date', - fieldname: 'toDate' - } -]; const viewConfig = { title, - filterFields, + filterFields: [ + { + fieldtype: 'Select', + options: ['', 'Invoice', 'Payment', 'Bill'], + label: 'Reference Type', + fieldname: 'referenceType' + }, + { + fieldtype: 'DynamicLink', + references: 'referenceType', + label: 'Reference Name', + fieldname: 'referenceName' + }, + { + fieldtype: 'Link', + target: 'Account', + label: 'Account', + fieldname: 'account' + }, + { + fieldtype: 'Link', + target: 'Party', + label: 'Party', + fieldname: 'party' + }, + { + fieldtype: 'Date', + label: 'From Date', + fieldname: 'fromDate' + }, + { + fieldtype: 'Date', + label: 'To Date', + fieldname: 'toDate' + } + ], method: 'general-ledger', linkFields: [ { @@ -46,7 +45,9 @@ const viewConfig = { type: 'primary', action: async report => { async function getReportDetails() { - let [rows, columns] = await report.getReportData(filterFields); + let [rows, columns] = await report.getReportData( + report.currentFilters + ); let columnData = columns.map(column => { return { id: column.id, @@ -74,7 +75,7 @@ const viewConfig = { label: 'Clear Filters', type: 'secondary', action: async report => { - await report.$router.replace(`/report/general-ledger`); + await report.$router.push(`/report/general-ledger`); } } ], diff --git a/reports/GoodsAndServiceTax/viewConfig.js b/reports/GoodsAndServiceTax/viewConfig.js index 3d28ae1e..dcf4c6b7 100644 --- a/reports/GoodsAndServiceTax/viewConfig.js +++ b/reports/GoodsAndServiceTax/viewConfig.js @@ -30,6 +30,39 @@ module.exports = { fieldname: 'toDate' } ], + linkFields: [ + { + label: 'Export', + type: 'primary', + action: async report => { + async function getReportDetails() { + let [rows, columns] = await report.getReportData( + report.currentFilters + ); + let columnData = columns.map(column => { + return { + id: column.id, + content: column.content, + checked: true + }; + }); + return { + title: title, + rows: rows, + columnData: columnData + }; + } + report.$modal.show({ + modalProps: { + title: `Export ${title}`, + noFooter: true + }, + component: require('../../src/components/ExportWizard').default, + props: await getReportDetails() + }); + } + } + ], getColumns() { return [ diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 66536a04..0284313b 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -58,44 +58,6 @@ export default { groupItems: [], activeGroup: undefined, openGroup: undefined - // items: [ - // { - // label: 'Chart of Accounts', - // route: '/chartOfAccounts' - // }, - // { - // label: 'Customers', - // route: '/list/Customer' - // }, - // { - // label: 'Items', - // route: '/list/Item' - // }, - // { - // label: 'Tax', - // route: '/list/Tax' - // }, - // { - // label: 'Payments', - // route: '/list/Payment' - // }, - // { - // label: 'Journal Entry', - // route: '/list/JournalEntry' - // }, - // { - // label: 'Invoices', - // route: '/list/Invoice' - // }, - // { - // label: 'Reports', - // route: '/reportList' - // }, - // { - // label: 'Settings', - // route: '/settings' - // } - // ] }; }, async mounted() { @@ -131,6 +93,7 @@ export default { diff --git a/src/pages/ChartOfAccounts/Branch.vue b/src/pages/ChartOfAccounts/Branch.vue index 9cdb001d..c2862016 100644 --- a/src/pages/ChartOfAccounts/Branch.vue +++ b/src/pages/ChartOfAccounts/Branch.vue @@ -1,16 +1,29 @@