{% extends "base.html" %} {% load humanize %} {% load i18n static crispy_forms_filters custom_filters %} {% block title %} {{ _("View Customer") }} {% endblock title %} {% block content %} {% include 'modal/delete_modal.html' %} {% include 'components/note_modal.html' with content_type="customer" slug=customer.slug %}

{% trans 'Customer details' %}

{% if perms.inventory.change_customer %} {{ _("Edit") }} {% endif %} {% if perms.inventory.delete_customer %} {% endif %}
{% if customer.image %} {{ customer.full_name }} {% else %}
{{ customer.full_name|first|default:"?" }}
{% endif %}

{{ customer.full_name }}

{% trans "Member since:" %} {{ customer.created|date:"d M Y" }}

{% trans 'Invoices' %}

{{ invoices.count }}

{% trans 'Quotations' %}

{{ estimates.count }}

{% trans 'Default Information' %}
{% trans 'Notes' %}
{% if perms.inventory.change_customer %} {% endif %}
{% for note in notes %} {% endfor %}
{{ _("Note") }} {{ _("Created On") }} {{ _("Last Updated") }}
{{ note.note }} {{ note.created|naturalday|capfirst }} {{ note.updated|naturalday|capfirst }} {% if note.created_by == request.user %} {{ _("Update") }} {% endif %}
{% trans 'Sales History' %}
{% for lead in leads %} {% empty %}

{% trans 'No leads found for this customer.' %}

{% endfor %}
{% for lead in leads %} {% if lead.opportunity %} {% endif %} {% empty %}

{% trans 'No opportunities found for this customer.' %}

{% endfor %}
{% for estimate in estimates %}
{{ estimate }}
{{ estimate.created|date:"d M Y" }}
{% empty %}

{% trans 'No estimates found for this customer.' %}

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