{% extends 'base.html' %} {% load i18n static cashbook_extras %} {% block content %}

{% trans "Debts" %}

{% if tab == 'receivables' %} {% elif tab == 'payables' %} {% endif %}
{% if tab == 'receivables' %} {% for row in page_obj %} {% empty %} {% endfor %}
{% trans "Customer" %} {% trans "Balance" %}
{{ row.contact.name }} {% if row.contact.id in rec_overdue_ids %} {% trans "Overdue" %} {% endif %}
{% if row.contact.phone %}
{{ row.contact.phone }}
{% endif %}
{{ row.balance }}
{% trans "WhatsApp" %}
{% trans "No outstanding receivables." %}
{% trans "Count" %}: {{ receivables_count }} {{ receivables_total }}
{% if is_paginated %}
{% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}
{% if page_obj.has_previous %} {% trans "Prev" %} {% else %} {% trans "Prev" %} {% endif %} {% for num in paginator.page_range %} {% if num == page_obj.number %} {{ num }} {% elif num >= page_obj.number|add:-2 and num <= page_obj.number|add:2 %} {{ num }} {% endif %} {% endfor %} {% if page_obj.has_next %} {% trans "Next" %} {% else %} {% trans "Next" %} {% endif %}
{% endif %} {% elif tab == 'payables' %} {% for row in page_obj %} {% empty %} {% endfor %}
{% trans "Supplier" %} {% trans "Balance" %}
{{ row.contact.name }} {% if row.contact.id in pay_overdue_ids %} {% trans "Overdue" %} {% endif %}
{% if row.contact.phone %}
{{ row.contact.phone }}
{% endif %}
{{ row.balance }}
{% trans "No outstanding payables." %}
{% trans "Count" %}: {{ payables_count }} {{ payables_total }}
{% if is_paginated %}
{% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}
{% if page_obj.has_previous %} {% trans "Prev" %} {% else %} {% trans "Prev" %} {% endif %} {% for num in paginator.page_range %} {% if num == page_obj.number %} {{ num }} {% elif num >= page_obj.number|add:-2 and num <= page_obj.number|add:2 %} {{ num }} {% endif %} {% endfor %} {% if page_obj.has_next %} {% trans "Next" %} {% else %} {% trans "Next" %} {% endif %}
{% endif %} {% endif %}
{% for row in receivables %} {% endfor %} {% for row in payables %} {% endfor %} {% for c in contacts_for_history %} {% endfor %} {% endblock %}