parent
d246843be0
commit
608da4be55
2 changed files with 3 additions and 3 deletions
nummi
|
@ -6,10 +6,10 @@ register = template.Library()
|
|||
|
||||
|
||||
@register.inclusion_tag("category/category_plot.html", takes_context=True)
|
||||
def category_plot(context, transactions, budget=True, **kwargs):
|
||||
def category_plot(context, transactions, **kwargs):
|
||||
kwargs.setdefault("account", context.get("account"))
|
||||
|
||||
if budget:
|
||||
if not kwargs.get("account"):
|
||||
transactions = transactions.exclude(category__budget=False)
|
||||
categories = (
|
||||
transactions.values("category", "category__name", "category__icon")
|
||||
|
|
|
@ -65,6 +65,6 @@
|
|||
</section>
|
||||
<section>
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions budget=False statement=object %}
|
||||
{% category_plot transactions statement=object %}
|
||||
</section>
|
||||
{% endblock body %}
|
||||
|
|
Loading…
Add table
Reference in a new issue