feat: improve config pages listings

This commit is contained in:
Herculino Trotta
2024-10-27 21:55:32 -03:00
parent 698fb88568
commit be76ccfdf6
11 changed files with 231 additions and 247 deletions

View File

@@ -263,42 +263,6 @@ def monthly_summary(request, month: int, year: int):
"daily_spending_allowance": daily_spending_allowance,
}
# account_summary = (
# Account.objects.annotate(
# balance=Coalesce(
# Sum(
# Case(
# When(
# transaction__type=Transaction.Type.INCOME,
# transaction__is_paid=True,
# transaction__reference_date__year=year,
# transaction__reference_date__month=month,
# then=F("transaction__amount"),
# ),
# When(
# transaction__type=Transaction.Type.EXPENSE,
# transaction__is_paid=True,
# transaction__reference_date__year=year,
# transaction__reference_date__month=month,
# then=-F("transaction__amount"),
# ),
# output_field=DecimalField(),
# )
# ),
# Decimal(0),
# )
# )
# .values(
# "id",
# "name",
# "balance",
# "currency__prefix",
# "currency__suffix",
# "currency__decimal_places",
# )
# .order_by("id")
# )
return render(
request,
"monthly_overview/fragments/monthly_summary.html",