mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-23 00:58:40 +02:00
feat: make ordering on yearly_overview_by_account more reliable
This commit is contained in:
@@ -220,6 +220,7 @@ def index_yearly_overview_by_account(request, year: int):
|
|||||||
Account.objects.filter(is_archived=False, transactions__date__year=year)
|
Account.objects.filter(is_archived=False, transactions__date__year=year)
|
||||||
.select_related("group")
|
.select_related("group")
|
||||||
.distinct()
|
.distinct()
|
||||||
|
.order_by("group__name", "name", "id")
|
||||||
)
|
)
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
@@ -379,7 +380,7 @@ def yearly_overview_by_account(request, year: int):
|
|||||||
"account__exchange_currency__decimal_places",
|
"account__exchange_currency__decimal_places",
|
||||||
)
|
)
|
||||||
.distinct()
|
.distinct()
|
||||||
.order_by("account__name")
|
.order_by("account__group__name", "account__name", "account__id")
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get Currency objects for conversion
|
# Get Currency objects for conversion
|
||||||
|
|||||||
Reference in New Issue
Block a user