Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISYBANK_ITBBITMM should prefer valueDate over bookingDate #510

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app-gocardless/bank-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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';
Expand Down Expand Up @@ -44,6 +45,7 @@ export const banks = [
IngIngbrobu,
IngIngddeff,
IngPlIngbplpw,
IsyBankItbbitmm,
KBCkredbebb,
MbankRetailBrexplpw,
NationwideNaiaGB21,
Expand Down
16 changes: 16 additions & 0 deletions src/app-gocardless/banks/isybank-itbbitmm.js
Original file line number Diff line number Diff line change
@@ -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);
},
};
6 changes: 6 additions & 0 deletions upcoming-release-notes/510.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [matt-fidd]
---

GoCardless: `ISYBANK_ITBBITMM` should prefer valueDate over bookingDate