Do not take budget into account for history view on account page

This commit is contained in:
Edgar P. Burkhart 2023-04-18 17:15:48 +02:00
parent a21f655f18
commit 9b05d41eec
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -195,8 +195,7 @@ class AccountUpdateView(NummiUpdateView):
) )
_history = ( _history = (
account.transaction_set.filter(category__budget=True) account.transaction_set.values(month=models.functions.TruncMonth("date"))
.values(month=models.functions.TruncMonth("date"))
.annotate( .annotate(
sum_p=models.Sum("value", filter=models.Q(value__gt=0)), sum_p=models.Sum("value", filter=models.Q(value__gt=0)),
sum_m=models.Sum("value", filter=models.Q(value__lt=0)), sum_m=models.Sum("value", filter=models.Q(value__lt=0)),