From d98a77bc1d99c41af6d9a9b9c677aea977c05fef Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 18 Sep 2024 00:19:22 +0200 Subject: [PATCH] Showing also transaction (direct debit) details --- .../codinux/banking/ui/forms/SectionHeader.kt | 2 +- .../AccountTransactionDetailsScreen.kt | 48 +++++++++++++++++-- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/SectionHeader.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/SectionHeader.kt index b73fff7..a1acd26 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/SectionHeader.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/SectionHeader.kt @@ -22,7 +22,7 @@ fun SectionHeader(title: String, topPadding: Boolean = true) { } }, color = Colors.CodinuxSecondaryColor, - fontSize = 15.sp + fontSize = 16.sp ) } \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/AccountTransactionDetailsScreen.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/AccountTransactionDetailsScreen.kt index ca1e0a7..534e80b 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/AccountTransactionDetailsScreen.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/AccountTransactionDetailsScreen.kt @@ -26,6 +26,14 @@ fun AccountTransactionDetailsScreen(transaction: AccountTransactionEntity, onClo val showColoredAmounts = DI.uiSettings.showColoredAmounts.collectAsState() + val hasDetailedValues = transaction.customerReference != null || + transaction.endToEndReference != null || transaction.mandateReference != null + || transaction.creditorIdentifier != null || transaction.originatorsIdentificationCode != null + || transaction.compensationAmount != null || transaction.originalAmount != null + || transaction.deviantOriginator != null || transaction.deviantRecipient != null + || transaction.referenceWithNoSpecialType != null + || transaction.journalNumber != null || transaction.textKeyAddition != null + FullscreenViewBase("Umsatzdetails", onClosed = onClosed) { SelectionContainer { @@ -41,16 +49,16 @@ fun AccountTransactionDetailsScreen(transaction: AccountTransactionEntity, onClo LabelledValue("IBAN", transaction.otherPartyAccountId ?: "") } - Column(Modifier.fillMaxWidth().padding(top = 8.dp)) { + Column(Modifier.fillMaxWidth()) { + SectionHeader("Betrag, Datum und Verwendungszweck") + LabelledValue("Betrag", formatUtil.formatAmount(transaction.amount, transaction.currency), formatUtil.getColorForAmount(transaction.amount, showColoredAmounts.value)) - LabelledValue("Verwendungszweck", transaction.reference ?: "") - } - - Column(Modifier.fillMaxWidth().padding(top = 24.dp)) { LabelledValue("Buchungstext", transaction.postingText ?: "") + LabelledValue("Verwendungszweck", transaction.reference ?: "") + LabelledValue("Buchungsdatum", formatUtil.formatDate(transaction.bookingDate)) LabelledValue("Wertstellungsdatum", formatUtil.formatDate(transaction.valueDate)) @@ -63,6 +71,36 @@ fun AccountTransactionDetailsScreen(transaction: AccountTransactionEntity, onClo LabelledValue("Tagesendsaldo", formatUtil.formatAmount(it, accountCurrency)) } } + + if (hasDetailedValues) { + Column(Modifier.fillMaxWidth()) { + SectionHeader("(Lastschrift-)Details") + + LabelledValue("Kundenreferenz", transaction.customerReference) + LabelledValue("Bankreferenz", transaction.bankReference) + LabelledValue("Währungsart und Umsatzbetrag in Ursprungswährung", transaction.furtherInformation) + + LabelledValue("Ende-zu-Ende Referenz", transaction.endToEndReference) + LabelledValue("Mandatsreferenz", transaction.mandateReference) + LabelledValue("Gläubiger-Identifikationsnummer", transaction.creditorIdentifier) + LabelledValue("Kennung des Auftraggebers", transaction.originatorsIdentificationCode) + + LabelledValue("Betrag der ursprünglichen Lastschrift", transaction.originalAmount) + LabelledValue("Rücklastschrift Auslagenersatz und Bearbeitungsprovision", transaction.compensationAmount) + LabelledValue("Abweichender Überweisender oder Zahlungsempfänger", transaction.deviantOriginator) + LabelledValue("Abweichender Zahlungsempfänger oder Zahlungspflichtiger", transaction.deviantRecipient) + LabelledValue("Verwendungszweck ohne spezielle Bedeutung", transaction.referenceWithNoSpecialType) + + LabelledValue("Auszugsnummer", transaction.statementNumber?.toString()) + LabelledValue("Blattnummer", transaction.sheetNumber?.toString()) + + LabelledValue("Primanoten-Nr.", transaction.journalNumber) +// LabelledValue("Kundenreferenz", transaction.textKeyAddition) + + LabelledValue("Referenznummer", transaction.orderReferenceNumber) + LabelledValue("Bezugsreferenz", transaction.referenceNumber) + } + } } } }