fix(#2495): fix GoCardless transaction ID to fallback to it's own generated ID on sync (#4241)

* fix(#2495): fixed gocardless import ID

* chore: added release note

* chore: updated release note

* refactor: made condition more clear

* Revert "refactor: made condition more clear"

This reverts commit ec16c99041.

* fix: added edge case
This commit is contained in:
Bruno Ribeiro
2025-02-05 22:37:47 +00:00
committed by GitHub
parent bdf4dda3a8
commit bd063423e5
2 changed files with 13 additions and 1 deletions

View File

@@ -351,6 +351,12 @@ async function normalizeBankSyncTransactions(transactions, acctId) {
trans.cleared = Boolean(trans.booked);
let imported_id = trans.transactionId;
if (trans.cleared && !trans.transactionId && trans.internalTransactionId) {
imported_id = `${trans.account}-${trans.internalTransactionId}`;
}
const notes =
trans.remittanceInformationUnstructured ||
(trans.remittanceInformationUnstructuredArray || []).join(', ');
@@ -364,7 +370,7 @@ async function normalizeBankSyncTransactions(transactions, acctId) {
date: trans.date,
notes: notes.trim().replace('#', '##'),
category: trans.category ?? null,
imported_id: trans.transactionId,
imported_id,
imported_payee: trans.imported_payee,
cleared: trans.cleared,
},

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [NullScope]
---
Fix GoCardless transaction ID to fallback to it's own generated ID on sync