grindsa/dkb-robo

date_from/date_to not handled correctly in get_creditcard_transactions

githubuser3000 opened this issue · 3 comments

In function get_creditcard_transactions:
radio button filterType is set by the code correctly to:

self.dkb_br["filterType"] = 'DATE_RANGE'
self.dkb_br["postingDate"] = str(date_from)
self.dkb_br["toPostingDate"] = str(date_to)

but return values are always, like it has been set to:

self.dkb_br["filterType"] = 'PERIOD'
self.dkb_br["slSearchPeriod"] = 0

As result, the transactions returned by DKB are always since last balance accounting. date_from is not considered.

A code review shows no errors, however the results are wrong. Can anybody confirm this behavior?

I figured out the root cause. The problem occurs, if the date_to is in the future.

  • The form for account transaction has a benign reaction to this case and automatically corrects the date to today.
  • The form for creditcard transactions however reacts with an error and falls back to "filterType" = 'PERIOD'

A solution would be to always max the date_to to today.

"A solution would be to always max the date_to to today."

I think this makes sense and I believe it can be done in the library itself. Let me look into it over the weekend....

included in v0.11. Thus, I am closing this issue...