{% load dict_extras %} {% with objs=objs children=children tcc=tcc sub=sub %} {% with root_id=root.id %}
▼ {% if root.kind == 'PARTNER' %} Partner {% else %} Client {% endif %} {{ root.name }} ({{ root.code }}) Clients: {{ root.direct_client_count }} / {{ tcc|dict_get:root_id }} Own: {{ root.own_amount|default:"0"|floatformat:2 }} Subtree: {{ sub|dict_get:root.id|default:"0"|floatformat:2 }}
{% if root.kind == 'PARTNER' %} Edit
{% csrf_token %}
{% else %} Edit
{% csrf_token %}
{% endif %}
{# Children list #} {% if children|dict_get:root_id %}
{% for cid in children|dict_get:root_id %} {% include "ref/_branch.html" with root=objs|dict_get:cid objs=objs children=children tcc=tcc sub=sub %} {% endfor %}
{% endif %} {% endwith %} {% endwith %}