Bug 303759 - Transaction Report selects un-filtered categories from split transactions
Summary: Transaction Report selects un-filtered categories from split transactions
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.2
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 17:46 UTC by Pedro Vaz
Modified: 2012-10-02 20:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Anon file that produces this defect (556.23 KB, application/octet-stream)
2012-07-18 17:48 UTC, Pedro Vaz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Vaz 2012-07-18 17:46:48 UTC
I created a transaction report called "Error in Transaction!" that should only include the following categories:
 - A000382
 - A000383
 - A000384

If you run it you will see that on 2012-07-12 the report takes into account the entire split transaction amount, instead of filtering A000068 out. I would expect a total for the month of July to be 9.4+10.4+54.3= 74.1, instead of 63.6, leaving the 10.5 out from category A000068. Even though the transactions are from the same split transaction, the last has a category that should not be included in the report.



Reproducible: Always

Steps to Reproduce:
1. Create a transaction report
2. Run report that filters per category
3. The report considers split transactions totals instead of checking the splits
4.
Actual Results:  
Incorrect report

Expected Results:  
Total Month of 2012-07-01 = -74.1K, approx

KMyMoney
Version 4.6.90
Using KDE Development Platform 4.8.3 (4.8.3)

Mac OS 10.7.4
MacPorts 2.1.1
kmymoney4-devel                @4.6-20120604   kde/kmymoney4-devel
Comment 1 Pedro Vaz 2012-07-18 17:48:18 UTC
Created attachment 72613 [details]
Anon file that produces this defect
Comment 2 Alvaro Soliverez 2012-07-18 18:39:34 UTC
Have you tried basing your report on a "Transactions by Category" report?
Comment 3 Pedro Vaz 2012-07-18 19:21:46 UTC
It works correctly with Transactions by Category, thank you.
But shouldn't the other report work the same way also?
Comment 4 Alvaro Soliverez 2012-07-18 19:36:48 UTC
The total shown in that report is not per category, but for the accounts involved in the transaction. As you filter per category, that amount remains unaffected.
Also, for the most simple cases, it would be possible to calculate the amount, but if two or more accounts are involved in a transaction, it gets tricky. And having multiple accounts and multiple categories is not so uncommon (ie. salary transactions).