{% extends "layouts/panel.html" %} {% load i18n shop_ui %} {% load ravix_ui %} {% block title %}{% blocktrans trimmed with number=order.number %}Order {{ number }}{% endblocktrans %}{% endblock %} {% block page_title %}{% blocktrans trimmed with number=order.number %}Order {{ number }}{% endblocktrans %}{% endblock %} {% block content %}

{% trans "Order" %} {{ order.number }} {{ order.get_status_display }}

{% trans "Back" %}
{% trans "Customer" %}
{{ order.customer_name }}
{% trans "User account" %}
{% if order.user %}{{ order.user.display_name }} ({{ order.user.email }}){% else %}{% trans "Guest purchase" %}{% endif %}
{% trans "Phone" %}
{{ order.phone }}
{% trans "Email" %}
{{ order.email|default:"—" }}
{% trans "URL" %}
{% if order.needs_shipping %}{{ order.address|linebreaksbr }}{% else %}{% trans "— (digital only)" %}{% endif %}
{% trans "Customer note" %}
{{ order.note|default:"—" }}
{% trans "Placed at" %}
{{ order.created_at|jalali_datetime }}
{% trans "Paid at" %}
{% if order.paid_at %}{{ order.paid_at|jalali_datetime }}{% else %}—{% endif %}
{% trans "System note" %}
{{ order.admin_note|default:"—" }}
{% if next_statuses %}
{% csrf_token %}{% for v, l in next_statuses %}{% endfor %}

{% trans "“Refund” only records the status; the money is not returned from the gateway automatically." %}

{% endif %}

{% trans "Items" %}

{% for i in order.items.all %}{% endfor %}{% if order.discount_total %}{% endif %}
{% trans "Product" %}{% trans "Type" %}{% trans "Unit price" %}{% trans "Count" %}{% trans "Total" %}
{{ i.name }}{% if i.variant_label %} — {{ i.variant_label }}{% endif %}{% if i.sku %} {{ i.sku }}{% endif %}{{ i.get_kind_display }}{% if i.kind == 'digital' %} {% blocktrans trimmed with download_count=i.download_count|fa_digits %}({{ download_count }} downloads){% endblocktrans %}{% endif %}{% price i.unit_price order %}{{ i.quantity|fa_digits }}{% price i.line_total order %}
{% trans "Discount" %}{% price order.discount_total order %}
{% trans "Grand total" %}{% price order.total order %}

{% trans "Payments" %}

{% for p in order.payments.all %}
{{ p.gateway }}{% if p.is_test %} {% trans "Test" %}{% endif %} — {% price p.amount p %} — {{ p.get_status_display }} {{ p.reference }}{% if p.gateway_ref %} / {{ p.gateway_ref }}{% endif %} {% if p.status == 'initiated' %}
{% csrf_token %}
{% endif %} {% if p.status == 'needs_review' %}

{% trans "This payment needs manual review (amount/identifier mismatch, or a payment for an order that cannot accept it). Reconcile with the gateway’s support before any action." %}

{% endif %}
    {% for e in p.events.all %}
  • {{ e.created_at|jalali_datetime }} — {{ e.get_kind_display }}{% if e.to_status %}: {{ e.from_status|default:"—" }} ← {{ e.to_status }}{% endif %}{% if e.message %} — {{ e.message }}{% endif %}
  • {% endfor %}
{% empty %}

—

{% endfor %}

{% trans "Change history" %}

{% csrf_token %}
{% endblock %}