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

114 lines
2.4 KiB
JavaScript
Raw Normal View History

import frappe from 'frappejs';
import { _ } from 'frappejs/utils';
2019-07-16 09:14:44 +00:00
const path = require('path');
2018-06-15 15:46:14 +00:00
export default {
2019-07-16 09:14:44 +00:00
getTitle: async () => {
const accountingSettings = await frappe.getSingle('AccountingSettings');
return accountingSettings.companyName;
2018-06-04 11:00:46 +00:00
},
2019-07-16 09:14:44 +00:00
getDbName() {
if (localStorage.dbPath) {
const parts = localStorage.dbPath.split(path.sep);
return parts[parts.length - 1];
}
},
getGroups() {
return this.groups.map(g => g.title);
},
getItems(groupTitle) {
if (groupTitle)
return this.groups.filter(g => g.title === groupTitle)[0].items;
else return [];
},
groups: [
{
title: _('Masters'),
items: [
{
2019-07-16 09:14:44 +00:00
label: _('Chart Of Accounts'),
route: '/chartOfAccounts'
},
{
label: _('Accounts'),
route: '/list/Account'
},
{
2019-07-16 09:14:44 +00:00
label: _('Item'),
route: '/list/Item'
},
{
2019-07-16 09:14:44 +00:00
label: _('Customer'),
route: '/list/Customer'
},
2019-07-18 06:49:12 +00:00
{
label: _('Supplier'),
route: '/list/Supplier'
},
{
2019-07-16 09:14:44 +00:00
label: _('Tax'),
route: '/list/Tax'
}
]
},
2018-09-26 14:23:53 +00:00
{
title: _('Transactions'),
items: [
{
2019-07-16 09:14:44 +00:00
label: _('Invoice'),
route: '/list/Invoice'
2018-09-26 14:23:53 +00:00
},
{
2019-07-16 09:14:44 +00:00
label: _('Journal Entry'),
route: '/list/JournalEntry'
},
{
label: _('Payment'),
route: '/list/Payment'
2018-09-26 14:23:53 +00:00
}
// {
2019-07-16 09:14:44 +00:00
// label: _('AccountingLedgerEntry'), route: '/list/AccountingLedgerEntry'
2018-09-26 14:23:53 +00:00
// },
]
},
{
title: _('Reports'),
items: [
{
2019-07-16 09:14:44 +00:00
label: _('General Ledger'),
route: '/report/general-ledger'
},
2019-07-18 06:49:12 +00:00
{
label: _('Trial Balance'),
route: '/report/trial-balance'
},
{
2019-07-16 09:14:44 +00:00
label: _('Sales Register'),
route: '/report/sales-register'
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-16 09:14:44 +00:00
label: _('Bank Reconciliation'),
route: '/report/bank-reconciliation'
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-16 09:14:44 +00:00
label: _('Goods and Service Tax'),
route: '/report/gst-taxes'
}
]
2018-10-10 10:32:56 +00:00
},
{
title: _('Tools'),
items: [
{
2019-07-16 09:14:44 +00:00
label: _('Data Import'),
route: '/data-import'
2019-07-18 06:49:12 +00:00
},
{
label: _('Settings'),
route: '/settings'
2018-10-10 10:32:56 +00:00
}
]
}
]
};