Bug 430535 - % increase calculation in dashboard account widgets
Summary: % increase calculation in dashboard account widgets
Status: CLOSED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: Stephane MANKOWSKI
URL:
Keywords:
: 430863 435203 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-18 10:29 UTC by manuel.klemenz
Modified: 2021-04-01 19:32 UTC (History)
3 users (show)

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


Attachments
cropped screenshot (11.92 KB, image/png)
2020-12-18 10:29 UTC, manuel.klemenz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manuel.klemenz 2020-12-18 10:29:47 UTC
Created attachment 134177 [details]
cropped screenshot

SUMMARY
When starting a new (bank) account with initial balance = 0.00, and entering a few operations, the percent of change calculation in dashboard widgets shows an insane long number (probably some kind of max of data type, or so). 

STEPS TO REPRODUCE
1. create a new account, initial balance = 0.00
2. add some operations
3. check the operations
4. open the default dashboard

OBSERVED RESULT
The "accounts (full)" and "banks (full)" widgets show an insane number for the first month of percent increase. (+1,000,000,000,000,000,052,504,760,255,204,420,248,704,468,581,108,159,154,915,854,115,511,802,457,988,908,195,786,371,375,080,447,864,043,704,443,832,883,878,176,942,523,235,360,430,575,644,792,184,786,706,982,848,387,200,926,575,803,737,830,233,794,788,090,059,368,953,234,970,799,945,081,119,038,967,640,880,074,652,742,780,142,494,579,258,788,820,056,842,838,115,669,472,196,386,865,459,400,540,160.00 %)

EXPECTED RESULT
not sure, maybe no percentage calculation for the first month when initial balance is zero? I guess anything other than this huge number taking a lot of space...

SOFTWARE/OS VERSIONS
Skrooge: 2.24.0
Linux/KDE Plasma: Gentoo/Plasma 5.20.4
(available in About System)
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Stephane MANKOWSKI 2020-12-20 15:15:30 UTC
Git commit 61df99104896078782309e4876dbe0e12b92e0c2 by Stephane MANKOWSKI.
Committed on 20/12/2020 at 15:14.
Pushed by smankowski into branch 'master'.

% increase calculation in dashboard account widgets

M  +1    -1    skgbasemodeler/skgdocument.cpp

https://invent.kde.org/office/skrooge/commit/61df99104896078782309e4876dbe0e12b92e0c2
Comment 2 manuel.klemenz 2020-12-20 16:47:56 UTC
The patch works like a charm! Thanks a lot for the quick response.
Comment 3 Stephane MANKOWSKI 2020-12-27 19:34:51 UTC
*** Bug 430863 has been marked as a duplicate of this bug. ***
Comment 4 Stephane MANKOWSKI 2021-04-01 19:32:28 UTC
*** Bug 435203 has been marked as a duplicate of this bug. ***