Summary: | OFX import Online Statement Balance error | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | maps |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | benoitg, he7d3r, onet.cristian, ostroffjh, ralf.habacker, rmanoj.oss |
Priority: | NOR | ||
Version: | 4.6.3 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://commits.kde.org/kmymoney/67d663f4ea27320d73cc72c9c6743316fb12986b | Version Fixed In: | 4.8.1,5.0.0 |
Sentry Crash Report: | |||
Bug Depends on: | 381818 | ||
Bug Blocks: | |||
Attachments: |
Screenshot showing the OFX import bug in ledger view
OFX file to reproduce the error Screenshot showing the OFX import bug in ledger view kmymoney test file |
Description
maps
2013-08-14 07:34:13 UTC
One quick question - what is the opening date of the account? You can't edit any transactions prior to that date. (You shouldn't be able to create them either, but it does happen.) Also, what type of transaction does that "uneditable register entry" seem to be? Is it just a deposit, or has it been made the opening balance of the account? On the other hand, if that entry is just the warning that shows up at the bottom of the ledger, it is not really an entry - it is just a notice that will change when you do the next OFX import. I can confirm this observation too. I see a red notice at the bottom of the ledger showing the balance as of the "future" date well past the last transaction. It would be nice to adjust the date on that red, indelible 'transaction' in the ledger. Currently, the date shown is that for the last imported transaction even though the DTASOF field shows the 'future' date. My model for using kmymoney is to import all transactions for the previous month on the first weekend of the current month. Hence there will be a few days in the current month in which there have been account transactions, and hence the latest balance in the OFX download will most likely be different from the balance at the end of the imported transactions. The reported usage, above, seems to be following a similar approach, ending with a transaction well in the past, to align to some particular interval. To have this red, indelible transaction with the wrong date catch my eye in the ledger view is quite distracting. Created attachment 85137 [details]
Screenshot showing the OFX import bug in ledger view
Created attachment 85138 [details]
OFX file to reproduce the error
Create an account with opening balance $5857.66 as of 01 Jan 2014
Import this OFX file
See the last, red, indelible ledger entry with wrong statement balance DATE
Created attachment 85139 [details]
Screenshot showing the OFX import bug in ledger view
Effect of the OFX attachment, when imported.
I confirm this. This is actually a bug in libOFX since ofxdump produces this result: ofx_proc_statement(): Currency: USD Account ID: 000000000 3243783275 Start date of this statement: Wed Jan 1 08:00:00 2014 EET End date of this statement: Fri Jan 31 07:00:00 2014 EET Ledger balance: 8697.95 Available balance: 8697.95 It's even stranger that libOFX has the following field 'ledger_balance_date' but it's never set so KMyMoney can't detect that the balance date is different from the last transaction date. Need to notify upstream about this. Ok, I just fixed ledger_balance_date and available_balance_date in libofx 0.9.10. Assuming kmymoney actually uses it, it should fix part of the bug. Howewer, kmymoney should make some changes to never assume the balance at some specific date unless the date is available. 1) If the date isn't available for some reason, the meaning of the balance is too ambiguous to use for accounting purposes. 2) Will avoid using the balance until 0.9.10 percolates to end user machines, which may take a year or two. (In reply to Benoit Grégoire from comment #8) > Ok, I just fixed ledger_balance_date and available_balance_date in libofx > 0.9.10. Assuming kmymoney actually uses it, it should fix part of the bug. > > Howewer, kmymoney should make some changes to never assume the balance at > some specific date unless the date is available. 1) If the date isn't > available for some reason, the meaning of the balance is too ambiguous to > use for accounting purposes. 2) Will avoid using the balance until 0.9.10 > percolates to end user machines, which may take a year or two. Thanks Benoit for fixing libofx and for the suggestions for how should KMyMoney handle this. I'll take a look at it and see what we can do. I would like to be able to fix this until 4.7.0 is released. Issue is still present in 4.8.0 Git commit 67d663f4ea27320d73cc72c9c6743316fb12986b by Ralf Habacker. Committed on 01/08/2017 at 22:19. Pushed by habacker into branch '4.8'. Fix 'OFX import Online Statement Balance error' Set closing balance and end date of MyMoneyStatement from ledger_balance and ledger_balance_date only if both are present to follow libofx maintainer hint mentioned in the related bug. FIXED-IN:4.8.1 M +4 -1 kmymoney/plugins/ofximport/ofximporterplugin.cpp https://commits.kde.org/kmymoney/67d663f4ea27320d73cc72c9c6743316fb12986b Created attachment 107054 [details]
kmymoney test file
How to use:
1. Open this file
2. import the ofx file
|