Matched AccountTransaction property names that ones from fints4k
This commit is contained in:
parent
adf8cfa750
commit
713bfa4b50
|
@ -5,9 +5,9 @@ import net.codinux.banking.client.model.config.NoArgConstructor
|
||||||
|
|
||||||
@NoArgConstructor
|
@NoArgConstructor
|
||||||
open class AccountTransaction(
|
open class AccountTransaction(
|
||||||
val amount: Amount = Amount.Zero,
|
val amount: Amount = Amount.Zero, // TODO: a string is really bad in UI, find a better solution
|
||||||
val currency: String,
|
val currency: String,
|
||||||
val unparsedReference: String, // Alternative: purpose (or Remittance information)
|
val reference: String, // Alternative: Remittance information, Transaction description, (payment) purpose, payment reference
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction date (Buchungstag) - der Tag, an dem ein Zahlungsvorgang in das System einer Bank eingegangen ist.
|
* Transaction date (Buchungstag) - der Tag, an dem ein Zahlungsvorgang in das System einer Bank eingegangen ist.
|
||||||
|
@ -22,52 +22,56 @@ open class AccountTransaction(
|
||||||
*/
|
*/
|
||||||
val valueDate: LocalDate,
|
val valueDate: LocalDate,
|
||||||
|
|
||||||
|
// deutsche Begriffe: "Transaktionspartei" oder "Beteiligte Partei"
|
||||||
|
// Englische: Transaction party (ist die beste Wahl für eine neutrale und übergreifende Beschreibung),
|
||||||
|
// Counterparty (ist nützlich in formellen oder finanziellen Kontexten), Participant (ist breiter gefasst, aber weniger präzise)
|
||||||
val otherPartyName: String? = null, // Alternatives: Parties involved, Transaction parties.single names: Beneficiary, Payee respectively Payer, Debtor
|
val otherPartyName: String? = null, // Alternatives: Parties involved, Transaction parties.single names: Beneficiary, Payee respectively Payer, Debtor
|
||||||
val otherPartyBankCode: String? = null,
|
val otherPartyBankCode: String? = null,
|
||||||
val otherPartyAccountId: String? = null,
|
val otherPartyAccountId: String? = null,
|
||||||
|
|
||||||
val bookingText: String? = null,
|
val postingText: String? = null,
|
||||||
val information: String? = null,
|
|
||||||
|
|
||||||
val statementNumber: Int? = null,
|
|
||||||
val sequenceNumber: Int? = null,
|
|
||||||
|
|
||||||
val openingBalance: Amount? = null,
|
val openingBalance: Amount? = null,
|
||||||
val closingBalance: Amount? = null,
|
val closingBalance: Amount? = null,
|
||||||
|
|
||||||
val endToEndReference: String? = null,
|
val statementNumber: Int? = null,
|
||||||
|
val sheetNumber: Int? = null,
|
||||||
|
|
||||||
val customerReference: String? = null,
|
val customerReference: String? = null,
|
||||||
|
val bankReference: String? = null,
|
||||||
|
val furtherInformation: String? = null,
|
||||||
|
|
||||||
|
val endToEndReference: String? = null,
|
||||||
val mandateReference: String? = null,
|
val mandateReference: String? = null,
|
||||||
val creditorIdentifier: String? = null,
|
val creditorIdentifier: String? = null,
|
||||||
val originatorsIdentificationCode: String? = null,
|
val originatorsIdentificationCode: String? = null,
|
||||||
val compensationAmount: String? = null,
|
val compensationAmount: String? = null,
|
||||||
val originalAmount: String? = null,
|
val originalAmount: String? = null,
|
||||||
val sepaReference: String? = null,
|
|
||||||
val deviantOriginator: String? = null,
|
val deviantOriginator: String? = null,
|
||||||
val deviantRecipient: String? = null,
|
val deviantRecipient: String? = null,
|
||||||
val referenceWithNoSpecialType: String? = null,
|
val referenceWithNoSpecialType: String? = null,
|
||||||
val primaNotaNumber: String? = null,
|
|
||||||
val textKeySupplement: String? = null,
|
|
||||||
|
|
||||||
val currencyType: String? = null,
|
val journalNumber: String? = null,
|
||||||
val bookingKey: String? = null,
|
val textKeyAddition: String? = null,
|
||||||
val referenceForTheAccountOwner: String? = null,
|
|
||||||
val referenceOfTheAccountServicingInstitution: String? = null,
|
|
||||||
val supplementaryDetails: String? = null,
|
|
||||||
|
|
||||||
val transactionReferenceNumber: String? = null,
|
val orderReferenceNumber: String? = null,
|
||||||
val relatedReferenceNumber: String? = null,
|
val referenceNumber: String? = null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Storno, ob die Buchung storniert wurde(?).
|
||||||
|
* Aus:
|
||||||
|
* „RC“ = Storno Haben
|
||||||
|
* „RD“ = Storno Soll
|
||||||
|
*/
|
||||||
|
val isReversal: Boolean = false,
|
||||||
|
|
||||||
var userSetDisplayName: String? = null,
|
var userSetDisplayName: String? = null,
|
||||||
var category: String? = null,
|
var category: String? = null,
|
||||||
var notes: String? = null,
|
var notes: String? = null,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val reference: String
|
|
||||||
get() = sepaReference ?: unparsedReference
|
|
||||||
|
|
||||||
open val identifier by lazy {
|
open val identifier by lazy {
|
||||||
"$amount $currency $bookingDate $valueDate $unparsedReference $sepaReference $otherPartyName $otherPartyBankCode $otherPartyAccountId"
|
"$amount $currency $bookingDate $valueDate $reference $otherPartyName $otherPartyBankCode $otherPartyAccountId"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString() = "${valueDate.dayOfMonth}.${valueDate.monthNumber}.${valueDate.year} ${amount.toString().padStart(4, ' ')} ${if (currency == "EUR") "€" else currency} ${otherPartyName ?: ""} - $reference"
|
override fun toString() = "${valueDate.dayOfMonth}.${valueDate.monthNumber}.${valueDate.year} ${amount.toString().padStart(4, ' ')} ${if (currency == "EUR") "€" else currency} ${otherPartyName ?: ""} - $reference"
|
||||||
|
|
|
@ -169,22 +169,23 @@ open class FinTs4kMapper {
|
||||||
mapAmount(transaction.amount), transaction.amount.currency.code, transaction.unparsedReference,
|
mapAmount(transaction.amount), transaction.amount.currency.code, transaction.unparsedReference,
|
||||||
transaction.bookingDate, transaction.valueDate,
|
transaction.bookingDate, transaction.valueDate,
|
||||||
transaction.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId,
|
transaction.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId,
|
||||||
transaction.bookingText, null,
|
|
||||||
transaction.statementNumber, transaction.sequenceNumber,
|
transaction.bookingText,
|
||||||
mapNullableAmount(transaction.openingBalance), mapNullableAmount(transaction.closingBalance),
|
mapNullableAmount(transaction.openingBalance), mapNullableAmount(transaction.closingBalance),
|
||||||
|
|
||||||
transaction.endToEndReference, transaction.customerReference, transaction.mandateReference,
|
transaction.statementNumber, transaction.sequenceNumber,
|
||||||
transaction.creditorIdentifier, transaction.originatorsIdentificationCode,
|
|
||||||
transaction.compensationAmount, transaction.originalAmount,
|
|
||||||
transaction.sepaReference,
|
|
||||||
transaction.deviantOriginator, transaction.deviantRecipient,
|
|
||||||
transaction.referenceWithNoSpecialType, transaction.primaNotaNumber, transaction.textKeySupplement,
|
|
||||||
|
|
||||||
transaction.currencyType, transaction.bookingKey,
|
|
||||||
transaction.referenceForTheAccountOwner, transaction.referenceOfTheAccountServicingInstitution,
|
transaction.referenceForTheAccountOwner, transaction.referenceOfTheAccountServicingInstitution,
|
||||||
transaction.supplementaryDetails,
|
transaction.supplementaryDetails,
|
||||||
|
|
||||||
transaction.transactionReferenceNumber, transaction.relatedReferenceNumber
|
transaction.endToEndReference, transaction.mandateReference,
|
||||||
|
transaction.creditorIdentifier, transaction.originatorsIdentificationCode,
|
||||||
|
transaction.compensationAmount, transaction.originalAmount,
|
||||||
|
transaction.deviantOriginator, transaction.deviantRecipient,
|
||||||
|
transaction.referenceWithNoSpecialType, transaction.primaNotaNumber, transaction.textKeySupplement,
|
||||||
|
|
||||||
|
transaction.transactionReferenceNumber, transaction.relatedReferenceNumber,
|
||||||
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
protected open fun mapNullableAmount(amount: Money?) = amount?.let { mapAmount(it) }
|
protected open fun mapNullableAmount(amount: Money?) = amount?.let { mapAmount(it) }
|
||||||
|
|
Loading…
Reference in New Issue