2019-02-18 05:42:04 +00:00
|
|
|
const title = 'Bank Reconciliation';
|
2021-11-04 10:31:26 +00:00
|
|
|
import ImportWizard from '../../src/components/ImportWizart';
|
|
|
|
import BankReconciliationImport from './BankReconciliationImport';
|
|
|
|
|
|
|
|
export default {
|
2019-02-18 05:42:04 +00:00
|
|
|
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',
|
2021-11-04 10:31:26 +00:00
|
|
|
isGroup: 0,
|
2019-07-22 09:56:30 +00:00
|
|
|
};
|
2021-11-04 10:31:26 +00:00
|
|
|
},
|
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',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'party',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'fromDate',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'toDate',
|
|
|
|
},
|
2019-02-18 05:42:04 +00:00
|
|
|
],
|
2019-08-14 07:43:49 +00:00
|
|
|
linkFields: [
|
2019-09-03 09:43:16 +00:00
|
|
|
{
|
|
|
|
label: 'Reconcile',
|
|
|
|
type: 'secondary',
|
2021-11-04 10:31:26 +00:00
|
|
|
condition: (report) => report.currentFilters.paymentAccount,
|
|
|
|
action: async (report) => {
|
2019-09-03 09:43:16 +00:00
|
|
|
report.$modal.show({
|
|
|
|
modalProps: {
|
|
|
|
title: `Import Bank Account Statement`,
|
2021-11-04 10:31:26 +00:00
|
|
|
noFooter: true,
|
2019-09-03 09:43:16 +00:00
|
|
|
},
|
2021-11-04 10:31:26 +00:00
|
|
|
component: ImportWizard,
|
2019-09-03 09:43:16 +00:00
|
|
|
props: {
|
2021-11-04 10:31:26 +00:00
|
|
|
importHandler: BankReconciliationImport.fileImportHandler,
|
|
|
|
report,
|
|
|
|
},
|
2019-09-03 09:43:16 +00:00
|
|
|
});
|
2021-11-04 10:31:26 +00:00
|
|
|
},
|
2019-09-03 09:43:16 +00:00
|
|
|
},
|
2019-08-14 07:43:49 +00:00
|
|
|
{
|
|
|
|
label: 'Clear Filters',
|
|
|
|
type: 'secondary',
|
2021-11-04 10:31:26 +00:00
|
|
|
action: async (report) => {
|
2019-08-14 07:43:49 +00:00
|
|
|
await report.getReportData({});
|
|
|
|
report.usedToReRender += 1;
|
2021-11-04 10:31:26 +00:00
|
|
|
},
|
|
|
|
},
|
2019-08-14 07:43:49 +00:00
|
|
|
],
|
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',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'date',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Payment Account',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldtype: 'Link',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Debit',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldtype: 'Currency',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Credit',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldtype: 'Currency',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Balance',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldtype: 'Currency',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
2019-09-03 09:43:16 +00:00
|
|
|
{
|
|
|
|
label: 'Ref/Cheque ID',
|
|
|
|
fieldtype: 'Data',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'referenceId',
|
2019-09-03 09:43:16 +00:00
|
|
|
},
|
2019-07-24 09:32:53 +00:00
|
|
|
{
|
|
|
|
label: 'Clearance Date',
|
|
|
|
fieldtype: 'Date',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'clearanceDate',
|
2019-07-24 09:32:53 +00:00
|
|
|
},
|
2019-02-18 05:42:04 +00:00
|
|
|
{
|
|
|
|
label: 'Ref. Type',
|
|
|
|
fieldtype: 'Data',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'referenceType',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Ref. Name',
|
|
|
|
fieldtype: 'Data',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'referenceName',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Ref. Date',
|
|
|
|
fieldtype: 'Date',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldname: 'referenceDate',
|
2019-02-18 05:42:04 +00:00
|
|
|
},
|
2019-07-24 09:32:53 +00:00
|
|
|
|
2019-02-18 05:42:04 +00:00
|
|
|
{
|
|
|
|
label: 'Party',
|
2021-11-04 10:31:26 +00:00
|
|
|
fieldtype: 'Link',
|
|
|
|
},
|
2019-02-18 05:42:04 +00:00
|
|
|
];
|
2021-11-04 10:31:26 +00:00
|
|
|
},
|
2019-02-18 05:42:04 +00:00
|
|
|
};
|