2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/reports/BankReconciliation/viewConfig.js
18alantom 1a8a23d2a2 build(electron): bump electron to 15.3.0
- refactor Common Js imports to ES6
2021-11-05 14:31:35 +05:30

130 lines
2.7 KiB
JavaScript

const title = 'Bank Reconciliation';
import ImportWizard from '../../src/components/ImportWizart';
import BankReconciliationImport from './BankReconciliationImport';
export default {
title: title,
method: 'bank-reconciliation',
filterFields: [
{
fieldtype: 'Link',
target: 'Account',
size: 'small',
placeholder: 'Payment Account',
label: 'Payment Account',
fieldname: 'paymentAccount',
getFilters: () => {
return {
accountType: 'Bank',
isGroup: 0,
};
},
},
{
fieldtype: 'Link',
target: 'Party',
size: 'small',
label: 'Party',
placeholder: 'Party',
fieldname: 'party',
},
{
fieldtype: 'Date',
size: 'small',
placeholder: 'From Date',
label: 'From Date',
fieldname: 'fromDate',
},
{
fieldtype: 'Date',
size: 'small',
placeholder: 'To Date',
label: 'To Date',
fieldname: 'toDate',
},
],
linkFields: [
{
label: 'Reconcile',
type: 'secondary',
condition: (report) => report.currentFilters.paymentAccount,
action: async (report) => {
report.$modal.show({
modalProps: {
title: `Import Bank Account Statement`,
noFooter: true,
},
component: ImportWizard,
props: {
importHandler: BankReconciliationImport.fileImportHandler,
report,
},
});
},
},
{
label: 'Clear Filters',
type: 'secondary',
action: async (report) => {
await report.getReportData({});
report.usedToReRender += 1;
},
},
],
getColumns() {
return [
{
label: 'Posting Date',
fieldtype: 'Date',
fieldname: 'date',
},
{
label: 'Payment Account',
fieldtype: 'Link',
},
{
label: 'Debit',
fieldtype: 'Currency',
},
{
label: 'Credit',
fieldtype: 'Currency',
},
{
label: 'Balance',
fieldtype: 'Currency',
},
{
label: 'Ref/Cheque ID',
fieldtype: 'Data',
fieldname: 'referenceId',
},
{
label: 'Clearance Date',
fieldtype: 'Date',
fieldname: 'clearanceDate',
},
{
label: 'Ref. Type',
fieldtype: 'Data',
fieldname: 'referenceType',
},
{
label: 'Ref. Name',
fieldtype: 'Data',
fieldname: 'referenceName',
},
{
label: 'Ref. Date',
fieldtype: 'Date',
fieldname: 'referenceDate',
},
{
label: 'Party',
fieldtype: 'Link',
},
];
},
};