Bug 331538 - Wrong balance calculation
Summary: Wrong balance calculation
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.4
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-26 16:32 UTC by Mambosatin
Modified: 2017-03-07 22:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Accounts view (122.75 KB, image/png)
2014-07-31 13:33 UTC, Cristian Oneț
Details
Institutions view (115.05 KB, image/png)
2014-07-31 13:33 UTC, Cristian Oneț
Details
Screenshot kmymoney.docx (24.19 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-02-28 19:44 UTC, Rene A.
Details
Screenshot kmymoney2.docx (36.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-03-01 00:49 UTC, Rene A.
Details
Screenshot kmymoney3.docx (37.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-03-01 00:49 UTC, Rene A.
Details
Screenshot1.jpg (509.20 KB, image/jpeg)
2017-03-01 16:02 UTC, Rene A.
Details
Test.kmy (4.40 KB, application/octet-stream)
2017-03-01 16:02 UTC, Rene A.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mambosatin 2014-02-26 16:32:04 UTC
Hi,
 
In the account view, the value of the liabilities accounts, sorted by Assets and Liabilities are positive, and that's OK. Then net value = Assets - Liabilities.
But in the Bank view, Liabilities are also positive, and the  the calculation of the net value per bank doesn't take in account that they are liabilities. So the net value per bank is wrong (= Assets + Liabilities)

Thank you for your help

Reproducible: Always
Comment 1 Cristian Oneț 2014-07-31 13:33:10 UTC
Created attachment 88058 [details]
Accounts view
Comment 2 Cristian Oneț 2014-07-31 13:33:26 UTC
Created attachment 88059 [details]
Institutions view
Comment 3 Cristian Oneț 2014-07-31 13:35:05 UTC
As you can see in the attached screenshot the net worth is properly computed in both views (since they are equal) using 4.6.4 on Windows. Could you exemplify your report with some screenshots?
Comment 4 Rene A. 2017-02-28 14:43:41 UTC
Hi - 
I'm experiencing the same error in calculating net worth.
Normally, Net worth = Assets - Liabilities
the system is calculating it as:
Net worth = Assets + Liabilities


any fix?


thanks.

Rene
Comment 5 Jack 2017-02-28 15:56:33 UTC
This is a three year old, closed bug report.  If you really thing there is a problem, please provide screenshots, as per Comment 3.  Also, please specify which 
version of KMM you are using.

Thanks.
Comment 6 Rene A. 2017-02-28 19:44:25 UTC
Created attachment 104277 [details]
Screenshot kmymoney.docx

Hi -

I'm running version 4.12.5
Attached is a screenshot

Rene

-----Original Message-----
From: Jack [mailto:bugzilla_noreply@kde.org] 
Sent: February 28, 2017 10:57 AM
To: mtlfx08@yahoo.com
Subject: [kmymoney4] [Bug 331538] Wrong balance calculation

https://bugs.kde.org/show_bug.cgi?id=331538

--- Comment #5 from Jack <ostroffjh@users.sourceforge.net> --- This is a three year old, closed bug report.  If you really thing there is a problem, please provide screenshots, as per Comment 3.  Also, please specify which version of KMM you are using.

Thanks.

--
You are receiving this mail because:
You are on the CC list for the bug.=
Comment 7 Jack 2017-02-28 20:14:15 UTC
First, 4.12.5 is the KDE version, not the KMyMoney version.  That should 4.8.x unless you are running an older version.

Second, your screenshot looks to be the bottom of the home page.  On that display, liabilities are shown as negative numbers, so adding is correct.  What type of accounts are above in the right column, and are the balances in that column the same or reversed from their balances of those accounts in the ledger view?
Comment 8 Rene A. 2017-03-01 00:49:27 UTC
Created attachment 104281 [details]
Screenshot kmymoney2.docx

Hi Jack -The Kmymoney version I'm using is 4.8.0I'm not sure what the calculation in the background is but on the home page all figures displayed are positive.I attached a screenshot of the Liabilities column.I am also including a screenshot of the Net worth report.As you can see, the liabilities are negative (in red) but for some reason the Net worth result seems as if it's being calculated as Assets + Absolute value of Liabilities.
Rene

      From: Jack <bugzilla_noreply@kde.org>
 To: mtlfx08@yahoo.com 
 Sent: Tuesday, February 28, 2017 3:14 PM
 Subject: [kmymoney4] [Bug 331538] Wrong balance calculation
   
https://bugs.kde.org/show_bug.cgi?id=331538

Jack <ostroffjh@users.sourceforge.net> changed:

          What    |Removed                    |Added
----------------------------------------------------------------------------
                CC|                            |ostroffjh@users.sourceforge
                  |                            |.net

--- Comment #7 from Jack <ostroffjh@users.sourceforge.net> ---
First, 4.12.5 is the KDE version, not the KMyMoney version.  That should 4.8.x
unless you are running an older version.

Second, your screenshot looks to be the bottom of the home page.  On that
display, liabilities are shown as negative numbers, so adding is correct.  What
type of accounts are above in the right column, and are the balances in that
column the same or reversed from their balances of those accounts in the ledger
view?
Comment 9 Rene A. 2017-03-01 00:49:28 UTC
Created attachment 104282 [details]
Screenshot kmymoney3.docx
Comment 10 Jack 2017-03-01 14:57:28 UTC
Renee,  It would be easier if you just attached images (jpeg or png) and not complete word documents.  Also, your entire message becomes a new comment on the bug, so there is no need to quote the entire original message.

Can you provide a sample KMM file?  My suspicion is that you are entering your liabilities backwards.  In my case, on the main screen, liabilities show up as negative.  The only positive liability is credit cards which I overpaid, so they actually owe me some pennies.
Comment 11 Rene A. 2017-03-01 16:02:58 UTC
Created attachment 104300 [details]
Screenshot1.jpg

Jack, I'm not a computer savvy, so you have to go easy on me with technical stuff.
I created a new file. I just entered two simple accounts. One asset ($100,000) and the other liability (50,000).
I was able to save the screenshot as jpeg. As you can see from the home screen, the system, again, is adding the two.
I'm not sure how I would enter the liability backwards, but I just followed the instructions when setting up the account.
I also attached this new file (I hope this is the right one)

Rene
Comment 12 Rene A. 2017-03-01 16:02:59 UTC
Created attachment 104301 [details]
Test.kmy
Comment 13 Jack 2017-03-01 16:41:26 UTC
I will look at the test file later today.
Comment 14 Rene A. 2017-03-03 03:18:02 UTC
Any luck?

> On Mar 1, 2017, at 11:41 AM, Jack <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=331538
> 
> --- Comment #13 from Jack <ostroffjh@users.sourceforge.net> ---
> I will look at the test file later today.
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 15 Jack 2017-03-07 22:08:13 UTC
Sorry for the delayed response, but I was correct, you seem to misunderstand how liability accounts work in KMyMoney.  An account of type liability represents money you owe.  A positive amount in the account represents a debt, but it is shown negative on the home page.  I assume your intent with the starting balance of the liability account is to show you owe someone that amount.  If you switch the sign on the starting balance, it will work as you expect, even if it is not completely obvious at first.  If you would play with a credit card or loan account, the names of the columns (such as charge and payment) might make more sense than the simple increase and decrease of a liability account.  However, in that case, you can think of it as an increase or decrease of your liability - which is the amount you owe.  Your starting balance shows as a decrease, as if you had overpaid a loan.

If you have any particular suggestions for improving the manual, I'll be glad to consider them as I really do need to update it for the Frameworks version currently being developed.