Bug 435580 - Incorrect balance of account
Summary: Incorrect balance of account
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: Guillaume DE BURE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-10 14:12 UTC by pat_h
Modified: 2021-06-13 09:39 UTC (History)
1 user (show)

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


Attachments
Incorrect summing of values (22.68 KB, image/png)
2021-04-10 14:12 UTC, pat_h
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pat_h 2021-04-10 14:12:16 UTC
Created attachment 137473 [details]
Incorrect summing of values

SUMMARY
The balance of account is not correctly calculated, i.e. does not respect sort order.

STEPS TO REPRODUCE
1. Create two entries with identical date
2. Sort by date

OBSERVED RESULT
The sum and the balance of account are inconsistent compared to each other (see attached screenshot, e.g. -3.95 € - 2161.85 € does not equal 0 €).

EXPECTED RESULT
The sum, the sorting and the balance of account are consistent to each other.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I am very sure that this worked correctly in older versions.
Comment 1 Stephane MANKOWSKI 2021-04-16 18:43:56 UTC
Hi,

I'm not able to reproduce it.
Could you provide me a sample file ?
Comment 2 pat_h 2021-06-12 15:01:25 UTC
Hi,

I try to figure out how to generate a sample file.

One update:
It seems that the problem only occurs when opening the transactions of an account (double click on the account in the account tab). It does not seem to occur in the normal transaction view (with all transactions, possibly filtered).

So even if both tabs have the same properties (one account selected), the problem only occurs in the tab opened by double click on the account in the account tab and not in the normal transaction tab.

Kind regards
Patrick
Comment 3 pat_h 2021-06-13 04:21:52 UTC
Ok, it does not matter how you open the tab or which filter is active. It works correctly in the first transaction tab opened in the skrooge process. In all later opened transaction tabs the balance is sometimes calculated incorrectly (out-of-order), even if all transaction tabs have been closed inbetween.
Comment 4 pat_h 2021-06-13 04:52:25 UTC
As I was not able to reproduce the problem with a newly created user starting a skrooge file from scratch, I copied my existing skg-file to that new user. 

Although I see the same pattern there (first tab works, all tabs afterwords have incoorect balances for some transaction), the problem vanishes as soon as I save the skg-file with this new user.

So it seems to be something configuration related and I guess I also need to copy all the configuration to the new user to be able to reproduce it.
Comment 5 pat_h 2021-06-13 08:38:43 UTC
By saving the "page status" in the tab, then saving the file again (i.e. even without changing any transaction), closing Skrooge and starting it again, the problem is fixed, also in the original setup (user and configuration).

As the problem can get fixed so easily and I won't be able to provide a sane sample file with this behavior, I do not think that it's worth spending more time on this bug.
Comment 6 Stephane MANKOWSKI 2021-06-13 09:39:42 UTC
OK. Thank you.