2018-03-26 17:44:27 +05:30
|
|
|
const ReportPage = require('frappejs/client/desk/reportpage');
|
|
|
|
const frappe = require('frappejs');
|
|
|
|
|
|
|
|
module.exports = class GeneralLedgerView extends ReportPage {
|
|
|
|
constructor() {
|
2018-03-27 19:22:59 +05:30
|
|
|
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 17:44:27 +05:30
|
|
|
|
2018-03-26 18:27:03 +05:30
|
|
|
this.method = 'general-ledger';
|
2018-03-26 17:44:27 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
getColumns() {
|
|
|
|
return [
|
|
|
|
{label: 'Date', fieldtype: 'Date'},
|
|
|
|
{label: 'Account', fieldtype: 'Link'},
|
|
|
|
{label: 'Party', fieldtype: 'Link'},
|
|
|
|
{label: 'Description', fieldtype: 'Data'},
|
|
|
|
{label: 'Debit', fieldtype: 'Currency'},
|
|
|
|
{label: 'Credit', fieldtype: 'Currency'},
|
|
|
|
{label: 'Balance', fieldtype: 'Currency'}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|