{% extends 'base.html' %}{% block content %}
← Orders
ORDER #{{ order.id }} · {{ order.service|upper }}

Order operations.

Quote #{{ q.id }} / v{{ q.version }} · {{ q.currency }} {{ q.total|currency }} · {{ order.status }}

Quotation PDF ↓
PRODUCT VALUE{{ q.product_value|currency }}{{ q.currency }}
REQUIRED FIRST PAYMENT{{ first_required|currency }}Verified: {{ first_verified|currency }}
VERIFIED TOTAL PAYMENTS{{ (q.total-balance)|currency }}{{ q.currency }}
OUTSTANDING BALANCE{{ balance|currency }}{{ q.currency }}

Finance payment ledger

{% for p in payments %}{% else %}{% endfor %}
Ref / kindAmountStatusAction
{{ p.reference }}{{ p.kind }}{{ p.currency }} {{ p.amount|currency }}{{ p.status }}{% if p.status=='Submitted' and user.role in ['admin','finance'] %}
{% endif %}
No payment receipts.
{% if user.role in ['admin','finance'] %}

Record payment (unverified)

{% endif %}

Procurement / production gate

Stage: {{ order.status }}

Only the approved quotation is eligible for fulfilment, and Finance must independently verify the required first milestone.

{% if order.status=='Approved' and user.role in ['admin','sourcing'] %}
{% endif %}

Warehouse receiving & QC

Received: {{ order.received_quantity }} / {{ q.quantity }} pieces · QC: {{ order.qc_status }}

{% for r in receipts %}

{{ r.quantity }} pieces · {{ r.qc_result }} · {{ r.created_at.strftime('%d %b %Y') }}{{ r.discrepancy }}

{% endfor %}{% if order.qc_status=='Hold' and order.received_quantity==q.quantity and user.role in ['admin','warehouse'] %}
QC hold: do not clear without correcting the issue and documenting an authorized review.
{% endif %}{% if order.status in ['Purchasing','Production','Received / QC','QC Hold','QC Cleared'] and user.role in ['admin','warehouse'] %}
{% endif %}

Final invoice

Quote total: {{ q.currency }} {{ q.total|currency }}
Finance verified: {{ q.currency }} {{ (q.total-balance)|currency }}
Outstanding: {{ q.currency }} {{ balance|currency }}

Issued: {{ 'Yes' if order.invoice_issued else 'No' }}

{% if not order.invoice_issued and user.role in ['admin','finance'] %}
{% endif %}

Shipment release

Final dispatch requires complete passed QC, issued invoice, finance-verified full settlement, and export document reference.

{% if order.shipped_at %}

Shipped: {{ order.shipped_at }} · {{ order.tracking_reference }}

{% elif user.role in ['admin','shipment'] %}
{% endif %}

Order audit trail

{% for e in events %}

{{ e.action }} · {{ e.created_at.strftime('%d %b %Y %H:%M') }}
{{ e.detail }}

{% else %}

Workflow actions will be recorded here.

{% endfor %}
{% endblock %}