Convert CGT adjustments report to Tailwind CSS
This commit is contained in:
parent
e4d5a6a960
commit
65ed39c02b
@ -1,5 +1,5 @@
|
||||
{# DrCr: Web-based double-entry bookkeeping framework
|
||||
Copyright (C) 2022–2023 Lee Yingtong Li (RunasSudo)
|
||||
Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
|
||||
|
||||
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
|
||||
@ -15,43 +15,61 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'base_tailwind.html' %}
|
||||
{% block title %}CGT adjustments{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="h2 my-4">CGT adjustments</h1>
|
||||
<h1 class="text-3xl text-gray-900">
|
||||
CGT adjustments
|
||||
</h1>
|
||||
|
||||
<div class="mb-2">
|
||||
<a href="{{ url_for('cgt_adjustment_new') }}" class="btn btn-primary"><i class="bi bi-plus-lg"></i> New CGT adjustment</a>
|
||||
<a href="{{ url_for('cgt_adjustment_multinew') }}" class="btn btn-outline-primary"><i class="bi bi-plus-lg"></i> Multiple CGT adjustments</a>
|
||||
<div class="my-4 flex gap-x-2">
|
||||
<a href="{{ url_for('cgt_adjustment_new') }}" class="inline-flex items-center gap-x-1.5 bg-emerald-600 pl-2 pr-3 py-1 text-white shadow-sm hover:bg-emerald-700">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
New CGT adjustment
|
||||
</a>
|
||||
<a href="{{ url_for('cgt_adjustment_multinew') }}" class="inline-flex items-center gap-x-1.5 pl-2 pr-3 py-1 text-emerald-700 ring-1 ring-inset ring-emerald-600 hover:bg-gray-50">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
Multiple CGT adjustments
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<table class="min-w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
<th>Asset</th>
|
||||
<th class="text-end">Units</th>
|
||||
<th>Acquisition date</th>
|
||||
<th class="text-end">Acquisition value</th>
|
||||
<th>Adjustment date</th>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Cost adjustment </th>
|
||||
<tr class="border-b border-gray-300">
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-start">Account</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-start">Asset</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-end">Units</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-start">Acquisition date</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-end">Acquisition value</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-start">Adjustment date</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-start">Description</th>
|
||||
<th class="py-0.5 pr-2 text-gray-900 font-semibold text-end">Cost adjustment </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cgt_adjustment in cgt_adjustments %}
|
||||
<tr>
|
||||
<td>{{ cgt_adjustment.account }}</td>
|
||||
<td>{{ cgt_adjustment.asset().commodity_name() }}</td>
|
||||
<td class="text-end">{{ cgt_adjustment.asset().format('hide') }}</td>
|
||||
<td>{{ cgt_adjustment.acquisition_date.strftime('%Y-%m-%d') }}</td>
|
||||
<td class="text-end">{{ cgt_adjustment.asset().as_cost().format() }}</td>
|
||||
<td>{{ cgt_adjustment.dt.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ cgt_adjustment.description }}</td>
|
||||
<td class="text-end">{{ cgt_adjustment.cost_adjustment_amount().format_accounting() }}</td>
|
||||
<td><a href="{{ url_for('cgt_adjustment_edit', id=cgt_adjustment.id) }}"><i class="bi bi-pencil"></i></a></td>
|
||||
<td class="py-0.5 pr-2 text-gray-900">{{ cgt_adjustment.account }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900">{{ cgt_adjustment.asset().commodity_name() }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900 text-end">{{ cgt_adjustment.asset().format('hide') }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900">{{ cgt_adjustment.acquisition_date.strftime('%Y-%m-%d') }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900 text-end">{{ cgt_adjustment.asset().as_cost().format() }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900">{{ cgt_adjustment.dt.strftime('%Y-%m-%d') }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900">{{ cgt_adjustment.description }}</td>
|
||||
<td class="py-0.5 pr-2 text-gray-900 text-end">{{ cgt_adjustment.cost_adjustment_amount().format_accounting() }}</td>
|
||||
<td class="py-0.5 text-end">
|
||||
<a href="{{ url_for('cgt_adjustment_edit', id=cgt_adjustment.id) }}" class="text-gray-500 hover:text-gray-700">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 inline align-middle -mt-0.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
|
||||
</svg>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user