133 lines
7.5 KiB
HTML
133 lines
7.5 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-danger btn-sm" data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}</button>
|
|
<button type="submit" class="btn btn-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mt-4">
|
|
<div class="d-flex justify-content-between mb-2">
|
|
<h3 class="">{% trans "Journal Entries" %}</h3>
|
|
<div class="d-flex gap-2">
|
|
{% comment %} {% if ledger.is_posted %}
|
|
{% if ledger.is_locked %}
|
|
<a class="btn btn-sm btn-phoenix-danger" href="{% url 'unlock_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'UnLock All' %}</a>
|
|
{% else %}
|
|
<a class="btn btn-sm btn-phoenix-danger" href="{% url 'lock_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'Lock All' %}</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if not ledger.is_locked %}
|
|
{% if ledger.is_posted %}
|
|
<a class="btn btn-sm btn-phoenix-success" href="{% url 'unpost_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'UnPost All' %}</a>
|
|
{% else %}
|
|
<a class="btn btn-sm btn-phoenix-success" href="{% url 'post_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'Post All' %}</a>
|
|
{% endif %}
|
|
{% endif %} {% endcomment %}
|
|
<a href="{% url 'journalentry_create' ledger.pk %}" class="btn btn-sm btn-phoenix-primary">{% trans "Add Journal Entry" %}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-responsive px-1 scrollbar">
|
|
<table class="table fs-9 mb-0 border-top border-translucent">
|
|
<thead>
|
|
<tr>
|
|
<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">{{ 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">
|
|
<a class="dropdown-item" href="{% url 'journalentry_transactions' je.pk %}">{% trans "View" %}</a>
|
|
<a class="dropdown-item" href="{% url 'journalentry_txs' je.entity_slug je.ledger_id je.pk %}">{% trans "Transactions" %}</a>
|
|
{% if je.can_delete %}
|
|
<a class="dropdown-item" href="{% url 'journalentry_delete' 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>
|
|
<div class="d-flex justify-content-center">
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock %} |