From 85b66aa040d6bad9d0e9df2f28ec4d004b23f96b Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 3 Sep 2024 22:23:52 +0200 Subject: [PATCH] Also implemented an identifier for AccountTransaction --- .../net/codinux/banking/client/model/AccountTransaction.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/AccountTransaction.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/AccountTransaction.kt index 95e9f6af..98e79663 100644 --- a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/AccountTransaction.kt +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/AccountTransaction.kt @@ -66,5 +66,9 @@ open class AccountTransaction( val reference: String get() = sepaReference ?: unparsedReference + open val identifier by lazy { + "$amount $currency $bookingDate $valueDate $unparsedReference $sepaReference $otherPartyName $otherPartyBankCode $otherPartyAccountId" + } + override fun toString() = "${valueDate.dayOfMonth}.${valueDate.monthNumber}.${valueDate.year} ${amount.toString().padStart(4, ' ')} ${if (currency == "EUR") "€" else currency} ${otherPartyName ?: ""} - $reference" } \ No newline at end of file