haikal/templates/sales/orders/order_list.html
2025-08-31 14:49:32 +03:00

60 lines
3.5 KiB
HTML

{% extends "base.html" %}
{% load i18n static humanize %}
{% block title %}
{{ _("Orders") }}
{% endblock title %}
{% block content %}
<div class="row mt-4">
<h3 class="mb-3">
<i class="fa-solid fa-list"></i> {% trans "Orders" %}
</h3>
<div class="table-responsive px-1 scrollbar">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Order Number" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Customer" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "For Quotation" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Invoice" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Status" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Expected Delivery" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col"></th>
<th class="sort white-space-nowrap align-middle" scope="col"></th>
</tr>
</thead>
<tbody class="list">
{% for order in orders %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap py-0">{{ order.formatted_order_id }}</td>
<td class="align-middle product white-space-nowrap py-0">{{ order.estimate.customer.customer_name }}</td>
<td class="align-middle product white-space-nowrap">
<a href="{% url 'estimate_detail' order.estimate.pk %}">{{ order.estimate }}</a>
</td>
<td class="align-middle product white-space-nowrap">
{% if order.invoice %}
<a href="{% url 'invoice_detail' request.dealer.slug request.entity.slug order.invoice.pk %}">{{ order.invoice }}</a>
{% endif %}
</td>
<td class="align-middle product white-space-nowrap py-0">{{ order.status }}</td>
<td class="align-middle product white-space-nowrap py-0">{{ order.expected_delivery_date|naturalday|capfirst }}</td>
<td class="align-middle product white-space-nowrap py-0">
<a class="btn btn-sm btn-phoenix-success"
href="{% url 'sale_order_details' order.estimate.pk order.pk %}">{% trans "View" %}</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Order Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if page_obj.paginator.num_pages > 1 %}
<div class="d-flex justify-content-end mt-3">
<div class="d-flex">{% include 'partials/pagination.html' %}</div>
</div>
{% endif %}
</div>
{% endblock %}