2023-01-07 02:05:21 +11:00
|
|
|
{# DrCr: Web-based double-entry bookkeeping framework
|
2024-04-04 17:41:49 +11:00
|
|
|
Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
|
2023-01-07 02:05:21 +11:00
|
|
|
|
|
|
|
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/>.
|
|
|
|
#}
|
|
|
|
|
2024-04-04 17:41:49 +11:00
|
|
|
{% extends 'base_tailwind.html' %}
|
2023-01-07 02:05:21 +11:00
|
|
|
{% block title %}CGT assets{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-04-04 17:41:49 +11:00
|
|
|
<h1 class="text-3xl text-gray-900">
|
|
|
|
CGT assets
|
|
|
|
</h1>
|
2023-01-07 02:05:21 +11:00
|
|
|
|
2024-04-04 17:41:49 +11:00
|
|
|
<table class="min-w-full">
|
2023-01-07 02:05:21 +11:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-04-04 17:41:49 +11:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-start border-l border-gray-300" colspan="2">Acquisition</th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-start border-l border-gray-300" colspan="2">Adjustment</th>
|
|
|
|
<th class="print:hidden"></th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-start border-l border-gray-300" colspan="2">Disposal</th>
|
|
|
|
<th class="border-l border-gray-300"></th>
|
2023-01-07 02:05:21 +11:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2024-04-04 17:41:49 +11:00
|
|
|
<th class="py-0.5 text-gray-900 font-semibold text-start">Account</th>
|
|
|
|
<th class="py-0.5 text-gray-900 font-semibold text-start">Asset</th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-end">Units</th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-start border-l border-gray-300">Date</th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-end">Value</th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-end border-l border-gray-300">b/f </th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-end">{{ eofy_date.year }}</th>
|
|
|
|
<th class="print:hidden"></th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-start border-l border-gray-300">Date</th>
|
|
|
|
<th class="py-0.5 px-1 text-gray-900 font-semibold text-end">Value</th>
|
|
|
|
<th class="py-0.5 pl-1 text-gray-900 font-semibold text-end border-l border-gray-300">Gain </th>
|
2023-01-07 02:05:21 +11:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for asset in assets %}
|
2024-04-04 17:41:49 +11:00
|
|
|
<tr class="border-t border-gray-300">
|
|
|
|
<td class="py-0.5 pr-1 text-gray-900">
|
|
|
|
<a href="{{ url_for('account_transactions', account=asset.account, commodity_detail=1) }}" class="hover:text-blue-700 hover:underline">{{ asset.account }}</a>
|
|
|
|
</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900">{{ asset.commodity_name() }}</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 text-end">{{ asset.format('hide') }}</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 border-l border-gray-300">{{ asset.acquisition_date.strftime('%Y-%m-%d') }}</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 text-end">{{ asset.as_cost().format() }}</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 text-end border-l border-gray-300">{{ 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="py-0.5 px-1 text-gray-900 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>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 text-center print:hidden">
|
|
|
|
<a href="{{ url_for('cgt_adjustment_new', account=asset.account, asset=asset.quantity_string(), acquisition_date=asset.acquisition_date.strftime('%Y-%m-%d')) }}" 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">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
|
|
|
|
</svg>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 border-l border-gray-300">{{ asset.disposal_date.strftime('%Y-%m-%d') if asset.disposal_date else '' }}</td>
|
|
|
|
<td class="py-0.5 px-1 text-gray-900 text-end">{{ asset.disposal_value.format() if asset.disposal_value else '' }}</td>
|
|
|
|
<td class="py-0.5 pl-1 text-gray-900 text-end border-l border-gray-300">{% if asset.disposal_date %}{{ asset.gain().format_accounting() }}{% endif %}</td>
|
2023-01-07 02:05:21 +11:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|