mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Work event item frontend
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
<tr id="item-{{item.pk}}" data-url="{% url 'api_secure' item.pk %}" data-pk="{{item.pk}}" class="item_row">
|
||||
<tr id="item-{{item.pk}}" data-pk="{{item.pk}}" class="item_row">
|
||||
<td>
|
||||
<span class="name">{{ item.name }}</span>
|
||||
{% if item.description %}
|
||||
<div class="description">
|
||||
<em>{{item.description|linebreaksbr}}</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<em class="description">{{item.description|linebreaksbr}}</em>
|
||||
</div>
|
||||
</td>
|
||||
<td>£ <span class="cost">{{item.cost|floatformat:2}}</span></td>
|
||||
<td class="quantity">{{item.quantity}}</td>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody id="item-table-body">
|
||||
{% for item in object.items.all %}
|
||||
{% include 'RIGS/item_row.html' %}
|
||||
{% endfor %}
|
||||
@@ -26,17 +26,41 @@
|
||||
<tr>
|
||||
<td rowspan="3" colspan="2"></td>
|
||||
<td>Sum Total</td>
|
||||
<td colspan="2">£ <span id="sumtotal">{{object.sum_total}}</span></td>
|
||||
<td colspan="2">£ <span id="sumtotal">{{object.sum_total|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="vat-rate" data-rate="{{object.vat_rate.rate}}">VAT @
|
||||
{{object.vat_rate.as_percent|floatformat}}%</td>
|
||||
<td colspan="2">£ <span id="vat">{{object.vat|floatformat:2}}</span></td>
|
||||
{{object.vat_rate.as_percent|floatformat|default:"TBD"}}%</td>
|
||||
<td colspan="2">£ <span id="vat">{{object.vat|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td colspan="2">£ <span id="total">{{object.total|floatformat:2}}</span></td>
|
||||
<td colspan="2">£ <span id="total">{{object.total|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<table class="hidden invisible">
|
||||
<tr id="new-item-row" class="item_row">
|
||||
<td>
|
||||
<span class="name"></span>
|
||||
<div class="description">
|
||||
<em></em>
|
||||
</div>
|
||||
</td>
|
||||
<td>£ <span class="cost"></span></td>
|
||||
<td class="quantity"></td>
|
||||
<td>£ <span class="sub-total"></span></td>
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
<button type="button" class="item-edit btn btn-xs btn-default"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</button>
|
||||
<button type="button" class="item-delete btn btn-xs btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user