From be0b4f597ad70fc197f4feb3d2160a8afee5e0b4 Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 13 Oct 2019 19:06:39 +0200 Subject: [PATCH] Implemented sorting bookedTransactions --- .../src/main/kotlin/net/dankito/fints/FinTsClient.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt index 549c4d97..b6a8c158 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -130,7 +130,10 @@ open class FinTsClient( response.getFirstSegmentById(InstituteSegmentId.AccountTransactionsMt940)?.let { transactions -> - return GetTransactionsResponse(response, transactions.bookedTransactions, transactions.unbookedTransactions, balance) + return GetTransactionsResponse(response, + transactions.bookedTransactions.sortedByDescending { it.bookingDate }, + transactions.unbookedTransactions, + balance) } return GetTransactionsResponse(response)