2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 01:14:03 +00:00
books/reports/GoodsAndServiceTax/BaseViewConfig.js

109 lines
2.3 KiB
JavaScript
Raw Normal View History

2022-02-16 06:19:16 +00:00
import { t } from 'frappe';
2021-12-12 10:00:50 +00:00
import { DateTime } from 'luxon';
2022-01-10 11:20:53 +00:00
import { stateCodeMap } from '../../accounting/gst';
import { titleCase } from '../../src/utils';
const stateList = Object.keys(stateCodeMap).map(titleCase).sort();
export default {
2019-07-19 13:24:31 +00:00
filterFields: [
Winter Sprint: Work (#79) * init() * Country-wise Chart of accounts on setup * Add a sample invoice template * Some error fixes * [fix] missing COA - move importCOA.js from models/doctype/account to models/doctype/Account * All Account initial balance zero * setup Bank Reconciliation * New chart of accounts tree component * GST taxes added. initialized gst reports. * [chore] add *.db to .gitignore * [fix] importCOA path error * fix error + bank reconciliation fields * [feat] add gst taxes * GST report initialized * GST report finalized * GST report finalized * Complete min. reconciliation * [feat] auto select tax in invoice based on states * [chore] fix merge changes * Fix date issue - Make Payment * Add invoice templates and invoice customizer panel * Restructure invoice vue components * update file with fiscal year * Fix issues in invoice designs * Add company settings. Dynamic addresses in invoice * Move invoice styles to different file and add separate components for addresses * [feat] add export-filtered-data-to-csv to reports * [feat] add Export Wizard component for customizing export * Fix invoice customizer position while scrolling. Fix address displayed as undefined in invoice if not found in db * [chore] change markup for select all chkbox * Setup config as doctype * GSTIN bug fix * Add custom google fonts * Add Send email footer * Fix DateTime * Complete Merge + Resolve * Complete Merge + Resolve * [chore] change layout of Export Wizard * [enh] optimize checkNoneSelected, style export modal footer divider * Add Tax to SideBar * Remove extra logs * [fix] db name section in sidebar showing absolute path instead of dbname in windows i.e. platform=win32 * Country-wise Chart of accounts on setup (#78) * Country-wise Chart of accounts on setup * Some error fixes * All Account initial balance zero * Update README.md - updated installation instructions with more detail * Merge #79 Winter Sprint: Work https://github.com/frappe/accounting/pull/79 * Revert "Merge #79 Winter Sprint: Work" This reverts commit 171511666817caa430af672791c8d452e3b4b680.
2019-02-18 05:42:04 +00:00
{
fieldtype: 'AutoComplete',
2022-02-16 06:19:16 +00:00
label: t`Place`,
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'Place',
fieldname: 'place',
getList: () => stateList,
Winter Sprint: Work (#79) * init() * Country-wise Chart of accounts on setup * Add a sample invoice template * Some error fixes * [fix] missing COA - move importCOA.js from models/doctype/account to models/doctype/Account * All Account initial balance zero * setup Bank Reconciliation * New chart of accounts tree component * GST taxes added. initialized gst reports. * [chore] add *.db to .gitignore * [fix] importCOA path error * fix error + bank reconciliation fields * [feat] add gst taxes * GST report initialized * GST report finalized * GST report finalized * Complete min. reconciliation * [feat] auto select tax in invoice based on states * [chore] fix merge changes * Fix date issue - Make Payment * Add invoice templates and invoice customizer panel * Restructure invoice vue components * update file with fiscal year * Fix issues in invoice designs * Add company settings. Dynamic addresses in invoice * Move invoice styles to different file and add separate components for addresses * [feat] add export-filtered-data-to-csv to reports * [feat] add Export Wizard component for customizing export * Fix invoice customizer position while scrolling. Fix address displayed as undefined in invoice if not found in db * [chore] change markup for select all chkbox * Setup config as doctype * GSTIN bug fix * Add custom google fonts * Add Send email footer * Fix DateTime * Complete Merge + Resolve * Complete Merge + Resolve * [chore] change layout of Export Wizard * [enh] optimize checkNoneSelected, style export modal footer divider * Add Tax to SideBar * Remove extra logs * [fix] db name section in sidebar showing absolute path instead of dbname in windows i.e. platform=win32 * Country-wise Chart of accounts on setup (#78) * Country-wise Chart of accounts on setup * Some error fixes * All Account initial balance zero * Update README.md - updated installation instructions with more detail * Merge #79 Winter Sprint: Work https://github.com/frappe/accounting/pull/79 * Revert "Merge #79 Winter Sprint: Work" This reverts commit 171511666817caa430af672791c8d452e3b4b680.
2019-02-18 05:42:04 +00:00
},
{
2019-07-19 13:24:31 +00:00
fieldtype: 'Date',
2022-02-16 06:19:16 +00:00
label: t`From Date`,
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'From Date',
fieldname: 'fromDate',
2021-12-14 17:59:36 +00:00
default: () => DateTime.local().minus({ months: 3 }).toISODate(),
Winter Sprint: Work (#79) * init() * Country-wise Chart of accounts on setup * Add a sample invoice template * Some error fixes * [fix] missing COA - move importCOA.js from models/doctype/account to models/doctype/Account * All Account initial balance zero * setup Bank Reconciliation * New chart of accounts tree component * GST taxes added. initialized gst reports. * [chore] add *.db to .gitignore * [fix] importCOA path error * fix error + bank reconciliation fields * [feat] add gst taxes * GST report initialized * GST report finalized * GST report finalized * Complete min. reconciliation * [feat] auto select tax in invoice based on states * [chore] fix merge changes * Fix date issue - Make Payment * Add invoice templates and invoice customizer panel * Restructure invoice vue components * update file with fiscal year * Fix issues in invoice designs * Add company settings. Dynamic addresses in invoice * Move invoice styles to different file and add separate components for addresses * [feat] add export-filtered-data-to-csv to reports * [feat] add Export Wizard component for customizing export * Fix invoice customizer position while scrolling. Fix address displayed as undefined in invoice if not found in db * [chore] change markup for select all chkbox * Setup config as doctype * GSTIN bug fix * Add custom google fonts * Add Send email footer * Fix DateTime * Complete Merge + Resolve * Complete Merge + Resolve * [chore] change layout of Export Wizard * [enh] optimize checkNoneSelected, style export modal footer divider * Add Tax to SideBar * Remove extra logs * [fix] db name section in sidebar showing absolute path instead of dbname in windows i.e. platform=win32 * Country-wise Chart of accounts on setup (#78) * Country-wise Chart of accounts on setup * Some error fixes * All Account initial balance zero * Update README.md - updated installation instructions with more detail * Merge #79 Winter Sprint: Work https://github.com/frappe/accounting/pull/79 * Revert "Merge #79 Winter Sprint: Work" This reverts commit 171511666817caa430af672791c8d452e3b4b680.
2019-02-18 05:42:04 +00:00
},
{
2019-07-19 13:24:31 +00:00
fieldtype: 'Date',
2022-02-16 06:19:16 +00:00
label: t`To Date`,
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'To Date',
fieldname: 'toDate',
2021-12-14 17:59:36 +00:00
default: () => DateTime.local().toISODate(),
},
2019-07-19 13:24:31 +00:00
],
getColumns({ filters }) {
const columns = [
2019-07-19 13:24:31 +00:00
{
2022-02-16 06:19:16 +00:00
label: t`Party`,
2019-07-19 13:24:31 +00:00
fieldtype: 'Data',
2019-07-22 09:56:30 +00:00
fieldname: 'partyName',
2021-12-02 08:34:26 +00:00
width: 1.5,
2019-07-19 13:24:31 +00:00
},
{
2022-02-16 06:19:16 +00:00
label: t`Invoice No.`,
2019-07-19 13:24:31 +00:00
fieldname: 'invNo',
fieldtype: 'Data',
},
{
2022-02-16 06:19:16 +00:00
label: t`Invoice Value`,
2019-07-19 13:24:31 +00:00
fieldname: 'invAmt',
fieldtype: 'Currency',
},
{
2022-02-16 06:19:16 +00:00
label: t`Invoice Date`,
2019-07-19 13:24:31 +00:00
fieldname: 'invDate',
fieldtype: 'Date',
},
{
2022-02-16 06:19:16 +00:00
label: t`Place of supply`,
2019-07-19 13:24:31 +00:00
fieldname: 'place',
fieldtype: 'Data',
},
{
2022-02-16 06:19:16 +00:00
label: t`Rate`,
2019-07-19 13:24:31 +00:00
fieldname: 'rate',
fieldtype: 'Data',
2021-12-02 08:34:26 +00:00
width: 0.5,
2019-07-19 13:24:31 +00:00
},
{
2022-02-16 06:19:16 +00:00
label: t`Taxable Value`,
2019-07-25 09:50:48 +00:00
fieldname: 'taxVal',
2019-07-19 13:24:31 +00:00
fieldtype: 'Currency',
},
2019-07-25 09:50:48 +00:00
{
2022-02-16 06:19:16 +00:00
label: t`Reverse Chrg.`,
2019-07-25 09:50:48 +00:00
fieldname: 'reverseCharge',
fieldtype: 'Data',
},
2019-07-19 13:24:31 +00:00
{
2022-02-16 06:19:16 +00:00
label: t`Intergrated Tax`,
2019-07-19 13:24:31 +00:00
fieldname: 'igstAmt',
fieldtype: 'Currency',
},
{
2022-02-16 06:19:16 +00:00
label: t`Central Tax`,
2019-07-19 13:24:31 +00:00
fieldname: 'cgstAmt',
fieldtype: 'Currency',
},
{
2022-02-16 06:19:16 +00:00
label: t`State Tax`,
2019-07-19 13:24:31 +00:00
fieldname: 'sgstAmt',
fieldtype: 'Currency',
},
Winter Sprint: Work (#79) * init() * Country-wise Chart of accounts on setup * Add a sample invoice template * Some error fixes * [fix] missing COA - move importCOA.js from models/doctype/account to models/doctype/Account * All Account initial balance zero * setup Bank Reconciliation * New chart of accounts tree component * GST taxes added. initialized gst reports. * [chore] add *.db to .gitignore * [fix] importCOA path error * fix error + bank reconciliation fields * [feat] add gst taxes * GST report initialized * GST report finalized * GST report finalized * Complete min. reconciliation * [feat] auto select tax in invoice based on states * [chore] fix merge changes * Fix date issue - Make Payment * Add invoice templates and invoice customizer panel * Restructure invoice vue components * update file with fiscal year * Fix issues in invoice designs * Add company settings. Dynamic addresses in invoice * Move invoice styles to different file and add separate components for addresses * [feat] add export-filtered-data-to-csv to reports * [feat] add Export Wizard component for customizing export * Fix invoice customizer position while scrolling. Fix address displayed as undefined in invoice if not found in db * [chore] change markup for select all chkbox * Setup config as doctype * GSTIN bug fix * Add custom google fonts * Add Send email footer * Fix DateTime * Complete Merge + Resolve * Complete Merge + Resolve * [chore] change layout of Export Wizard * [enh] optimize checkNoneSelected, style export modal footer divider * Add Tax to SideBar * Remove extra logs * [fix] db name section in sidebar showing absolute path instead of dbname in windows i.e. platform=win32 * Country-wise Chart of accounts on setup (#78) * Country-wise Chart of accounts on setup * Some error fixes * All Account initial balance zero * Update README.md - updated installation instructions with more detail * Merge #79 Winter Sprint: Work https://github.com/frappe/accounting/pull/79 * Revert "Merge #79 Winter Sprint: Work" This reverts commit 171511666817caa430af672791c8d452e3b4b680.
2019-02-18 05:42:04 +00:00
];
const transferType = filters.transferType || 'B2B';
if (transferType === 'B2B') {
columns.unshift({
2022-02-16 06:19:16 +00:00
label: t`GSTIN No.`,
fieldname: 'gstin',
fieldtype: 'Data',
width: 1.5,
});
}
return columns;
},
2019-07-19 13:24:31 +00:00
};