mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-03-17 23:13:57 +01:00
fix: wrong calculations
This commit is contained in:
@@ -163,7 +163,6 @@ def calculate_account_totals(transactions_queryset, ignore_empty=False):
|
||||
"account__currency__prefix",
|
||||
"account__currency__suffix",
|
||||
"account__exchange_currency",
|
||||
"id",
|
||||
).annotate(
|
||||
expense_current=Coalesce(
|
||||
Sum(
|
||||
|
||||
@@ -146,8 +146,13 @@ def yearly_overview_by_account(request, year: int):
|
||||
if account:
|
||||
filter_params["account_id"] = int(account)
|
||||
|
||||
transactions = Transaction.objects.filter(**filter_params).exclude(
|
||||
Q(category__mute=True) & ~Q(category=None)
|
||||
transactions = (
|
||||
Transaction.objects.filter(**filter_params)
|
||||
.exclude(Q(category__mute=True) & ~Q(category=None))
|
||||
.order_by(
|
||||
"account__group__name",
|
||||
"account__name",
|
||||
)
|
||||
)
|
||||
|
||||
data = calculate_account_totals(transactions)
|
||||
|
||||
Reference in New Issue
Block a user