SUMMARY I had it happened a few times that when importing transactions, that one or more transaction were not imported due to their posting date — either on the same day (although cannot confirm it) or a day before the date of the previous import. This can reasonably happen since some transactions may simply be cleared by the bank/merchant with a delay and, as such, posted retroactively with a backdate. A potential solution would be to always assume a backdated margin of -X days from the last update when executing an import. The X would match the "Match transactions within days" number, specified on Import tab in Ledger settings, thus guaranteeing no duplicates were created upon import.
Created attachment 147685 [details] OFX import options Please see attached screenshot. Such an option is already available. If it is not working, then please state that here or close it as not a bug.
Created attachment 147690 [details] attachment-7347-0.html This actually isn’t an alternative, as it sets the period of time to a fixed T minus X. If the last time I downloaded transactions was anywhere earlier than in the last X days, some transactions will be ignored. What I want is for KMM to remember when I last downloaded (which it does in default setup), but also assume extra margin of a few days, so that any backdated transactions are also included. On Wed, Mar 23, 2022 at 6:29 PM Thomas Baumgart <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=451828 > > --- Comment #1 from Thomas Baumgart <tbaumgart@kde.org> --- > Created attachment 147685 [details] > --> https://bugs.kde.org/attachment.cgi?id=147685&action=edit > OFX import options > > Please see attached screenshot. Such an option is already available. If it > is > not working, then please state that here or close it as not a bug. > > -- > You are receiving this mail because: > You reported the bug.
Thomas would know better than I, but I thought when you selected date of last update, it actually did use a date three days earlier. However, making that extra window configurable could be useful in cases like this.
Jack is right: in case you select "Last update" the start date in the request sent to the OFX server will be adjusted by 3 days prior to that. This never caused any problems so far. In case we think 3 days is not enough, we can simply enlarge that to 5 or even 7 or 10 days. Duplicates btw. are detected by the current logic without problems. There is no additional logic needed. The constant subtraction for OFX is performed in MyMoneyOfxConnector::statementStartDate(). The screenshot may have caused some confusion. The selected option was by accident. I did not pay attention when I created it. I just wanted to show that we have options, and obviously the "Last update" is the one you want to use. KBanking for the HBCI protocol does exactly the same and I never missed a single transaction in the last 10+ years or so.
OK, so in that case I don't know what actually happened, as the transaction which went missing was dated one day ahead of the previous update performed. Given that we take -3 days, per your explanations, it should have been downloaded just fine. Weird!
I tend to blame such things on the phase of the moon. I'm not suer why this wasn't closed but doing so now. Obviously this can be reopened if the problem recurs.