Prevent account fallback if name is defined in formatPayeeName (#429)

* Prevent account fallback if name is defined

* Update realease-notes

* Add comment
This commit is contained in:
Rubén Martínez Hostyn
2024-08-29 23:10:55 +02:00
committed by GitHub
parent 3b26aa05b5
commit 446f40714d
2 changed files with 10 additions and 2 deletions

View File

@@ -21,6 +21,10 @@ export const formatPayeeName = (trans) => {
// use the correct name field if it was found
// if not, use whatever we can find
// if the primary name option is set, prevent the account from falling back
account = name ? account : trans.debtorAccount || trans.creditorAccount;
name =
name ||
trans.debtorName ||
@@ -29,8 +33,6 @@ export const formatPayeeName = (trans) => {
(trans.remittanceInformationUnstructuredArray || []).join(', ') ||
trans.additionalInformation;
account = account || trans.debtorAccount || trans.creditorAccount;
if (name) {
nameParts.push(title(name));
}

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [hostyn]
---
Prevent account fallback if name is defined in formatPayeeName