Skip to content

Commit

Permalink
add payeeName field for new bank
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-fidd committed May 25, 2024
1 parent 0b50035 commit a10b192
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/app-gocardless/banks/bankinter-bkbkesmm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
amountToInteger,
sortByBookingDateOrValueDate,
} from '../utils.js';
import { formatPayeeName } from '../../util/payee-name.js';

const SORTED_BALANCE_TYPE_LIST = [
'closingBooked',
Expand Down Expand Up @@ -33,14 +34,16 @@ export default {
},

normalizeTransaction(transaction, _booked) {
return {
...transaction,
debtorName: transaction.debtorName?.replaceAll(';', ' '),
creditorName: transaction.creditorName?.replaceAll(';', ' '),
remittanceInformationUnstructured:
transaction.debtorName = transaction.debtorName?.replaceAll(';', ' ');
transaction.creditorName = transaction.creditorName?.replaceAll(';', ' ');
transaction.remittanceInformationUnstructured =
transaction.remittanceInformationUnstructured

Check failure on line 40 in src/app-gocardless/banks/bankinter-bkbkesmm.js

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
.replaceAll(/\/Txt\/(\w\|)?/gi, '')

Check failure on line 41 in src/app-gocardless/banks/bankinter-bkbkesmm.js

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
.replaceAll(';', ' '),
.replaceAll(';', ' ');

Check failure on line 42 in src/app-gocardless/banks/bankinter-bkbkesmm.js

View workflow job for this annotation

GitHub Actions / lint

Delete `··`

return {
...transaction,
payeeName: formatPayeeName(transaction),
date: transaction.bookingDate || transaction.valueDate,
};
},
Expand Down

0 comments on commit a10b192

Please sign in to comment.