Compare commits

...

2 commits

View file

@ -23,9 +23,9 @@ def category_plot(transactions, **kwargs):
"categories": categories, "categories": categories,
} }
| categories.aggregate( | categories.aggregate(
max=Greatest(models.Sum("sum_m"), models.Sum("sum_p")), max=Greatest(-models.Sum("sum_m"), models.Sum("sum_p")),
total_m=models.Sum("sum_m"), total_m=models.Sum("sum_m"),
total_p=models.Sum("sum_p"), total_p=models.Sum("sum_p"),
total=models.Sum("value"), total=models.Sum("sum"),
) )
) )