mirror of
https://github.com/frappe/books.git
synced 2024-12-24 11:55:46 +00:00
562b4759e0
- PnL & Balance Sheet - Search Keyboard Navigation
47 lines
951 B
JavaScript
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;
|
|
}
|
|
};
|