Trimming white spaces at end of name as e.g. Baader Bank adds them to account holder name
This commit is contained in:
parent
bfc0e7c563
commit
4588fb4d20
|
@ -81,10 +81,9 @@ open class ModelMapper(
|
||||||
}
|
}
|
||||||
|
|
||||||
response.getSegmentsById<AccountInfo>(InstituteSegmentId.AccountInfo).forEach { accountInfo ->
|
response.getSegmentsById<AccountInfo>(InstituteSegmentId.AccountInfo).forEach { accountInfo ->
|
||||||
var accountHolderName = accountInfo.accountHolderName1
|
val accountHolderName = if (accountInfo.accountHolderName2.isNullOrBlank()) accountInfo.accountHolderName1.trim() // Baader Bank adds a lot of white spaces at end
|
||||||
accountInfo.accountHolderName2?.let {
|
else accountInfo.accountHolderName1.trim() + " " + accountInfo.accountHolderName2.trim()
|
||||||
accountHolderName += it // TODO: add a whitespace in between?
|
|
||||||
}
|
|
||||||
bank.customerName = accountHolderName
|
bank.customerName = accountHolderName
|
||||||
|
|
||||||
findExistingAccount(bank, accountInfo)?.let { account ->
|
findExistingAccount(bank, accountInfo)?.let { account ->
|
||||||
|
|
Loading…
Reference in New Issue