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 521da432..95e9f6af 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 @@ -7,7 +7,7 @@ import net.codinux.banking.client.model.config.NoArgConstructor open class AccountTransaction( val amount: Amount = Amount.Zero, val currency: String, - val reference: String, // Alternative: purpose (or Remittance information) + val unparsedReference: String, // Alternative: purpose (or Remittance information) /** * Transaction date (Buchungstag) - der Tag, an dem ein Zahlungsvorgang in das System einer Bank eingegangen ist. @@ -62,5 +62,9 @@ open class AccountTransaction( var category: String? = null, var notes: String? = null, ) { + + val reference: String + get() = sepaReference ?: unparsedReference + 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