haikal/templates/ledger/ledger/ledger_detail.html

131 lines
7.1 KiB
HTML

{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load django_ledger %}
{% block title %}
{% trans 'ledger Detail' %}
{% endblock title %}
{% block content %}
<div class="row">
<div class="col-md-4">
<div class="row">
<div class="col-12 mb-4">
{% include 'ledger/journal_entry/includes/card_invoice.html' with invoice=invoice entity_slug=view.kwargs.entity_slug style='invoice-detail' %}
</div>
<div class="col-12 mb-4"></div>
<div class="col-12">
<a class="btn btn-phoenix-info btn-block" href="#">{% trans 'Invoice List' %}</a>
</div>
</div>
</div>
<div class="col-md-8">
<div class="row">
<div class="col-12 mb-4">
<div class="d-flex justify-content-around text-center">
<div>
<p class="text-muted">
{% trans 'Cash Account' %}:
<a href="#" class="text-danger">{{ invoice.cash_account.code }}</a>
</p>
<p class="h4">{% currency_symbol %}{{ invoice.get_amount_cash | absolute | currency_format }}</p>
</div>
{% if invoice.accrue %}
<div>
<p class="text-muted">
{% trans 'Accounts Receivable' %}:
<a href="#" class="text-danger">{{ invoice.prepaid_account.code }}</a>
</p>
<p class="h4 text-success">{% currency_symbol %}{{ invoice.get_amount_prepaid | currency_format }}</p>
</div>
<div>
<p class="text-muted">
{% trans 'Deferred Revenue' %}:
<a href="#" class="text-danger">{{ invoice.unearned_account.code }}</a>
</p>
<p class="h4 text-danger">{% currency_symbol %}{{ invoice.get_amount_unearned | currency_format }}</p>
</div>
<div>
<p class="text-muted">{% trans "Accrued"%} {{ invoice.get_progress_percent }}%</p>
<p class="h4">{% currency_symbol %}{{ invoice.get_amount_earned | currency_format }}</p>
</div>
{% else %}
<div>
<p class="text-muted">{% trans "You Are Owed" %}</p>
<p class="h4 text-success">{% currency_symbol %}{{ invoice.get_amount_open | currency_format }}</p>
</div>
{% endif %}
</div>
</div>
<div class="col-12 mb-4">
<div class="card">
<div class="card-header">
<h2 class="card-title h3">
<span class="me-2">{% icon 'grommet-icons:transaction' 36 %}</span>
{% trans 'Invoice Items' %}
</h2>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{% trans 'Item' %}</th>
<th>{% trans 'Unit Cost' %}</th>
<th>{% trans 'Quantity' %}</th>
<th>{% trans 'Total' %}</th>
</tr>
</thead>
<tbody>
{% for invoice_item in itemtxs_qs %}
<tr>
<td>{{ invoice_item.item_model }}</td>
<td>{% currency_symbol %}{{ invoice_item.unit_cost | currency_format }}</td>
<td>{{ invoice_item.quantity }}</td>
<td>{% currency_symbol %}{{ invoice_item.total_amount | currency_format }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{% trans 'Total' %}</th>
<th>{% currency_symbol %}{{ total_amount_due | currency_format }}</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
{% if invoice.is_active %}
<div class="col-12 mb-4">
<div class="d-flex justify-content-center gap-2">
<a href="#" class="btn btn-phoenix-info">{% trans 'Balance Sheet' %}</a>
<a href="#" class="btn btn-phoenix-info">{% trans 'Income Statement' %}</a>
<a href="#" class="btn btn-phoenix-info">{% trans 'Cash Flow Statement' %}</a>
</div>
<div class="col-12 mt-3">
<div class="d-flex justify-content-center gap-2">
<a href="#" class="btn btn-phoenix-success">{% trans 'Balance Sheet PDF' %}{% icon 'bytesize:download' 24 %}</a>
<a href="#" class="btn btn-phoenix-success">{% trans 'Income Statement PDF' %}{% icon 'bytesize:download' 24 %}</a>
<a href="#" class="btn btn-phoenix-success">{% trans 'Cash Flow Statement PDF' %}{% icon 'bytesize:download' 24 %}</a>
</div>
</div>
</div>
{% endif %}
<div class="col-12 mb-4">
<div class="card">
<div class="card-header">
<h2 class="card-title h3">
<span class="me-2">{% icon 'grommet-icons:transaction' 36 %}</span>
{% trans 'Invoice Transactions' %}
</h2>
</div>
<div class="card-body"></div>
</div>
</div>
<div class="col-12"></div>
</div>
</div>
</div>
{% endblock %}