A local-first personal finance app
Improve GoCardless adapter for ING (Romania) (#405)
spideraxale3101fb86bdc
diff --git a/src/app-gocardless/bank-factory.js b/src/app-gocardless/bank-factory.jsindex 15c09c73a7..4bc99b441c 100644--- a/src/app-gocardless/bank-factory.js+++ b/src/app-gocardless/bank-factory.js@@ -30,9 +30,9 @@ export const banks = [DanskeBankDabNO22,EasybankBawaatww,Fortuneo,+ IngIngbrobu,IngIngddeff,IngPlIngbplpw,- IngIngbrobu,MbankRetailBrexplpw,NationwideNaiaGB21,NorwegianXxNorwnok1,diff --git a/src/app-gocardless/banks/ing-ingbrobu.js b/src/app-gocardless/banks/ing-ingbrobu.jsindex 9b99c0939a..bbf39b6f4e 100644--- a/src/app-gocardless/banks/ing-ingbrobu.js+++ b/src/app-gocardless/banks/ing-ingbrobu.js@@ -13,12 +13,11 @@ export default {//For booked transactions, this can be set to the internalTransactionId//For pending transactions, this needs to be removed for them to show up in Actual- //For deduplication to work, payeeName needs to be standardized.- //And converted from a pending transaction form ("payeeName":"Card no: xxxxxxxxxxxx1111"') to a booked transaction form ("payeeName":"Card no: Xxxx Xxxx Xxxx 1111")+ //For deduplication to work better, payeeName needs to be standardized+ //and converted from a pending transaction form ("payeeName":"Card no: xxxxxxxxxxxx1111"') to a booked transaction form ("payeeName":"Card no: Xxxx Xxxx Xxxx 1111")if (transaction.transactionId === 'NOTPROVIDED') {if (booked) {transaction.transactionId = transaction.internalTransactionId;-if (transaction.remittanceInformationUnstructured.toLowerCase()@@ -26,6 +25,10 @@ export default {) {transaction.creditorName =transaction.remittanceInformationUnstructured.split(',')[0];+ //Catch all case for other types of payees+ } else {+ transaction.creditorName =+ transaction.remittanceInformationUnstructured;}} else {transaction.transactionId = null;@@ -39,7 +42,14 @@ export default {/x{4}/g,'Xxxx ',);+ //Catch all case for other types of payees+ } else {+ transaction.creditorName =+ transaction.remittanceInformationUnstructured;}+ //Remove remittanceInformationUnstructured from pending transactions, so the `notes` field remains empty (there is no merchant information)+ //Once booked, the right `notes` (containing the merchant) will be populated+ transaction.remittanceInformationUnstructured = null;}}diff --git a/upcoming-release-notes/405.md b/upcoming-release-notes/405.mdnew file mode 100644index 0000000000..1c628f6e09--- /dev/null+++ b/upcoming-release-notes/405.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [spideraxal]+---++Modified GoCardless Integration for ING (Romania) so that the `notes` field will be updated once a transaction gets booked.\ No newline at end of file