Bug 446491 - Reports: Cashflow report is incorrect
Summary: Reports: Cashflow report is incorrect
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-04 21:12 UTC by jesse
Modified: 2021-12-17 17:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example of the bug (2.13 KB, application/gzip)
2021-12-17 17:26 UTC, jesse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jesse 2021-12-04 21:12:36 UTC
SUMMARY

The Cash flow report is showing Totals that are incorrect. Or at least appear to be incorrect. 

The report shows the list of Asset accounts, and the transactions in/out of these accounts. 

Further down the report, it shows the Expenses, including those that were already accounted for in the first section under the Asset accounts.

The Income section also list any income transactions that occurred into the asset accounts. Again these were already accounted for in the Asset accounts section as well. 

Thus we are showing the assets, adding income and subtracting expense, then once again subtracting the expense and adding the income. 

There is a total for each section, Asset, Expense, Income. 

The main problem is that the Grant Total is doing Assets Total - Expense Total + Income Total. This is how we are double counting. 


STEPS TO REPRODUCE
1. Open Kmymoney file - with transactions
2. Go to Reports
3. Open Cash flow report


OBSERVED RESULT
The totals are not correct. 

Shows asset accounts:
- Checking account 
  - transaction: Salary +1500
  - transaction: Rent -1200
- Savings account  
Total Assets: 300


Income: 
 - Category/account : amount 
 - ex: Salary: Salary: +1500.00
Total Income: 1500
   
Expense:  
 - Category/account: amount 
 - ex: Rent : -1200.00
Total Expense: 1200 

Total: (Total Assets + Total Income - Total Expenses) = 300 + 1500 - 1200= 600 << incorrect 

EXPECTED RESULT

It would be nice if the report showed as follows instead. 

List Accounts included in Cash Flow:
- Checking account 
- Savings account  
Money into the account: Do not show each individual transaction here. 
 - Category/account : amount 
 - ex: Salary : 1500.00   
Money out of the account:  
 - Category/account: amount 
 - ex: Rent : 1200.00 

Total Cash Flow for Accounts: 300.00 << correct cash flow


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux - Gnome 34
KDE Frameworks 5.51.0
Qt 5.11.3 (built against 5.11.3)
The xcb windowing system

ADDITIONAL INFORMATION
App Image: Version 5.1.2-c2865cb

Potential duplicate of bug #391384
Comment 1 Jack 2021-12-16 21:40:01 UTC
Can you provide a small .kmy file which demonstrates this problem?  Thanks.
Comment 2 jesse 2021-12-17 17:26:06 UTC
Created attachment 144628 [details]
Example of the bug

Adding a file that shows the issue. 

Please see the Cashflow report. 

You will see that the Assets show both income and expenses.. then the total which is $10,600.00. 
Then you see below that Income and Expenses separately listed. 
If you see further below, the report does a Grand Total which is incorrect at $11,200.00. 

What the report did was it accounted for the income and expenses under the Asset section. Then continued to again add income and subtract expenses to get the Grant Total. So it double counted.
Comment 3 Jack 2021-12-17 17:31:56 UTC
Thanks for that.  It should help track down the issue.  I'm also adjusting the bug status.