2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 15:50:56 +00:00
books/reports/generalLedger/GeneralLedgerView.js

38 lines
1.4 KiB
JavaScript
Raw Normal View History

2018-03-26 12:14:27 +00:00
const ReportPage = require('frappejs/client/desk/reportpage');
const frappe = require('frappejs');
module.exports = class GeneralLedgerView extends ReportPage {
constructor() {
2018-03-27 13:52:59 +00:00
super({
title: frappe._('General Ledger'),
filterFields: [
{fieldtype: 'Select', options: ['', 'Invoice', 'Payment'],
label: 'Reference Type', fieldname: 'referenceType'},
{fieldtype: 'DynamicLink', references: 'referenceType',
label: 'Reference Name', fieldname: 'referenceName'},
{fieldtype: 'Link', target: 'Account', label: 'Account'},
{fieldtype: 'Link', target: 'Party', label: 'Party'},
{fieldtype: 'Date', label: 'From Date'},
{fieldtype: 'Date', label: 'To Date'}
]
});
2018-03-26 12:14:27 +00:00
2018-03-26 12:57:03 +00:00
this.method = 'general-ledger';
2018-03-26 12:14:27 +00:00
}
getColumns() {
return [
{label: 'Date', fieldtype: 'Date'},
{label: 'Account', fieldtype: 'Link'},
2018-04-19 14:31:35 +00:00
{label: 'Reference Type', fieldtype: 'Data'},
{label: 'Reference Name', fieldtype: 'Data'},
2018-03-26 12:14:27 +00:00
{label: 'Party', fieldtype: 'Link'},
{label: 'Description', fieldtype: 'Data'},
{label: 'Debit', fieldtype: 'Currency'},
{label: 'Credit', fieldtype: 'Currency'},
{label: 'Balance', fieldtype: 'Currency'}
]
}
}