Bug 424674

Summary: Transaction report is missing splits in certain circumstances
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: reportsAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.1.0   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In: 5.1.1

Description Thomas Baumgart 2020-07-26 07:18:53 UTC
SUMMARY
Creating a transaction report with filter on account and transaction type to get a report of all deposits into this account, I noticed that data of a split transaction was missing in the report. Besides the deposit into this account it contained other splits.

STEPS TO REPRODUCE
1. Create the following accounts: Liability L, Credit Card C, Expense E
2. Create split transaction with the following splits: CC (-100), L(+50), E(+50)
3. Create transaction report and filter on L and type deposit. Organize by Payee

OBSERVED RESULT

Transaction of (+50) in L is not reported

EXPECTED RESULT

Transaction of (+50) in L is reported
Comment 1 Thomas Baumgart 2020-07-26 07:32:11 UTC
Git commit c05844bb9afdd36c04e9317ec878564154d8ca0e by Thomas Baumgart.
Committed on 26/07/2020 at 07:31.
Pushed by tbaumgart into branch 'master'.

Report all matching transactions in transaction report

In case the first processed split of a multi split transactoin matches
the filter criteria and no other one does, then the transaction was not
included in the report at all.

Since other splits may match the filter also, the first one found will
be stacked and only added, if no other data was added for that
transaction.

(cherry picked from commit 3a769f67c4efb9659eaf5b61e8bd52942533fa39)

M  +28   -1    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/c05844bb9afdd36c04e9317ec878564154d8ca0e
Comment 2 Thomas Baumgart 2020-07-26 07:32:28 UTC
Git commit 3a769f67c4efb9659eaf5b61e8bd52942533fa39 by Thomas Baumgart.
Committed on 26/07/2020 at 07:22.
Pushed by tbaumgart into branch '5.1'.

Report all matching transactions in transaction report

In case the first processed split of a multi split transactoin matches
the filter criteria and no other one does, then the transaction was not
included in the report at all.

Since other splits may match the filter also, the first one found will
be stacked and only added, if no other data was added for that
transaction.
FIXED-IN: 5.1.1

M  +28   -1    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/3a769f67c4efb9659eaf5b61e8bd52942533fa39