2018-03-27 04:20:58 +00:00
|
|
|
const GeneralLedgerView = require('../reports/generalLedger/GeneralLedgerView');
|
2018-03-26 12:14:27 +00:00
|
|
|
const frappe = require('frappejs');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
start() {
|
|
|
|
// require modules
|
|
|
|
frappe.registerModels(require('../models'), 'client');
|
|
|
|
|
|
|
|
frappe.registerView('List', 'ToDo', require('frappejs/models/doctype/ToDo/ToDoList.js'));
|
|
|
|
frappe.registerView('Form', 'FilterSelector', require('frappejs/models/doctype/FilterSelector/FilterSelectorForm.js'));
|
|
|
|
|
|
|
|
frappe.registerView('List', 'Customer', require('../models/doctype/Party/CustomerList.js'));
|
|
|
|
|
|
|
|
frappe.router.add('report/general-ledger', async (params) => {
|
|
|
|
if (!frappe.views.generalLedger) {
|
|
|
|
frappe.views.generalLedger = new GeneralLedgerView();
|
|
|
|
}
|
|
|
|
await frappe.views.generalLedger.show(params);
|
|
|
|
})
|
|
|
|
|
|
|
|
frappe.desk.menu.addItem('ToDo', '#list/ToDo');
|
|
|
|
frappe.desk.menu.addItem('Accounts', '#list/Account');
|
|
|
|
frappe.desk.menu.addItem('Items', '#list/Item');
|
|
|
|
frappe.desk.menu.addItem('Customers', '#list/Customer');
|
|
|
|
frappe.desk.menu.addItem('Invoice', '#list/Invoice');
|
2018-03-28 12:12:13 +00:00
|
|
|
frappe.desk.menu.addItem('Journal Entry', '#list/JournalEntry');
|
2018-03-27 13:16:40 +00:00
|
|
|
frappe.desk.menu.addItem('Address', "#list/Address");
|
|
|
|
frappe.desk.menu.addItem('Contact', "#list/Contact");
|
2018-03-26 12:14:27 +00:00
|
|
|
frappe.desk.menu.addItem('Settings', () => frappe.desk.showFormModal('SystemSettings'));
|
|
|
|
|
|
|
|
frappe.router.default = '#list/ToDo';
|
|
|
|
|
|
|
|
frappe.router.show(window.location.hash);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|