{% extends "base.html" %} {% load i18n %} {% block content %}

{% translate "Bon de commande" %} {{ purchase_order.code }}

{% translate "Date" %}: {{ purchase_order.date_ordered|date:"d/m/Y" }}

{% translate "Retour" %} {% translate "PDF" %} {% translate "Excel" %} {% if can_manage_purchase %} {% if purchase_order.status == 'pending' %} {% translate "Modifier" %} {% endif %} {% if purchase_order.status == 'pending' %}
{% csrf_token %}
{% endif %} {% if purchase_order.status != 'received' and purchase_order.status != 'cancelled' %}
{% csrf_token %}
{% endif %} {% endif %}
{% translate "Informations" %}
{% translate "Code" %}:
{{ purchase_order.code }}
{% translate "Statut" %}:
{{ purchase_order.get_status_display }}
{% translate "Fournisseur" %}:
{{ purchase_order.supplier.name }} {% if purchase_order.supplier.contact_email %}
{{ purchase_order.supplier.contact_email }} {% endif %} {% if purchase_order.supplier.phone_number %}
{{ purchase_order.supplier.phone_number }} {% endif %}
{% translate "Entrepôt" %}:
{{ purchase_order.warehouse.name }}
{% if purchase_order.request_for_quote %}
{% translate "Demande d'offre d'origine" %}:
{{ purchase_order.request_for_quote.code }}
{% endif %}
{% translate "Date de commande" %}:
{{ purchase_order.date_ordered|date:"d/m/Y" }}

{% translate "QR Code" %} QR Code
UUID: {{ purchase_order.uuid }}
{% translate "Articles commandés" %}
{% if purchase_order.items.all %}
{% for row in items_with_stock %} {% endfor %}
{% translate "Code" %} {% translate "Produit" %} {% translate "Unité" %} {% translate "Emplacement" %} {% translate "Commandé" %} {% translate "Reçu" %} {% translate "A livrer" %} {% translate "P.Unit HTVA" %} {% translate "TVA" %} {% translate "Total HTVA" %}
{{ row.item.product.code }} {{ row.item.product.name }} {{ row.item.product.get_unit_display }} {{ row.item.location.warehouse.name }} - {{ row.item.location.name }} {% if row.item.num_articles and row.item.quantity_per_article %} {{ row.item.num_articles }} × {{ row.item.quantity_per_article }} {{ row.item.product.unit }}
= {{ row.item.quantity }} {{ row.item.product.unit }} {% else %} {{ row.item.quantity }} {{ row.item.product.unit }} {% endif %}
{% if row.item.received_quantity > 0 %} {{ row.item.received_quantity }} {{ row.item.product.unit }} {% else %} 0 {% endif %} {% if row.item.is_fully_received %} {% else %} {{ row.item.remaining_quantity }} {{ row.item.product.unit }} {% endif %} {% if row.item.unit_price is not None %} {{ row.item.unit_price|floatformat:2 }} EUR {% else %} — {% endif %} {% if row.item.unit_price is not None %} {{ row.item.vat_rate }}% {% else %} — {% endif %} {% if row.item.unit_price is not None %} {{ row.item.net_amount|floatformat:2 }} EUR {% else %} — {% endif %}
{% translate "Total articles commandés" %}:
{{ total_quantity }}

{% translate "Valeur totale net HTVA" %}:
{{ purchase_order.total_net_amount|floatformat:2 }} EUR
{% translate "Total TVA" %}:
{{ purchase_order.total_vat_amount|floatformat:2 }} EUR
{% translate "Valeur Totale (TTC)" %}:
{{ purchase_order.total_amount|floatformat:2 }} EUR
{% else %}

{% translate "Aucun article dans cette commande" %}

{% endif %}
{% translate "Documents" %}
{% if can_manage_purchase %} {% endif %}
{% if documents %}
{% for doc in documents %}
{% if doc.is_image %} {% else %} {% endif %} {{ doc.filename }} {{ doc.uploaded_at }} {% if can_manage_purchase %} {% endif %}
{% endfor %}
{% else %}

{% translate "Aucun document associé." %}

{% endif %}
{% if can_manage_purchase and purchase_order.status != 'received' and purchase_order.status != 'cancelled' %} {% endif %} {% if can_manage_purchase %} {% endif %} {% endblock content %}