austax: Add link to directly add CGT cost adjustment from CGT asset report

This commit is contained in:
RunasSudo 2023-01-07 15:00:54 +11:00
parent 1afc48f218
commit 0df8ccfaa1
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 7 additions and 4 deletions

View File

@ -27,19 +27,19 @@
<div class="row mb-2"> <div class="row mb-2">
<label class="col-sm-2 col-form-label">Acquisition date</label> <label class="col-sm-2 col-form-label">Acquisition date</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="date" class="form-control" name="acquisition_date" value="{{ adjustment.acquisition_date.strftime('%Y-%m-%d') if adjustment }}"> <input type="date" class="form-control" name="acquisition_date" value="{{ adjustment.acquisition_date.strftime('%Y-%m-%d') if adjustment else request.args.get('acquisition_date', '') }}">
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<label class="col-sm-2 col-form-label">Account</label> <label class="col-sm-2 col-form-label">Account</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" name="account" value="{{ adjustment.account if adjustment }}"> <input type="text" class="form-control" name="account" value="{{ adjustment.account if adjustment else request.args.get('account', '') }}">
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<label class="col-sm-2 col-form-label">Asset</label> <label class="col-sm-2 col-form-label">Asset</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" name="asset" value="{{ adjustment.asset().quantity_string() if adjustment }}"> <input type="text" class="form-control" name="asset" value="{{ adjustment.asset().quantity_string() if adjustment else request.args.get('asset', '') }}">
</div> </div>
</div> </div>

View File

@ -29,6 +29,7 @@
<th style="border-bottom-width:0"></th> <th style="border-bottom-width:0"></th>
<th style="border-left-width:1px" colspan="2">Acquisition</th> <th style="border-left-width:1px" colspan="2">Acquisition</th>
<th style="border-left-width:1px" colspan="2">Adjustment</th> <th style="border-left-width:1px" colspan="2">Adjustment</th>
<th class="d-print-none"></th>
<th style="border-left-width:1px" colspan="2">Disposal</th> <th style="border-left-width:1px" colspan="2">Disposal</th>
<th style="border-bottom-width:0;border-left-width:1px"></th> <th style="border-bottom-width:0;border-left-width:1px"></th>
</tr> </tr>
@ -40,6 +41,7 @@
<th class="text-end">Value</th> <th class="text-end">Value</th>
<th style="border-left-width:1px" class="text-end">b/f&nbsp;</th> <th style="border-left-width:1px" class="text-end">b/f&nbsp;</th>
<th class="text-end">{{ eofy_date.year }}</th> <th class="text-end">{{ eofy_date.year }}</th>
<th class="d-print-none"></th>
<th style="border-left-width:1px">Date</th> <th style="border-left-width:1px">Date</th>
<th class="text-end">Value</th> <th class="text-end">Value</th>
<th style="border-left-width:1px" class="text-end">Gain&nbsp;</th> <th style="border-left-width:1px" class="text-end">Gain&nbsp;</th>
@ -54,7 +56,8 @@
<td style="border-left-width:1px">{{ asset.acquisition_date.strftime('%Y-%m-%d') }}</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 class="text-end">{{ asset.as_cost().format() }}</td>
<td style="border-left-width:1px" class="text-end">{{ asset.cost_adjustment().format_accounting() if asset.cost_adjustments }}</td> <td style="border-left-width:1px" class="text-end">{{ asset.cost_adjustment().format_accounting() if asset.cost_adjustments }}</td>
<td></td> <td>{# TODO #}</td>
<td class="text-center d-print-none"><a href="/tax/cgt-adjustments/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>
<td style="border-left-width:1px">{{ asset.disposal_date.strftime('%Y-%m-%d') if asset.disposal_date else '' }}</td> <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> <td class="text-end">{{ asset.disposal_value.format() if asset.disposal_value else '' }}</td>
<td style="border-left-width:1px" class="text-end">{% if asset.disposal_date %}{{ asset.gain().format_accounting() }}{% endif %}</td> <td style="border-left-width:1px" class="text-end">{% if asset.disposal_date %}{{ asset.gain().format_accounting() }}{% endif %}</td>