diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankAccount.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankAccount.kt index 881a8f5f..54bb34c5 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankAccount.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankAccount.kt @@ -40,9 +40,11 @@ open class BankAccount @JvmOverloads constructor( open var technicalId: String = UUID.random() + open var userSetDisplayName: String? = null + open val displayName: String get() { - return productName ?: subAccountNumber ?: identifier + return userSetDisplayName ?: productName ?: subAccountNumber ?: identifier } diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/Customer.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/Customer.kt index 00f1df96..4bcfb667 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/Customer.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/Customer.kt @@ -43,8 +43,11 @@ open class Customer( get() = tanMedia.sortedByDescending { it.status == TanMediumStatus.Used } + open var userSetDisplayName: String? = null + open val displayName: String - get() = bankName + get() = userSetDisplayName ?: bankName + open val balance: BigDecimal get() = accounts.map { it.balance }.sum()