From 1e987e63ea7467a931845102890f53794b1a86c3 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 5 Aug 2020 10:44:12 +0200 Subject: [PATCH] Adjusting bank name for Deutsche Bank --- .../kotlin/net/dankito/banking/fints/FinTsClient.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt index d308f72f..19606e41 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt @@ -903,7 +903,7 @@ open class FinTsClient( protected open fun updateBankData(bank: BankData, response: Response) { response.getFirstSegmentById(InstituteSegmentId.BankParameters)?.let { bankParameters -> bank.bpdVersion = bankParameters.bpdVersion - bank.name = bankParameters.bankName + bank.name = adjustBankName(bankParameters.bankName) bank.bankCode = bankParameters.bankCode bank.countryCode = bankParameters.bankCountryCode bank.countMaxJobsPerMessage = bankParameters.countMaxJobsPerMessage @@ -942,6 +942,10 @@ open class FinTsClient( } } + protected open fun adjustBankName(bankName: String): String { + return bankName.replace("DB24-Filiale", "Deutsche Bank") // set a better name for Deutsche Bank's self title 'DB24-Filiale' + } + protected open fun updateCustomerData(customer: CustomerData, bank: BankData, response: Response) { response.getFirstSegmentById(InstituteSegmentId.BankParameters)?.let { bankParameters -> // TODO: ask user if there is more than one supported language? But it seems that almost all banks only support German.