{% extends 'base.html' %} {% load static %} {% block title %}Journal Entry {{ entry.reference_number }} - HAVEN GRAZURI INVESTMENT LIMITED{% endblock %} {% block content %}

Journal Entry Details

{{ entry.reference_number }}

Back to List {% if entry.status == 'draft' %}
{% csrf_token %}
{% elif entry.status == 'posted' and not reversal_entry %} {% endif %}
{% if entry.status == 'draft' %}

Draft Entry

This entry has not been posted to the general ledger yet.

{% elif entry.status == 'posted' %}

Posted Entry

This entry has been posted to the general ledger.

{% elif entry.status == 'reversed' %}

Reversed Entry

This entry has been reversed by journal entry {{ reversal_entry.reference_number }}.

{% endif %}

Entry Information

{{ entry.reference_number }}

{{ entry.transaction_date|date:"Y-m-d" }}

{{ entry.branch.name|default:"—" }}

{% if entry.status == 'draft' %} Draft {% elif entry.status == 'posted' %} Posted {% elif entry.status == 'reversed' %} Reversed {% endif %}

{{ entry.description }}

{% if entry.loan or entry.expense %}

Linked Transaction

{% if entry.loan %} {% elif entry.expense %} {% endif %}
{% endif %}

Journal Entry Lines

{% for line in entry.lines.all %} {% endfor %} {% if total_debits == total_credits %} {% else %} {% endif %}
Account Code Account Name Description Debit Credit
{{ line.account.name }}
{{ line.account.get_account_type_display }}
{{ line.description }}
{% if line.debit_amount > 0 %}
KES {{ line.debit_amount|floatformat:2 }}
{% else %}
—
{% endif %}
{% if line.credit_amount > 0 %}
KES {{ line.credit_amount|floatformat:2 }}
{% else %}
—
{% endif %}
TOTALS:
KES {{ total_debits|floatformat:2 }}
KES {{ total_credits|floatformat:2 }}
Entry is balanced (Debits = Credits)
WARNING: Entry is not balanced! Difference: KES {{ total_debits|add:"-"|add:total_credits|floatformat:2 }}

Audit Trail

{{ entry.created_by.get_full_name|default:entry.created_by.username }}

{{ entry.created_at|date:"Y-m-d H:i:s" }}

{% if entry.posted_by %}

{{ entry.posted_by.get_full_name|default:entry.posted_by.username }}

{{ entry.posted_at|date:"Y-m-d H:i:s" }}

{% endif %} {% if entry.reverses %}

{{ entry.reverses.reference_number }}

{% endif %}
{% endblock %}