{% extends "base.html" %} {% load i18n %} {% load custom_filters %} {%block title%} {%trans 'Sale Orders'%} {%endblock%} {% block content %} {% if txs or request.GET.q%}

{% trans 'Sale Orders' %}

{% include 'partials/search_box.html' %}
{% for tx in txs %} {% endfor %}
{{ _("Customer Name")}} {{ _("Customer Address")}} {{ _("Customer Phone")}} {{ _("Quotation") }} {{ _("Invoice") }}

{{tx.customer.first_name}} {{tx.customer.last_name}}

{{tx.customer.address}}

{{tx.customer.phone_number}}

{% if tx.estimate and perms.django_ledger.view_estimatemodel%}

{{ tx.estimate.estimate_number}}
{% if tx.estimate.status == "draft" %} {{tx.estimate.status}} {% elif tx.estimate.status == "in_review" %} {{tx.estimate.status}} {% elif tx.estimate.status == "approved" %} {{tx.estimate.status}} {% elif tx.estimate.status == "completed" %} {{tx.estimate.status}} {% endif %}

{% endif %}
{% if tx.invoice and perms.django_ledger.view_invoicemodel%}

{{tx.invoice.invoice_number}}
{% if tx.invoice.is_draft %} {{tx.invoice.invoice_status}} {% elif tx.invoice.is_review %} {{tx.invoice.invoice_status}} {% elif tx.invoice.is_approved %} {{tx.invoice.invoice_status}} {% elif tx.invoice.is_completed %} {{tx.invoice.invoice_status}} {% elif tx.invoice.is_paid %} {{tx.invoice.invoice_status}} {% elif tx.invoice.is_canceled %} {{tx.invoice.invoice_status}} {% elif tx.invoice.is_past_due %} {{ _("Past Due")}} {% endif %}

{% endif %}
{% if page_obj.paginator.num_pages > 1 %}
{% include 'partials/pagination.html'%}
{% endif %}
{% else %} {% include "empty-illustration-page.html" with value="sale order" url='#' %} {% endif %} {% endblock %}