haikal/templates/ledger/journal_entry/journal_entry_transactions.html
2025-09-24 11:07:31 +03:00

60 lines
3.6 KiB
HTML

{% extends "base.html" %}
{% load i18n static %}
{% block title %}
{{ _("Journal Entry Detail") }}
{% endblock title %}
{% block content %}
<div class="row mt-4">
<div class="col-12">
{% include 'ledger/journal_entry/includes/card_journal_entry.html' with journal_entry=journal_entry %}
</div>
<h3 class="mb-3 mt-5">
<i class="fa-solid fa-right-left"></i> {% trans "Transactions" %}
</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 "#" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Timestamp" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Code" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Debit" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Credit" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Description" %}</th>
</thead>
<tbody class="list">
{% for transaction in transactions %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td>{{ forloop.counter }}</td>
<td class="align-middle product white-space-nowrap py-0">{{ transaction.created|date }}</td>
<td class="align-middle product white-space-nowrap">{{ transaction.account.name }}</td>
<td class="align-middle product white-space-nowrap">{{ transaction.account.code }}</td>
<td class="align-middle product white-space-nowrap text-success">
{% if transaction.tx_type == "debit" %}
<i class="fa-solid fa-circle-up"></i> {{ transaction.amount }} <span class="icon-saudi_riyal"></span>
{% endif %}
</td>
<td class="align-middle product white-space-nowrap text-danger">
{% if transaction.tx_type == "credit" %}
<i class="fa-solid fa-circle-down"></i> {{ transaction.amount }} <span class="icon-saudi_riyal"></span>
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">{{ transaction.description }}</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Transactions 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 %}