{% extends "templates/web.html" %} {% from "erpnext/templates/includes/macros.html" import product_image %} {% block breadcrumbs %} {% include "templates/includes/breadcrumbs.html" %} {% endblock %} {% block title %} {{ doc.name }} {% endblock %} {% block header %}

{{ doc.name }}

{% endblock %} {% block header_actions %}
{% endblock %} {% block page_content %}
{{ frappe.utils.format_date(doc.transaction_date, 'medium') }} {% if doc.valid_till %}

{{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}

{% endif %}
{% if doc.doctype == "Quotation" and not doc.docstatus %} {{ _("Pending") }} {% else %} {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }} {% endif %}
{%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %} {{ party_name }} {% if doc.contact_display and doc.contact_display != party_name %}
{{ doc.contact_display }} {% endif %}
{% if doc._header %} {{ doc._header }} {% endif %}
{{ _("Item") }} {{ _("Quantity") }} {{ _("Rate") }} {{ _("Amount") }}
{% for d in doc.items %}
{{ item_name_and_description(d) }} {{ d.get_formatted("qty") }} {{ d.get_formatted("rate") }} {{ d.get_formatted("amount") }}
{% endfor %}
{% include "erpnext/templates/includes/order/order_taxes.html" %}
{% if attachments %}
{{ _("Attachments") }}
{% for attachment in attachments %}

{{ attachment.file_name }}

{% endfor %}
{% endif %} {% if doc.terms %}

{{ doc.terms }}

{% endif %} {% endblock %} {% macro item_name_and_description(d) %}
{% if d.thumbnail or d.image %} {{ product_image(d.thumbnail or d.image, no_border=True) }} {% else %}
{{ frappe.utils.get_abbr(d.item_name) or "NA" }}
{% endif %}
{{ d.item_code }}
{{ html2text(d.description) | truncate(140) }}
{{ _("Qty ") }}({{ d.get_formatted("qty") }})
{% endmacro %}