Skip to content

Commit

Permalink
fixed p2p/bon remittance info, moved transaction date setter
Browse files Browse the repository at this point in the history
  • Loading branch information
guglicap committed Nov 29, 2024
1 parent 8a8f65d commit dc537e5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/app-gocardless/banks/hype_hyeeit22.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export default {
accessValidForDays: 90,

normalizeTransaction(transaction, _booked) {
// PREFER valueDate
transaction.bookingDate = transaction.valueDate ?? transaction.bookingDate;

Check failure on line 14 in src/app-gocardless/banks/hype_hyeeit22.js

View workflow job for this annotation

GitHub Actions / lint

Delete `⏎`
/** Online card payments - identified by "crd" transaction code
* always start with PAGAMENTO PRESSO + <payee name>
Expand All @@ -36,9 +34,10 @@ export default {
// keep only {payment_info} portion of remittance info
// NOTE: if {payee_name} contains dashes (unlikely / impossible?), this probably gets bugged!
let infoIdx =
transaction.remittanceInformationUnstructured.indexOf(' - ') + 1;
transaction.remittanceInformationUnstructured.indexOf(' - ') + 3;
transaction.remittanceInformationUnstructured =
transaction.remittanceInformationUnstructured.slice(infoIdx).trim();
infoIdx == -1 ? transaction.remittanceInformationUnstructured :

Check failure on line 39 in src/app-gocardless/banks/hype_hyeeit22.js

View workflow job for this annotation

GitHub Actions / lint

Replace `·?·transaction.remittanceInformationUnstructured·:` with `⏎··········?·transaction.remittanceInformationUnstructured`
transaction.remittanceInformationUnstructured.slice(infoIdx).trim();

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

View workflow job for this annotation

GitHub Actions / lint

Insert `·:`
}
/**
* CONVERT ESCAPED UNICODE TO CODEPOINTS
Expand Down Expand Up @@ -72,7 +71,7 @@ export default {
return {
...transaction,
payeeName: formatPayeeName(transaction),
date: transaction.bookingDate || transaction.valueDate,
date: transaction.valueDate || transaction.bookingDate,
};
},
};

0 comments on commit dc537e5

Please sign in to comment.