mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
27aed52044
- get books to serve albiet broken - one step at a time
66 lines
1.6 KiB
JavaScript
66 lines
1.6 KiB
JavaScript
import { t } from 'fyo';
|
|
import { fyo } from 'src/initFyo';
|
|
import getCommonExportActions from '../commonExporter';
|
|
|
|
const title = t`Trial Balance`;
|
|
|
|
export default {
|
|
title: title,
|
|
method: 'trial-balance',
|
|
treeView: true,
|
|
filterFields: [
|
|
{
|
|
fieldtype: 'Date',
|
|
fieldname: 'fromDate',
|
|
label: t`From Date`,
|
|
size: 'small',
|
|
placeholder: t`From Date`,
|
|
required: 1,
|
|
default: async () => {
|
|
return (await fyo.getSingle('AccountingSettings')).fiscalYearStart;
|
|
},
|
|
},
|
|
{
|
|
fieldtype: 'Date',
|
|
size: 'small',
|
|
placeholder: t`To Date`,
|
|
fieldname: 'toDate',
|
|
label: t`To Date`,
|
|
required: 1,
|
|
default: async () => {
|
|
return (await fyo.getSingle('AccountingSettings')).fiscalYearEnd;
|
|
},
|
|
},
|
|
],
|
|
actions: getCommonExportActions('trial-balance'),
|
|
getColumns() {
|
|
const columns = [
|
|
{ label: t`Account`, fieldtype: 'Data', fieldname: 'account', width: 2 },
|
|
{
|
|
label: t`Opening (Dr)`,
|
|
fieldtype: 'Currency',
|
|
fieldname: 'openingDebit',
|
|
},
|
|
{
|
|
label: t`Opening (Cr)`,
|
|
fieldtype: 'Currency',
|
|
fieldname: 'openingCredit',
|
|
},
|
|
{ label: t`Debit`, fieldtype: 'Currency', fieldname: 'debit' },
|
|
{ label: t`Credit`, fieldtype: 'Currency', fieldname: 'credit' },
|
|
{
|
|
label: t`Closing (Dr)`,
|
|
fieldtype: 'Currency',
|
|
fieldname: 'closingDebit',
|
|
},
|
|
{
|
|
label: t`Closing (Cr)`,
|
|
fieldtype: 'Currency',
|
|
fieldname: 'closingCredit',
|
|
},
|
|
];
|
|
|
|
return columns;
|
|
},
|
|
};
|