2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/reports/GeneralLedger/viewConfig.js

127 lines
2.7 KiB
JavaScript
Raw Normal View History

import { partyWithAvatar } from '@/utils';
import getCommonExportActions from '../commonExporter';
2019-07-18 06:49:12 +00:00
let title = 'General Ledger';
const viewConfig = {
title,
filterFields: [
{
fieldtype: 'Select',
options: [
{ label: 'All References', value: 'All' },
{ label: 'Invoices', value: 'SalesInvoice' },
{ label: 'Bills', value: 'PurchaseInvoice' },
{ label: 'Payment', value: 'Payment' },
{ label: 'Journal Entry', value: 'JournalEntry' },
],
2019-08-14 07:43:49 +00:00
size: 'small',
label: 'Reference Type',
fieldname: 'referenceType',
placeholder: 'Reference Type',
default: 'All',
},
{
fieldtype: 'DynamicLink',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'Reference Name',
references: 'referenceType',
label: 'Reference Name',
fieldname: 'referenceName',
},
{
fieldtype: 'Link',
target: 'Account',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'Account',
label: 'Account',
fieldname: 'account',
},
{
fieldtype: 'Link',
target: 'Party',
label: 'Party',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'Party',
fieldname: 'party',
},
{
fieldtype: 'Date',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'From Date',
label: 'From Date',
fieldname: 'fromDate',
},
{
fieldtype: 'Date',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'To Date',
label: 'To Date',
fieldname: 'toDate',
},
{
fieldtype: 'Check',
size: 'small',
default: 0,
label: 'Cancelled',
fieldname: 'reverted',
},
],
2018-07-14 14:26:18 +00:00
method: 'general-ledger',
actions: getCommonExportActions('general-ledger'),
2018-07-14 14:26:18 +00:00
getColumns() {
2019-07-18 06:49:12 +00:00
return [
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
{
label: 'Account',
2019-10-13 21:56:20 +00:00
fieldtype: 'Link',
fieldname: 'account',
width: 1.5,
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
},
{
label: 'Date',
fieldtype: 'Date',
fieldname: 'date',
width: 0.75,
},
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
{
label: 'Debit',
2019-10-13 21:56:20 +00:00
fieldtype: 'Currency',
fieldname: 'debit',
width: 1.25,
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
},
{
label: 'Credit',
2019-10-13 21:56:20 +00:00
fieldtype: 'Currency',
fieldname: 'credit',
width: 1.25,
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
},
{
label: 'Balance',
2019-10-13 21:56:20 +00:00
fieldtype: 'Currency',
fieldname: 'balance',
width: 1.25,
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
},
{
label: 'Reference Type',
2019-10-13 21:56:20 +00:00
fieldtype: 'Data',
fieldname: 'referenceType',
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
},
{
label: 'Reference Name',
2019-10-13 21:56:20 +00:00
fieldtype: 'Data',
fieldname: 'referenceName',
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
},
{
label: 'Party',
2019-10-13 21:56:20 +00:00
fieldtype: 'Link',
fieldname: 'party',
component(cellValue) {
return partyWithAvatar(cellValue);
},
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
},
2018-07-14 14:26:18 +00:00
];
},
2018-07-14 14:26:18 +00:00
};
2019-07-18 06:49:12 +00:00
export default viewConfig;