Bug 437261 - The reconciliation history does not support mid-day reconciliation
Summary: The reconciliation history does not support mid-day reconciliation
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: 5.1.1
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-17 15:46 UTC by Ralf Habacker
Modified: 2023-01-29 13:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (27.23 KB, text/xml)
2021-05-17 15:46 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2021-05-17 15:46:16 UTC
Created attachment 138513 [details]
testcase

STEPS TO REPRODUCE
1. download kmymoney from https://binary-factory.kde.org/job/KMyMoney_Release_win64/
2. unpack archive, start kmymoney and open the appended file
3. Open ledger of checking account

OBSERVED RESULT
The reconciled balance is displayed after the transaction of statement page 3.1

EXPECTED RESULT
It should be displayed after statement page 2.1


SOFTWARE/OS VERSIONS
Windows: 10 
KDE Frameworks Version: 5.74 
Qt Version: 5.14

ADDITIONAL INFORMATION
The reason for this is that currently entries in the reconciliation history can only be defined for all transactions of a day, which only works in special cases. In all cases where debits, transfers and or credits take place during the day after retrieving a bank statement, these would be incorrectly included, as can be seen in the attached test case.
Comment 1 Thomas Baumgart 2021-05-21 06:45:08 UTC
The current implementation does not support mid-day statements. To support it, the reconciliation history needs to be tied to a specific transaction id instead of a post or entry date.
Comment 2 Jack 2021-05-21 13:24:44 UTC
That would also require that there is a fixed sort order, and that the transaction id's are monotonically increasing in time.  However, that is likely the case if they are based on a date/timestamp.
I suppose the sorting is not absolutely required, but then the UI should be modified so that it is absolutely clear to the user which transactions are before and which are after the transaction used as the last to be reconciled.
Comment 3 Dawid Wróbel 2021-05-21 14:53:47 UTC
Just out of curiosity, how does GnuCash do it? Anyone has any experience with it?
Comment 4 Ralf Habacker 2021-05-26 07:18:31 UTC
(In reply to Dawid Wróbel from comment #3)
> Just out of curiosity, how does GnuCash do it? 

gnucash uses posting and entry data with time as the date with seconds accuracy

 <trn:date-posted>
    <ts:date>2021-05-25 10:59:00 +0000</ts:date>
  </trn:date-posted>
  <trn:date-entered>
    <ts:date>2021-05-25 13:02:57 +0000</ts:date>
  </trn:date-entered>

Each split of a reconciled transaction has a reconciliation status and a timestamp with date, time and time zone

   <trn:split>
      <split:id type="guid">faedaac3b6ad489590f5d202268cc66f</split:id>
      <split:reconciled-state>y</split:reconciled-state>
      <split:reconcile-date>
        <ts:date>2021-05-25 21:59:59 +0000</ts:date>
      </split:reconcile-date>
 </trn:split>

so that mid-day reconciliations are possible (but not supported by the ui yet)

Since each split of a transaction assigned to an account and reconciled contains a reconcile date, this is used to map a reconcilation history.

Unlike kmymoney, gnucash does not store reconciliation balances, which are calculated from the individual transactions.