{% extends 'admin/inspect.html' %} {% load static i18n admin_urls simpelcore_tags simpellab_tags thumbnail %} {% load comments %} {% load comments_xtd %} {% block object-tools-items %} {% if has_add_permission %} {% url opts|admin_urlname:'clone' object.pk|admin_urlquote as clone_url %} {% trans "Duplicate Sales Order" as clone_popover %} {% include 'admin/includes/object_tools_item.html' with url=clone_url popover=clone_popover icon="clipboard-file-outline" %} {% endif %} {% if has_create_workorder_permission %} {% url opts|admin_urlname:'create_workorder' object.pk|admin_urlquote as create_workorder_url %} {% trans "Create Work Order" as workorder_popover %} {% include 'admin/includes/object_tools_item.html' with url=create_workorder_url popover=workorder_popover icon="bulletin-board" %} {% endif %} {% if has_create_invoice_permission %} {% url opts|admin_urlname:'create_invoice' object.pk|admin_urlquote as create_invoice_url %} {% trans "Create Invoice" as invoice_popover %} {% include 'admin/includes/object_tools_item.html' with url=create_invoice_url popover=invoice_popover icon="inbox-full-outline" %} {% endif %} {{ block.super }} {% endblock %} {% block content %}
{% if object.group %}
{{ object.group|title }}
{% endif %}
{{ object.inner_id }}
{% trans "Status" %}
: {{ object.get_status_display }}
{% trans "Created at" %}
: {{ object.created_at|date:"d M Y" }}
{% trans "Customer ID" %}
: {{ object.customer.inner_id }}
{% trans "Customer Name" %}
: {{ object.customer.name }}
{% if object.data.sampling_options %}
{% trans "Sampling" %}
: {% trans "Yes" %} / {{ object.data.sampling_estimation }} {% trans "Days" %}
{% trans "Scheduled At" %}
: {{ object.data.sampling_schedule }}
{% else %}
{% trans "Sampling" %}
: {% trans "No" %}
{% endif %}
{% trans "Billing Address" %}
{% if object.billing_address %}
{{ object.billing_address.name|title }}{% if object.billing_address.phone %}, {{ object.billing_address.phone }}{% endif %}
{{ object.billing_address.text_line_1 }}
{{ object.billing_address.text_line_2 }}
{% else %}
{% trans "Billing address not set." %}
{% endif %}
{% trans "Shipping Address" %}
{% if object.shipping_address %}
{{ object.shipping_address.name|title }}{% if object.shipping_address.phone %}, {{ object.shipping_address.phone }}{% endif %}
{{ object.shipping_address.text_line_1 }}
{{ object.shipping_address.text_line_2 }}
{% else %}
{% trans "Shipping address not set." %}
{% endif %}
{% if object.note %}
{% trans "Note" %}
{{ object.note }}
{% endif %}
{% include 'admin/simpel_sales/order_row.html' %}
{% trans "#" %} {% trans "Item" %} {% trans "Price" %} {% trans "Quantity" %} {% trans "Total" %}
{% trans "Total" %} {{ object.total|currency }}
{% for item in object.items.all %} {% include 'dashboard/salesorder/item.html' with object=item %} {% endfor %}
{% include 'dashboard/comments.html' %}
{% include 'dashboard/salesorder/summary.html' %} {% include 'includes/action_logs.html' %}
{% endblock %}