diff --git a/src/app-gocardless/bank-factory.js b/src/app-gocardless/bank-factory.js index aaa4f9304..d45879a2d 100644 --- a/src/app-gocardless/bank-factory.js +++ b/src/app-gocardless/bank-factory.js @@ -14,6 +14,7 @@ import IngIngbrobu from './banks/ing-ingbrobu.js'; import IngIngddeff from './banks/ing-ingddeff.js'; import IngPlIngbplpw from './banks/ing-pl-ingbplpw.js'; import IntegrationBank from './banks/integration-bank.js'; +import IsyBankItbbitmm from './banks/isybank-itbbitmm.js'; import KBCkredbebb from './banks/kbc_kredbebb.js'; import MbankRetailBrexplpw from './banks/mbank-retail-brexplpw.js'; import NationwideNaiaGB21 from './banks/nationwide-naiagb21.js'; @@ -46,6 +47,7 @@ export const banks = [ IngIngbrobu, IngIngddeff, IngPlIngbplpw, + IsyBankItbbitmm, KBCkredbebb, MbankRetailBrexplpw, NationwideNaiaGB21, diff --git a/src/app-gocardless/banks/isybank-itbbitmm.js b/src/app-gocardless/banks/isybank-itbbitmm.js new file mode 100644 index 000000000..a6685ccae --- /dev/null +++ b/src/app-gocardless/banks/isybank-itbbitmm.js @@ -0,0 +1,16 @@ +import Fallback from './integration-bank.js'; + +/** @type {import('./bank.interface.js').IBank} */ +export default { + ...Fallback, + + institutionIds: ['ISYBANK_ITBBITMM'], + + // It has been reported that valueDate is more accurate than booking date + // when it is provided + normalizeTransaction(transaction, booked) { + transaction.bookingDate = transaction.valueDate ?? transaction.bookingDate; + + return Fallback.normalizeTransaction(transaction, booked); + }, +}; diff --git a/upcoming-release-notes/510.md b/upcoming-release-notes/510.md new file mode 100644 index 000000000..9f91704e4 --- /dev/null +++ b/upcoming-release-notes/510.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [matt-fidd] +--- + +GoCardless: `ISYBANK_ITBBITMM` should prefer valueDate over bookingDate