Convert trial balance report to Tailwind CSS
This commit is contained in:
parent
0b0ba703e0
commit
89e177983e
@ -1,5 +1,5 @@
|
|||||||
{# DrCr: Web-based double-entry bookkeeping framework
|
{# DrCr: Web-based double-entry bookkeeping framework
|
||||||
Copyright (C) 2022 Lee Yingtong Li (RunasSudo)
|
Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -15,32 +15,34 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% extends 'base.html' %}
|
{% extends 'base_tailwind.html' %}
|
||||||
{% block title %}Trial balance{% endblock %}
|
{% block title %}Trial balance{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="h2 my-4">Trial balance</h1>
|
<h1 class="text-3xl text-gray-900 mb-4">
|
||||||
|
Trial balance
|
||||||
|
</h1>
|
||||||
|
|
||||||
<table class="table">
|
<table class="min-w-full">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr class="border-b border-gray-300">
|
||||||
<th>Account</th>
|
<th class="py-0.5 text-gray-900 font-semibold text-start">Account</th>
|
||||||
<th class="text-end">Dr</th>
|
<th class="py-0.5 text-gray-900 font-semibold text-end">Dr</th>
|
||||||
<th class="text-end">Cr</th>
|
<th class="py-0.5 text-gray-900 font-semibold text-end">Cr</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for name, balance in accounts.items() %}
|
{% for name, balance in accounts.items() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url_for('account_transactions', account=name) }}">{{ name }}</a></td>
|
<td class="py-0.5 text-gray-900"><a href="{{ url_for('account_transactions', account=name) }}" class="hover:text-blue-700 hover:underline">{{ name }}</a></td>
|
||||||
<td class="text-end">{{ balance.format() if balance.quantity >= 0 else '' }}</td>
|
<td class="py-0.5 text-gray-900 text-end">{{ balance.format() if balance.quantity >= 0 else '' }}</td>
|
||||||
<td class="text-end">{{ (balance|abs).format() if balance.quantity < 0 else '' }}</td>
|
<td class="py-0.5 text-gray-900 text-end">{{ (balance|abs).format() if balance.quantity < 0 else '' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>Total</th>
|
<th class="py-0.5 text-gray-900 font-semibold text-start">Total</th>
|
||||||
<th class="text-end">{{ total_dr.format() }}</th>
|
<th class="py-0.5 text-gray-900 text-end">{{ total_dr.format() }}</th>
|
||||||
<th class="text-end">{{ (total_cr|abs).format() }}</th>
|
<th class="py-0.5 text-gray-900 text-end">{{ (total_cr|abs).format() }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user