49 lines
3.0 KiB
HTML
49 lines
3.0 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n static %}
|
|
|
|
{% block title %}{{ _("Transactions") }}{% 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 }}{{ CURRENCY }}{% 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 }}{{ CURRENCY }}{% 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>
|
|
<div class="d-flex justify-content-center">
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock %} |