Skip to content
Snippets Groups Projects
Unverified Commit a5a1c81e authored by Jakub Kuczys's avatar Jakub Kuczys Committed by GitHub
Browse files

:bug: (nordigen) fallback to array version of remittanceInformationUnstructured if necessary (#745)

Try falling back to `remittanceInformationUnstructuredArray.join(', ')`
when neither `debtor/creditorName` nor
`remittanceInformationUnstructured` fields are present.

Addresses a suggestion from
https://github.com/actualbudget/actual/issues/724#issuecomment-1464907064
parent 0baccfd7
No related branches found
No related tags found
No related merge requests found
......@@ -319,7 +319,9 @@ async function normalizeNordigenTransactions(transactions, acctId) {
const nameParts = [];
nameParts.push(
title(
trans.debtorName || trans.remittanceInformationUnstructured || '',
trans.debtorName ||
trans.remittanceInformationUnstructured ||
(trans.remittanceInformationUnstructuredArray || []).join(', '),
),
);
if (trans.debtorAccount && trans.debtorAccount.iban) {
......@@ -336,7 +338,9 @@ async function normalizeNordigenTransactions(transactions, acctId) {
const nameParts = [];
nameParts.push(
title(
trans.creditorName || trans.remittanceInformationUnstructured || '',
trans.creditorName ||
trans.remittanceInformationUnstructured ||
(trans.remittanceInformationUnstructuredArray || []).join(', '),
),
);
if (trans.creditorAccount && trans.creditorAccount.iban) {
......@@ -369,7 +373,9 @@ async function normalizeNordigenTransactions(transactions, acctId) {
payee: trans.payee,
account: trans.account,
date: trans.date,
notes: trans.remittanceInformationUnstructured,
notes:
trans.remittanceInformationUnstructured ||
(trans.remittanceInformationUnstructuredArray || []).join(', '),
imported_id: trans.transactionId,
imported_payee: trans.imported_payee,
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment