Also updating retrievedTransactionsFrom on BankAccount

This commit is contained in:
dankito 2024-09-03 22:31:05 +02:00
parent 7f60e02340
commit 36391c8f20
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,10 @@ open class FinTs4kMapper {
if (finTsBankAccount.lastTransactionsRetrievalTime != null) {
account.lastTransactionsRetrievalTime = finTsBankAccount.lastTransactionsRetrievalTime
}
if (account.retrievedTransactionsFrom == null || (finTsBankAccount.retrievedTransactionsFrom != null
&& account.retrievedTransactionsFrom!! < finTsBankAccount.retrievedTransactionsFrom!!)) {
account.retrievedTransactionsFrom = finTsBankAccount.retrievedTransactionsFrom
}
Response.success(GetTransactionsResponse(account, mapAmount(finTsBankAccount.balance), mapBookedTransactions(finTsBankAccount), emptyList(),
finTsBankAccount.lastTransactionsRetrievalTime ?: Clock.System.now(), param.retrieveTransactionsFrom, param.retrieveTransactionsTo))