diff --git a/fints4k/src/main/kotlin/net/dankito/banking/fints/FinTsClient.kt b/fints4k/src/main/kotlin/net/dankito/banking/fints/FinTsClient.kt index 7298afa0..5b857bd0 100644 --- a/fints4k/src/main/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/main/kotlin/net/dankito/banking/fints/FinTsClient.kt @@ -336,7 +336,7 @@ open class FinTsClient @JvmOverloads constructor( } return GetTransactionsResponse(response, - bookedTransactions.sortedByDescending { it.bookingDate }, + bookedTransactions, listOf(), // TODO: implement parsing MT942 balance) } diff --git a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/LuceneConfig.kt b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/LuceneConfig.kt index 921213fc..c57c3af2 100644 --- a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/LuceneConfig.kt +++ b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/LuceneConfig.kt @@ -17,7 +17,7 @@ class LuceneConfig { const val OtherPartyAccountIdFieldName = "other_party_account_id" const val BookingDateFieldName = "booking_date" - const val BookingDateSortFieldName = "booking_date_sort" + const val DateSortFieldName = "value_date_sort" const val UsageFieldName = "usage" diff --git a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt index 834fe869..f6785d2b 100644 --- a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt +++ b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt @@ -5,7 +5,7 @@ import net.dankito.banking.LuceneConfig.Companion.AmountFieldName import net.dankito.banking.LuceneConfig.Companion.BalanceFieldName import net.dankito.banking.LuceneConfig.Companion.BankAccountIdFieldName import net.dankito.banking.LuceneConfig.Companion.BookingDateFieldName -import net.dankito.banking.LuceneConfig.Companion.BookingDateSortFieldName +import net.dankito.banking.LuceneConfig.Companion.DateSortFieldName import net.dankito.banking.LuceneConfig.Companion.BookingTextFieldName import net.dankito.banking.LuceneConfig.Companion.CurrencyFieldName import net.dankito.banking.LuceneConfig.Companion.IdFieldName @@ -74,7 +74,7 @@ open class LuceneBankingPersistence( fields.storedField(CurrencyFieldName, transaction.currency), fields.nullableStoredField(BalanceFieldName, transaction.closingBalance), // TODO: remove - fields.sortField(BookingDateSortFieldName, transaction.bookingDate) // TODO: sort by valueDate + fields.sortField(DateSortFieldName, transaction.valueDate) ) } diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt index 1208a2eb..7414bc64 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt @@ -17,7 +17,7 @@ open class AccountTransactionAdapter(protected val presenter: BankingPresenter) : ListRecyclerAdapter() { companion object { - val BookingDateFormat = DateFormat.getDateInstance(DateFormat.SHORT) + val ValueDateFormat = DateFormat.getDateInstance(DateFormat.SHORT) } @@ -35,7 +35,7 @@ open class AccountTransactionAdapter(protected val presenter: BankingPresenter) } override fun bindItemToView(viewHolder: AccountTransactionViewHolder, item: AccountTransaction) { - viewHolder.txtvwBookingDate.text = BookingDateFormat.format(item.bookingDate) + viewHolder.txtvwDate.text = ValueDateFormat.format(item.valueDate) viewHolder.txtvwBookingText.text = item.bookingText ?: "" diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt index bb082e21..1453f743 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.main.list_item_account_transaction.view.* open class AccountTransactionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - val txtvwBookingDate: TextView = itemView.txtvwBookingDate + val txtvwDate: TextView = itemView.txtvwDate val txtvwBookingText: TextView = itemView.txtvwBookingText diff --git a/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml b/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml index 437c446d..05866406 100644 --- a/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml +++ b/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml @@ -75,7 +75,7 @@ /> ): List { - return bankAccounts.flatMap { it.bookedTransactions }.sortedByDescending { it.bookingDate } // TODO: someday add unbooked transactions + return bankAccounts.flatMap { it.bookedTransactions }.sortedByDescending { it.valueDate } // TODO: someday add unbooked transactions } protected open fun getBalanceForAccounts(accounts: Collection): BigDecimal { diff --git a/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/util/AccountTransactionMapper.kt b/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/util/AccountTransactionMapper.kt index b98bdf4a..95fe4e8a 100644 --- a/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/util/AccountTransactionMapper.kt +++ b/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/util/AccountTransactionMapper.kt @@ -25,7 +25,7 @@ open class AccountTransactionMapper { open fun mapAccountTransactions(bankAccount: BankAccount, result: GVRKUms): List { - val entries = ArrayList() + val entries = mutableListOf() result.dataPerDay.forEach { btag -> btag.lines.forEach { transaction -> @@ -35,7 +35,7 @@ open class AccountTransactionMapper { log.debug("Retrieved ${result.flatData.size} accounting entries") - return entries.sortedByDescending { it.bookingDate } + return entries } protected open fun mapAccountingEntry(bankAccount: BankAccount, btag: GVRKUms.BTag, transaction: GVRKUms.UmsLine): AccountTransaction {