haikal/templates/sales/invoices/invoice_list.html
2025-05-22 18:09:47 +03:00

82 lines
4.7 KiB
HTML

{% extends "base.html" %}
{% load i18n static %}
{% block title %}{{ _("Invoices") }}{% endblock title %}
{% block content %}
<div class="row mt-4">
<h3 class="mb-3"><i class="fa-solid fa-receipt"></i> {% trans "Invoices" %}</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 "Invoice 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 "Status" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Status Date" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Created" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody class="list">
{% for invoice in invoices %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap py-0">{{ invoice.invoice_number }}</td>
<td class="align-middle product white-space-nowrap">{{ invoice.customer }}</td>
<td class="align-middle product white-space-nowrap text-success">
{% if invoice.is_past_due %}
<span class="badge badge-phoenix badge-phoenix-danger">{% trans "Past Due" %}</span>
{% elif invoice.is_approved %}
<span class="badge badge-phoenix badge-phoenix-success">{% trans "Approved" %}</span>
{% elif invoice.is_canceled %}
<span class="badge badge-phoenix badge-phoenix-secondary">{% trans "Canceled" %}</span>
{% elif invoice.is_draft %}
<span class="badge badge-phoenix badge-phoenix-warning">{% trans "Draft" %}</span>
{% elif invoice.is_review %}
<span class="badge badge-phoenix badge-phoenix-info">{% trans "In Review" %}</span>
{% elif invoice.is_paid %}
<span class="badge badge-phoenix badge-phoenix-success">{% trans "Paid" %}</span>
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{% if invoice.invoice_status == "in_review" %}
{{ invoice.date_in_review }}
{% elif invoice.invoice_status == "approved" %}
{{ invoice.date_approved }}
{% elif invoice.invoice_status == "canceled" %}
{{ invoice.date_canceled }}
{% elif invoice.invoice_status == "draft" %}
{{ invoice.date_draft }}
{% elif invoice.invoice_status == "paid" %}
{{ invoice.date_paid }}
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">{{ invoice.created }}</td>
<td class="align-middle product white-space-nowrap">
<a href="{% url 'invoice_detail' invoice.pk %}"
class="btn btn-sm btn-phoenix-success">
<i class="fa-regular fa-eye me-1"></i>
{% trans "View" %}
</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Invoice Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-end mt-3">
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
</div>
{% endblock %}