Fixed mapping unparsedReference / sepaReference to reference
This commit is contained in:
parent
f1dad3bc26
commit
b0b0fa6140
|
@ -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"
|
||||
}
|
Loading…
Reference in New Issue