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 {
|
2018-07-14 14:26:18 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
title: frappe._('General Ledger'),
|
2019-02-18 05:42:04 +00:00
|
|
|
filterFields: [{
|
2018-07-14 14:26:18 +00:00
|
|
|
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-07-14 14:26:18 +00:00
|
|
|
this.method = 'general-ledger';
|
|
|
|
}
|
2018-03-26 12:14:27 +00:00
|
|
|
|
2018-07-14 14:26:18 +00:00
|
|
|
getColumns() {
|
2019-02-18 05:42:04 +00:00
|
|
|
return [{
|
|
|
|
label: 'Date',
|
|
|
|
fieldtype: 'Date'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Account',
|
|
|
|
fieldtype: 'Link'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Debit',
|
|
|
|
fieldtype: 'Currency'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Credit',
|
|
|
|
fieldtype: 'Currency'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Balance',
|
|
|
|
fieldtype: 'Currency'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Reference Type',
|
|
|
|
fieldtype: 'Data'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Reference Name',
|
|
|
|
fieldtype: 'Data'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Party',
|
|
|
|
fieldtype: 'Link'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Description',
|
|
|
|
fieldtype: 'Data'
|
|
|
|
}
|
2018-07-14 14:26:18 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
};
|