2
0
mirror of https://github.com/frappe/books.git synced 2024-12-24 11:55:46 +00:00
books/reports/BalanceSheet/viewConfig.js
thefalconx33 562b4759e0 - Bug Fixes
- PnL & Balance Sheet
- Search Keyboard Navigation
2019-08-20 14:27:27 +05:30

47 lines
951 B
JavaScript

module.exports = {
title: 'Balance Sheet',
method: 'balance-sheet',
filterFields: [
{
fieldtype: 'Date',
fieldname: 'toDate',
size: 'small',
placeholder: 'ToDate',
label: 'To Date',
required: 1
},
{
fieldtype: 'Select',
size: 'small',
options: [
'Select Period...',
'Monthly',
'Quarterly',
'Half Yearly',
'Yearly'
],
label: 'Periodicity',
fieldname: 'periodicity',
default: 'Monthly'
}
],
getColumns(data) {
const columns = [
{ label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 340 }
];
if (data && data.columns) {
const currencyColumns = data.columns;
const columnDefs = currencyColumns.map(name => ({
label: name,
fieldname: name,
fieldtype: 'Currency'
}));
columns.push(...columnDefs);
}
return columns;
}
};