{% extends "base.html" %} {% load i18n static crispy_forms_filters custom_filters %} {% block title %} {{ _("View Customer") }} {% endblock title %} {% block content %} {% include 'modal/delete_modal.html' %}

{% trans 'Customer details' %}

{% if perms.inventory.change_customer %} {{ _("Update") }} {% endif %}
{% if perms.inventory.delete_customer %}
{% endif %}
{% if customer.image %}{% endif %}

{{ customer.full_name }}

{{ customer.created|timesince }}

{% trans 'Invoices' %}

{{ invoices.count }}

{% trans 'Quotations' %}

{{ estimates.count }}

{% trans 'Default Address' %}

{{ _("Address") }}

{{ customer.address }}

{% trans 'Email' %}
{{ customer.email }}
{% trans 'Phone Number' %}
{{ customer.phone_number }}
{% if perms.inventory.change_customer %}
{% if perms.inventory.change_lead %} {% endif %}
{% endif %} {% for note in notes %} {% endfor %}
{{ _("Note") }} {{ _("Date") }}
{{ note.note }} {{ note.created }}
{% for lead in leads %} {% endfor %}
{% trans 'Leads'|upper %} {% trans 'Opportunities'|upper %} {% trans 'Estimates'|upper %} {% trans 'Sale orders'|upper %} {% trans 'Invoices'|upper %} {% trans 'Car'|upper %}
{{lead}} ({{ forloop.counter }}) {{lead.opportunity}} ({{ forloop.counter }}) {% for estimate in lead.customer.customer_model.estimatemodel_set.all %}
{{estimate}}

{% endfor %}
{% for estimate in lead.customer.customer_model.estimatemodel_set.all %}
{{estimate.sale_orders.first}}

{% endfor %}
{% for invoice in lead.customer.customer_model.invoicemodel_set.all %} {% if invoice.is_paid %}
{{invoice}}
{%else%}
{{invoice}}
{% endif %}
{% endfor %}
{% for estimate in lead.customer.customer_model.invoicemodel_set.all %}
{{estimate.itemtransactionmodel_set.first.item_model.name}}

{% endfor %}
{% include "components/note_modal.html" with content_type="customer" slug=customer.slug %} {% endblock %}