From 60f0d00eb59f1d6d8a7da01ee629cb1c3361386d Mon Sep 17 00:00:00 2001 From: Piyush Singhania Date: Thu, 2 Dec 2021 14:04:26 +0530 Subject: [PATCH] Added gstr-1 gstr-2 reports feature --- package.json | 1 + reports/GoodsAndServiceTax/BaseViewConfig.js | 17 ++++------------- reports/view.js | 8 ++++---- src/sidebarConfig.js | 8 ++++++++ yarn.lock | 5 +++++ 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index b3c0df35..d4a72192 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "core-js": "^3.19.0", "csvjson-csv2json": "^5.0.6", "electron-store": "^8.0.1", + "file-saver": "^2.0.5", "frappe-charts": "1.6.1", "frappejs": "https://github.com/frappe/frappejs", "knex": "^0.95.12", diff --git a/reports/GoodsAndServiceTax/BaseViewConfig.js b/reports/GoodsAndServiceTax/BaseViewConfig.js index 2f330344..dd41b9e1 100644 --- a/reports/GoodsAndServiceTax/BaseViewConfig.js +++ b/reports/GoodsAndServiceTax/BaseViewConfig.js @@ -86,73 +86,64 @@ export default { label: 'GSTIN No.', fieldname: 'gstin', fieldtype: 'Data', - width: 100, + width: 1.5, }, { + label: 'Party', fieldtype: 'Data', fieldname: 'partyName', - label: 'Party', - width: 100, + width: 1.5, }, { label: 'Invoice No.', fieldname: 'invNo', fieldtype: 'Data', - width: 100, }, { label: 'Invoice Value', fieldname: 'invAmt', fieldtype: 'Currency', - width: 100, }, { label: 'Invoice Date', fieldname: 'invDate', fieldtype: 'Date', - width: 100, }, { label: 'Place of supply', fieldname: 'place', fieldtype: 'Data', - width: 100, }, { label: 'Rate', fieldname: 'rate', fieldtype: 'Data', - width: 80, + width: 0.5, }, { label: 'Taxable Value', fieldname: 'taxVal', fieldtype: 'Currency', - width: 100, }, { label: 'Reverse Chrg.', fieldname: 'reverseCharge', fieldtype: 'Data', - width: 80, }, { label: 'Intergrated Tax', fieldname: 'igstAmt', fieldtype: 'Currency', - width: 100, }, { label: 'Central Tax', fieldname: 'cgstAmt', fieldtype: 'Currency', - width: 100, }, { label: 'State Tax', fieldname: 'sgstAmt', fieldtype: 'Currency', - width: 100, }, ]; }, diff --git a/reports/view.js b/reports/view.js index 209bb1e3..c4dade3d 100644 --- a/reports/view.js +++ b/reports/view.js @@ -5,8 +5,8 @@ import BalanceSheetViewConfig from './BalanceSheet/viewConfig'; import ProfitAndLossViewConfig from './ProfitAndLoss/viewConfig'; import TrialBalanceViewConfig from './TrialBalance/viewConfig'; // import BankReconciliationViewConfig from './BankReconciliation/viewConfig'; -// import GoodsAndServiceTaxGSTR1View from './GoodsAndServiceTax/GSTR1View'; -// import GoodsAndServiceTaxGSTR2View from './GoodsAndServiceTax/GSTR2View'; +import GoodsAndServiceTaxGSTR1View from './GoodsAndServiceTax/GSTR1View'; +import GoodsAndServiceTaxGSTR2View from './GoodsAndServiceTax/GSTR2View'; export default { 'general-ledger' : GeneralLedgerViewConfig, @@ -16,6 +16,6 @@ export default { 'profit-and-loss' : ProfitAndLossViewConfig, 'trial-balance' : TrialBalanceViewConfig, // 'bank-reconciliation' : BankReconciliationViewConfig, - // 'gstr-1' : GoodsAndServiceTaxGSTR1View, - // 'gstr-2' : GoodsAndServiceTaxGSTR2View, + 'gstr-1' : GoodsAndServiceTaxGSTR1View, + 'gstr-2' : GoodsAndServiceTaxGSTR2View, }; diff --git a/src/sidebarConfig.js b/src/sidebarConfig.js index de737e8b..5a563003 100644 --- a/src/sidebarConfig.js +++ b/src/sidebarConfig.js @@ -95,6 +95,14 @@ const config = { label: _('Trial Balance'), route: '/report/trial-balance', }, + { + label: _('GSTR1'), + route: '/report/gstr-1', + }, + { + label: _('GSTR2'), + route: '/report/gstr-2', + }, ], }, { diff --git a/yarn.lock b/yarn.lock index b4411b67..fc420ccc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5792,6 +5792,11 @@ file-loader@^4.2.0: loader-utils "^1.2.3" schema-utils "^2.5.0" +file-saver@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-2.0.5.tgz#d61cfe2ce059f414d899e9dd6d4107ee25670c38" + integrity sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA== + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"