GnuCash
Contact   Instructions
Bug 798303 - account list is sorted wrong by amount
Summary: account list is sorted wrong by amount
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: User Interface General (show other bugs)
Version: 4.4
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-01 18:57 EDT by Michael Tsang
Modified: 2021-09-11 13:13 EDT (History)
4 users (show)

See Also:


Attachments
screenshot showing wrong sorting order (251.51 KB, image/png)
2021-09-01 18:57 EDT, Michael Tsang
no flags Details
Sorting by Present (GBP) is wrong (431.25 KB, image/png)
2021-09-08 06:51 EDT, Michael Tsang
no flags Details

Description Michael Tsang 2021-09-01 18:57:00 EDT
Created attachment 374170 [details]
screenshot showing wrong sorting order

In the screenshot shown, I am attempting to sort the accounts by the Total (Period) column in descending order. However, it puts CN¥530.15 above £256.93, which is wrong (CN¥530.15 is less than £256.93).
Comment 1 John Ralls 2021-09-01 19:13:04 EDT
By rather a lot. HKD 2005 is also less than £257, assuming that the £ means GBP.

Do you have more or less correct exchange rates, around 9p to the HKD and 11p to the CNY, as the latest in the price database?

Do all of the other columns mis-sort the same way?
Comment 2 Michael Tsang 2021-09-02 05:02:22 EDT
Yes, all exchange rates are entered. They are shown correctly at "Present (GBP)" column.
Comment 3 John Ralls 2021-09-02 12:05:06 EDT
OK. And do the other mixed-commodity columns sort the same (incorrect) way? Does Present (GBP) sort correctly?
Comment 4 Michael Tsang 2021-09-08 06:51:07 EDT
(In reply to John Ralls from comment #3)
> OK. And do the other mixed-commodity columns sort the same (incorrect) way?
> Does Present (GBP) sort correctly?

Sorting by Present (GBP) is also wrong. See attachment.
Comment 5 Michael Tsang 2021-09-08 06:51:42 EDT
Created attachment 374181 [details]
Sorting by Present (GBP) is wrong
Comment 6 John Ralls 2021-09-08 12:18:11 EDT
Does your theme put the reveal arrows on the left of the column label instead of Adwaita's right side? If not then that's sorted by the present column rather than the present(GBP) one.
Comment 7 Michael Tsang 2021-09-08 12:19:48 EDT
The arrow is placed on the left for right-aligned columns, and on the right for left-aligned columns.
Comment 8 John Ralls 2021-09-08 12:36:08 EDT
OK, thanks.
Comment 9 John Ralls 2021-09-11 13:13:42 EDT
Fixed. The problem was that no currency was being passed to the balance functions so each was returning a value in the account currency, which was then ordered numerically, so one would get HKD 110 > £100, even if the values shown in the column *were* converted to some currency, so one might get £20 > £100 if the account with the £20 balance was an HKD account.

The fix will appear in GnuCash 4.7 and tomorrow's flatpak nightly.

Note You need to log in before you can comment on or make changes to this bug.