135 lines
7.8 KiB
HTML
135 lines
7.8 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n static %}
|
|
{% block title %}
|
|
{{ _("Journal Entries") }}
|
|
{% endblock title %}
|
|
{% block content %}
|
|
<div class="modal fade"
|
|
id="confirmModal"
|
|
tabindex="-1"
|
|
aria-labelledby="confirmModalLabel"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog modal-sm">
|
|
<div class="modal-content ">
|
|
<div class="modal-header justify-content-between align-items-start gap-5 px-4 pt-4 pb-3 border-0">
|
|
<h5 class="mmb-0 me-2 text-warning-dark" id="confirmModalLabel">
|
|
<i class="fas fa-exclamation-circle text-warning-dark ms-2"></i>
|
|
{% trans 'Confirm' %}
|
|
</h5>
|
|
<button class="btn p-0 text-body-quaternary fs-6"
|
|
data-bs-dismiss="modal"
|
|
aria-label="Close">
|
|
<span class="fas fa-times"></span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
{% trans 'Are you sure ?' %}
|
|
<div class="modal-footer flex justify-content-center border-top-0">
|
|
<form id="confirmForm" method="POST" action="" class="form">
|
|
{% csrf_token %}
|
|
<div class="container-fluid m-0 p-0">
|
|
<button type="button"
|
|
class="btn btn-phoenix-danger btn-sm"
|
|
data-bs-dismiss="modal">
|
|
<i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
|
</button>
|
|
<button type="submit" class="btn btn-phoenix-success btn-sm">
|
|
<i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--test-->
|
|
<div class="row mt-4">
|
|
<div class="d-flex justify-content-between mb-2">
|
|
<h3 class="">{% trans "Journal Entries" %}</h3>
|
|
{% if perms.django_ledger.add_journalentrymodel %}
|
|
<a href="{% url 'journalentry_create' request.dealer.slug ledger.pk %}"
|
|
class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Journal Entry" %}</a>
|
|
{% endif %}
|
|
</div>
|
|
<div class="table-responsive px-1 scrollbar fs-9">
|
|
<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 "Document Number" %}</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 "Activity" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Description" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Posted" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Locked" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Transaction Count" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="list">
|
|
{% for je in journal_entries %}
|
|
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
|
<td class="align-middle product white-space-nowrap px-1">{{ je.je_number }}</td>
|
|
<td class="align-middle product white-space-nowrap">{{ je.timestamp }}</td>
|
|
<td class="align-middle product white-space-nowrap">
|
|
{% if je.get_activity_display %}{{ je.get_activity_display }}{% endif %}
|
|
</td>
|
|
<td class="align-middle product white-space-nowrap">{{ je.description }}</td>
|
|
<td class="align-middle product white-space-nowrap">
|
|
{% if je.is_posted %}
|
|
<i class="fa-solid fa-square-check text-success"></i>
|
|
{% else %}
|
|
<i class="fa-solid fa-circle-xmark text-danger"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="align-middle product white-space-nowrap">
|
|
{% if je.is_locked %}
|
|
<i class="fa-solid fa-lock text-success"></i>
|
|
{% else %}
|
|
<i class="fa-solid fa-unlock text-danger"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="align-middle product white-space-nowrap">{{ je.txs_count }}</td>
|
|
<td class="align-middle white-space-nowrap text-start">
|
|
<div class="btn-reveal-trigger position-static">
|
|
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10"
|
|
type="button"
|
|
data-bs-toggle="dropdown"
|
|
data-boundary="window"
|
|
aria-haspopup="true"
|
|
aria-expanded="false"
|
|
data-bs-reference="parent">
|
|
<span class="fas fa-ellipsis-h fs-10"></span>
|
|
</button>
|
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
|
{% if perms.django_ledger.view_transactionmodel %}
|
|
<a class="dropdown-item"
|
|
href="{% url 'journalentry_transactions' request.dealer.slug je.pk %}">{% trans "View" %}</a>
|
|
<a class="dropdown-item"
|
|
href="{% url 'journalentry_txs' request.dealer.slug je.entity_slug je.ledger_id je.pk %}">{% trans "Transactions" %}</a>
|
|
{% endif %}
|
|
{% if je.can_delete and perms.django_ledger.delete_journalentrymodel %}
|
|
<a class="dropdown-item"
|
|
href="{% url 'journalentry_delete' request.dealer.slug je.pk %}">{% trans "Delete" %}</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="8" class="text-center">{% trans "No Bank Accounts 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>
|
|
<!--test-->
|
|
{% endblock %}
|