Updating lastAccountUpdateTime also when have been retrieved
This commit is contained in:
parent
3aa0edfb34
commit
62aa04a667
|
@ -92,9 +92,9 @@ open class FinTsModelMapper {
|
||||||
bankAccount.retrievedTransactionsFrom = accountTransactionsResponse.retrievedTransactionsFrom
|
bankAccount.retrievedTransactionsFrom = accountTransactionsResponse.retrievedTransactionsFrom
|
||||||
}
|
}
|
||||||
|
|
||||||
val retrievalTime = if (retrieveTransactionsTo == null) accountTransactionsResponse.retrievalTime
|
val retrievalTime = accountTransactionsResponse.retrievalTime
|
||||||
else retrieveTransactionsTo.atTime(0, 0).toInstant(TimeZone.EuropeBerlin)
|
if (retrieveTransactionsTo == null && (bankAccount.lastAccountUpdateTime == null || bankAccount.lastAccountUpdateTime!! <= retrievalTime || // if retrieveTransactionsTo is set, then we don't retrieve all current transactions -> don't set lastAccountUpdateTime
|
||||||
if (bankAccount.lastAccountUpdateTime == null || bankAccount.lastAccountUpdateTime!! <= retrievalTime) { // if retrieveTransactionsTo is set it may is older than current account's lastTransactionsRetrievalTime
|
(bankAccount.supportsRetrievingTransactions == false && accountTransactionsResponse.statementOfHoldings.isNotEmpty()))) { // TODO: really check for supportsRetrievingTransactions == false if statementOfHoldings are set? Are there really accounts that support HKWPD and HKKAZ?
|
||||||
bankAccount.lastAccountUpdateTime = retrievalTime
|
bankAccount.lastAccountUpdateTime = retrievalTime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,10 @@ open class BankAccount(
|
||||||
|
|
||||||
open var retrievedTransactionsFrom: LocalDate? = null
|
open var retrievedTransactionsFrom: LocalDate? = null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gibt wider, wann zuletzt aktuelle Kontoumsätze, d.h. [net.dankito.banking.client.model.parameter.GetAccountDataParameter.retrieveTransactionsTo]
|
||||||
|
* war nicht gesetzt, oder aktuelle [StatementOfHoldings] empfangen wurden.
|
||||||
|
*/
|
||||||
open var lastAccountUpdateTime: Instant? = null
|
open var lastAccountUpdateTime: Instant? = null
|
||||||
|
|
||||||
open var bookedTransactions: List<AccountTransaction> = listOf()
|
open var bookedTransactions: List<AccountTransaction> = listOf()
|
||||||
|
|
Loading…
Reference in New Issue