File: D:/web/hyperflight/apps/inxpress/app/templates/partials/order_items.html
{% if not items %}
<div class="alert alert-warning mb-0">
No line items found for order <strong>{{ order_no }}</strong>.
</div>
{% else %}
<div class="mb-2">
<div class="fw-semibold">Order {{ order_no }} – items</div>
</div>
<div class="table-responsive">
<table class="table table-sm mb-0">
<thead>
<tr>
<th>Code</th>
<th>Name</th>
<th>Options</th>
<th class="text-end">Qty</th>
<th class="text-end">Price (£)</th>
<th class="text-end">Line total (£)</th>
</tr>
</thead>
<tbody>
{% for it in items %}
<tr>
<td>
{% if it.ProductCode %}
{% set base = request.host_url.rstrip('/') %}
{% set url = base ~ '/products.asp?code=' ~ (it.ProductCode|urlencode) %}
<a href="{{ url }}"
class="open-product"
data-url="{{ url }}">
{{ it.ProductCode }}
</a>
{% endif %}
</td>
<td class="product-name-cell">{{ it.ProductName }}</td>
<td class="options-cell">{{ it.OptionsList }}</td>
<td class="text-end">{{ it.Qty }}</td>
<td class="text-end">{{ it.PriceEach|blank_if_zero }}</td>
<td class="text-end">{{ it.LineTotal|blank_if_zero }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}