DrCr/austax/templates/cgt_assets.html

69 lines
3.6 KiB
HTML
Raw Normal View History

2023-01-07 02:05:21 +11:00
{# DrCr: Web-based double-entry bookkeeping framework
Copyright (C) 2022–2023 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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% extends 'base.html' %}
{% block title %}CGT assets{% endblock %}
{% block content %}
<h1 class="h2 mt-4">CGT assets</h1>
<table class="table">
<thead>
<tr>
<th style="border-bottom-width:0"></th>
<th style="border-bottom-width:0"></th>
<th style="border-bottom-width:0"></th>
<th style="border-left-width:1px" colspan="2">Acquisition</th>
2023-01-07 14:07:58 +11:00
<th style="border-left-width:1px" colspan="2">Adjustment</th>
<th class="d-print-none"></th>
2023-01-07 02:05:21 +11:00
<th style="border-left-width:1px" colspan="2">Disposal</th>
<th style="border-bottom-width:0;border-left-width:1px"></th>
</tr>
<tr>
<th>Account</th>
<th>Asset</th>
<th class="text-end">Units</th>
<th style="border-left-width:1px">Date</th>
<th class="text-end">Value</th>
2023-01-07 14:07:58 +11:00
<th style="border-left-width:1px" class="text-end">b/f&nbsp;</th>
<th class="text-end">{{ eofy_date.year }}</th>
<th class="d-print-none"></th>
2023-01-07 02:05:21 +11:00
<th style="border-left-width:1px">Date</th>
<th class="text-end">Value</th>
<th style="border-left-width:1px" class="text-end">Gain&nbsp;</th>
</tr>
</thead>
<tbody>
{% for asset in assets %}
<tr>
2023-01-07 19:01:05 +11:00
<td><a href="{{ url_for('account_transactions', account=asset.account, commodity_detail=1) }}">{{ asset.account }}</a></td>
2023-01-07 02:05:21 +11:00
<td>{{ asset.commodity_name() }}</td>
<td class="text-end">{{ asset.format('hide') }}</td>
<td style="border-left-width:1px">{{ asset.acquisition_date.strftime('%Y-%m-%d') }}</td>
<td class="text-end">{{ asset.as_cost().format() }}</td>
<td style="border-left-width:1px" class="text-end">{{ asset.cost_adjustment_brought_forward().format_accounting(link=url_for('cgt_adjustments', account=asset.account, commodity=asset.commodity, quantity=asset.quantity, acquisition_date=asset.acquisition_date.strftime('%Y-%m-%d'))) if asset.cost_adjustment_brought_forward().quantity != 0 }}</td>
<td class="text-end">{{ asset.cost_adjustment_current_period().format_accounting(link=url_for('cgt_adjustments', account=asset.account, commodity=asset.commodity, quantity=asset.quantity, acquisition_date=asset.acquisition_date.strftime('%Y-%m-%d'))) if asset.cost_adjustment_current_period().quantity != 0 }}</td>
2023-01-07 19:01:05 +11:00
<td class="text-center d-print-none"><a href="{{ url_for('cgt_adjustment_new', account=asset.account, asset=asset.quantity_string(), acquisition_date=asset.acquisition_date.strftime('%Y-%m-%d')) }}"><i class="bi bi-plus-lg text-muted"></i></a></td>
2023-01-07 02:05:21 +11:00
<td style="border-left-width:1px">{{ asset.disposal_date.strftime('%Y-%m-%d') if asset.disposal_date else '' }}</td>
<td class="text-end">{{ asset.disposal_value.format() if asset.disposal_value else '' }}</td>
2023-01-07 14:07:58 +11:00
<td style="border-left-width:1px" class="text-end">{% if asset.disposal_date %}{{ asset.gain().format_accounting() }}{% endif %}</td>
2023-01-07 02:05:21 +11:00
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}