hoffie / dkb-visa

DKB transaction download and conversion (CSV, QIF)
GNU Affero General Public License v3.0
56 stars 26 forks source link

to/from date takes value date and not booking date #17

Closed sbluhm closed 2 years ago

sbluhm commented 6 years ago

The command line download start date (--to-date) takes the value dates and not the booking dates. Not really sure what the intention is but from a use case perspective, it might not make sense:

1) I run this script automatically every day to download all card transactions that happened yesterday 2) These new transactions are added automatically to GnuCash so GnuCash is updated every night.

Problem: If a value date is two days ago or from last week or last month (because a supplier books very late or international transactions or whatever) or there is a refund (which is usually the value date of the original booking), I would have to download all transactions from the last X months.

Only solution I can think of, is do download all transactions from last year and then filter the file by booking date. Maybe this behaviour can be enabled by an additional flag.

Let me know what you think. Am happy to provide the fix.

hoffie commented 6 years ago

Hi,

thanks for the suggestion.

The command line download start date (--to-date) takes the value dates and not the booking dates. Not really sure what the intention is I guess there was no specific intention at all. The tool initially resembled DKB's web interface, so this simple was the most straight-forward way of implementation.

I am certainly open to pull requests for implementing this behavior. I think we should keep the current behavior as the default as people may depend on it in their scripts. I guess one could add some --booking-dates flag to switch from value dates to booking dates for example.

Kind regards, Christian

sbluhm commented 6 years ago

Hi Christian, I will see what I can do and put a pull request out.