Created attachment 140759 [details] Screenshot report SUMMARY The tax report starts with items that are not tax related. This was not an issue in KMyMoney 5.0.5 STEPS TO REPRODUCE 1.Open tax report (title GST Report) 2. 3. OBSERVED RESULT The report starts with items that are not tax related, for example gifts. This bug seems to have been introduced after version 5.0.5 EXPECTED RESULT Tax report should only show tax related items. For example category gifts has checkbox "Include on Tax Reports" unselected. SOFTWARE/OS VERSIONS Windows: 10 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION This bug was not present till KMyMoney version 5.0.5
*** Bug 464905 has been marked as a duplicate of this bug. ***
*** Bug 432733 has been marked as a duplicate of this bug. ***
Copied from Bug 464905: I found that all of these transactions are split transactions. All sub splits are categorized and categories are NOT marked "Include on Tax Report" Also reproduced on Linux Mint 21.1 with v 5.1.2. went back to windows v 4.8.4 and was as expected Copied from Bug 432733: Report lists at top totals for split transactions having all split categories as not tax flagged I have no categories with "Include on tax reports" selected but nevertheless all the default tax reports list some transactions, all of which are split category transactions. My own observations: All non-tax items showing up on a tax report by category are in the first two categories shows. The first is "" (i.e., a missing/blank category). The second shows up as "*** UNASSIGNED ***". I do not find that all such transactions shown are split, and while in some cases, a different split is from a tax marked category, most are not. I'm still working at creating a very small test data file which shows the problem.
removed duplicate as blocker
Created attachment 156904 [details] XML data file demonstrating the error of non-tax categories on tax report I'm attaching a relatively small (25K) xml data file which shows the problem. I have not been able to make one from scratch, so this is a modified reduced version of one I already had. Both the tax reports by category (this year and last year) show transactions listed without a category. None of those transactions has any split in the single category (OtherGroups) listed as tax related.
In the attached file, the report Tax Transactions This Year includes two transaction. The one on 1/4/23 T000000000000000016 has three splits: one for the Checking Account A000001, and two for Categories: Memberships (A000015) and Donations (A000033) none of which are marked for including in Tax Reports. The other transaction T000000000000000017 belongs, as one split is for Category A000016 OtherGroups, which IS marked as for Tax Reports. As far as I can tell, the problem is that MyMoneyTransactionFilter::matchingSplits (in myoneytransactionfilter.cpp) is returning 1 for T000000000000000016 where I think it should return 0. I don't yet understand the code well enough to be sure, but I think the problem is somewhere towards the end of that function, where it seems to think it needs to return at least one split. I also haven't figured out where in that function it deals with the "tax categories only" setting in the filter.
Git commit 58c91c26add5c0761fa04c6066c333c5dec70cab by Thomas Baumgart. Committed on 17/12/2023 at 18:15. Pushed by tbaumgart into branch 'master'. Don't include non-tax related transactions in tax report FIXED-IN: 5.2 M +11 -0 kmymoney/plugins/views/reports/core/querytable.cpp https://invent.kde.org/office/kmymoney/-/commit/58c91c26add5c0761fa04c6066c333c5dec70cab