2019-02-18 05:42:04 +00:00
|
|
|
const title = 'Bank Reconciliation';
|
|
|
|
module.exports = {
|
|
|
|
title: title,
|
|
|
|
method: 'bank-reconciliation',
|
2019-07-22 09:56:30 +00:00
|
|
|
filterFields: [
|
|
|
|
{
|
2019-02-18 05:42:04 +00:00
|
|
|
fieldtype: 'Link',
|
|
|
|
target: 'Account',
|
2019-08-14 07:43:49 +00:00
|
|
|
size: 'small',
|
|
|
|
placeholder: 'Payment Account',
|
|
|
|
label: 'Payment Account',
|
2019-07-22 09:56:30 +00:00
|
|
|
fieldname: 'paymentAccount',
|
|
|
|
getFilters: () => {
|
|
|
|
return {
|
|
|
|
accountType: 'Bank',
|
|
|
|
isGroup: 0
|
|
|
|
};
|
|
|
|
}
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
fieldtype: 'Link',
|
|
|
|
target: 'Party',
|
2019-08-14 07:43:49 +00:00
|
|
|
size: 'small',
|
2019-02-18 05:42:04 +00:00
|
|
|
label: 'Party',
|
2019-08-14 07:43:49 +00:00
|
|
|
placeholder: 'Party',
|
2019-02-18 05:42:04 +00:00
|
|
|
fieldname: 'party'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
fieldtype: 'Date',
|
2019-08-14 07:43:49 +00:00
|
|
|
size: 'small',
|
|
|
|
placeholder: 'From Date',
|
2019-02-18 05:42:04 +00:00
|
|
|
label: 'From Date',
|
|
|
|
fieldname: 'fromDate'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
fieldtype: 'Date',
|
2019-08-14 07:43:49 +00:00
|
|
|
size: 'small',
|
|
|
|
placeholder: 'To Date',
|
2019-02-18 05:42:04 +00:00
|
|
|
label: 'To Date',
|
|
|
|
fieldname: 'toDate'
|
|
|
|
}
|
|
|
|
],
|
2019-08-14 07:43:49 +00:00
|
|
|
linkFields: [
|
2019-09-03 09:43:16 +00:00
|
|
|
{
|
|
|
|
label: 'Reconcile',
|
|
|
|
type: 'secondary',
|
|
|
|
condition: report => report.currentFilters.paymentAccount,
|
|
|
|
action: async report => {
|
|
|
|
report.$modal.show({
|
|
|
|
modalProps: {
|
|
|
|
title: `Import Bank Account Statement`,
|
|
|
|
noFooter: true
|
|
|
|
},
|
|
|
|
component: require('../../src/components/ImportWizard').default,
|
|
|
|
props: {
|
|
|
|
importHandler: require('./BankReconciliationImport')
|
|
|
|
.fileImportHandler,
|
|
|
|
report
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2019-08-14 07:43:49 +00:00
|
|
|
{
|
|
|
|
label: 'Clear Filters',
|
|
|
|
type: 'secondary',
|
|
|
|
action: async report => {
|
|
|
|
await report.getReportData({});
|
|
|
|
report.usedToReRender += 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2019-02-18 05:42:04 +00:00
|
|
|
getColumns() {
|
2019-07-22 09:56:30 +00:00
|
|
|
return [
|
|
|
|
{
|
2019-02-18 05:42:04 +00:00
|
|
|
label: 'Posting Date',
|
|
|
|
fieldtype: 'Date',
|
|
|
|
fieldname: 'date'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Payment Account',
|
|
|
|
fieldtype: 'Link'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Debit',
|
|
|
|
fieldtype: 'Currency'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Credit',
|
|
|
|
fieldtype: 'Currency'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Balance',
|
|
|
|
fieldtype: 'Currency'
|
|
|
|
},
|
2019-09-03 09:43:16 +00:00
|
|
|
{
|
|
|
|
label: 'Ref/Cheque ID',
|
|
|
|
fieldtype: 'Data',
|
|
|
|
fieldname: 'referenceId'
|
|
|
|
},
|
2019-07-24 09:32:53 +00:00
|
|
|
{
|
|
|
|
label: 'Clearance Date',
|
|
|
|
fieldtype: 'Date',
|
|
|
|
fieldname: 'clearanceDate'
|
|
|
|
},
|
2019-02-18 05:42:04 +00:00
|
|
|
{
|
|
|
|
label: 'Ref. Type',
|
|
|
|
fieldtype: 'Data',
|
|
|
|
fieldname: 'referenceType'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Ref. Name',
|
|
|
|
fieldtype: 'Data',
|
|
|
|
fieldname: 'referenceName'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Ref. Date',
|
|
|
|
fieldtype: 'Date',
|
|
|
|
fieldname: 'referenceDate'
|
|
|
|
},
|
2019-07-24 09:32:53 +00:00
|
|
|
|
2019-02-18 05:42:04 +00:00
|
|
|
{
|
|
|
|
label: 'Party',
|
|
|
|
fieldtype: 'Link'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
};
|