mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
CHANGE: Do not add VAT on internal events
This concurs with discussions with the SU
This commit is contained in:
@@ -369,6 +369,9 @@ class Event(models.Model, RevisionMixin):
|
||||
|
||||
@property
|
||||
def vat(self):
|
||||
# No VAT is owed on internal transfers
|
||||
if self.internal:
|
||||
return 0
|
||||
return Decimal(self.sum_total * self.vat_rate.rate).quantize(Decimal('.01'))
|
||||
|
||||
"""
|
||||
|
||||
@@ -190,19 +190,21 @@
|
||||
{% endif %}
|
||||
</para>
|
||||
</td>
|
||||
<td>£ {{ item.cost|floatformat:2 }}</td>
|
||||
<td>£{{ item.cost|floatformat:2 }}</td>
|
||||
<td>{{ item.quantity }}</td>
|
||||
<td>£ {{ item.total_cost|floatformat:2 }}</td>
|
||||
<td>£{{ item.total_cost|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</blockTable>
|
||||
<keepTogether>
|
||||
<blockTable style="totalTable" colWidths="300,115,80">
|
||||
{% if object.vat > 0 %}
|
||||
<tr>
|
||||
<td>{% if quote %}VAT Registration Number: 170734807{% endif %}</td>
|
||||
<td>Total (ex. VAT)</td>
|
||||
<td>{% if quote %}VAT Registration Number: 170734807</td>
|
||||
<td>Total (ex. VAT){% endif %}</td>
|
||||
<td>£ {{ object.sum_total|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if quote %}
|
||||
@@ -211,8 +213,10 @@
|
||||
</para>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if object.vat > 0 %}
|
||||
<td>VAT @ {{ object.vat_rate.as_percent|floatformat:2 }}%</td>
|
||||
<td>£ {{ object.vat|floatformat:2 }}</td>
|
||||
<td>£{{ object.vat|floatformat:2 }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -224,7 +228,7 @@
|
||||
</td>
|
||||
{% if invoice %}
|
||||
<td>Total</td>
|
||||
<td>£ {{ object.total|floatformat:2 }}</td>
|
||||
<td>£{{ object.total|floatformat:2 }}</td>
|
||||
{% else %}
|
||||
<td>
|
||||
<para>
|
||||
@@ -233,7 +237,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
<b>£ {{ object.total|floatformat:2 }}</b>
|
||||
<b>£{{ object.total|floatformat:2 }}</b>
|
||||
</para>
|
||||
</td>
|
||||
{% endif %}
|
||||
@@ -267,7 +271,7 @@
|
||||
<tr>
|
||||
<td>{{ payment.get_method_display }}</td>
|
||||
<td>{{ payment.date }}</td>
|
||||
<td>£ {{ payment.amount|floatformat:2 }}</td>
|
||||
<td>£{{ payment.amount|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</blockTable>
|
||||
@@ -275,18 +279,18 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Payment Total</td>
|
||||
<td>£ {{ object.invoice.payment_total|floatformat:2 }}</td>
|
||||
<td>£{{ object.invoice.payment_total|floatformat:2 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<para>
|
||||
<b>Balance</b> (ex. VAT)
|
||||
<b>Balance</b> {% if object.vat > 0 %}(ex. VAT){% endif %}
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
<b>£ {{ object.invoice.balance|floatformat:2 }}</b>
|
||||
<b>£{{ object.invoice.balance|floatformat:2 }}</b>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -316,7 +320,7 @@
|
||||
<tr>
|
||||
<td>General Enquires and 24 Hour Emergency Contact: 0115 84 68720</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{% elif object.vat > 0 %}
|
||||
<tr>
|
||||
<td>
|
||||
<para>VAT Registration Number: 170734807</para>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
</div>
|
||||
</th>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<td>£ <span class="cost">{{item.cost|floatformat:2}}</span></td>
|
||||
<td>£<span class="cost">{{item.cost|floatformat:2}}</span></td>
|
||||
{% endif %}
|
||||
<td class="quantity">{{item.quantity}}</td>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<td>£ <span class="sub-total" data-subtotal="{{item.total_cost}}">{{item.total_cost|floatformat:2}}</span></td>
|
||||
<td>£<span class="sub-total" data-subtotal="{{item.total_cost}}">{{item.total_cost|floatformat:2}}</span></td>
|
||||
{% endif %}
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% if auth or perms.RIGS.view_event %}
|
||||
<tfoot>
|
||||
<tfoot style="font-weight: bold">
|
||||
<tr>
|
||||
<td rowspan="3" colspan="2"></td>
|
||||
<td>Total (ex. VAT)</td>
|
||||
<td colspan="2">£ <span id="sumtotal">{{object.sum_total|default:0|floatformat:2}}</span></td>
|
||||
<td>Total {% if object.vat > 0 or not object.pk %}(ex. VAT){% endif %}</td>
|
||||
<td colspan="2">£<span id="sumtotal">{{object.sum_total|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
{% if object.vat > 0 or not object.pk %}
|
||||
<tr>
|
||||
{% if not object.pk %}
|
||||
<td id="vat-rate" data-rate="{{currentVAT.rate}}">VAT @
|
||||
@@ -41,12 +42,13 @@
|
||||
<td id="vat-rate" data-rate="{{object.vat_rate.rate}}">VAT @
|
||||
{{object.vat_rate.as_percent|floatformat|default:"TBD"}}%</td>
|
||||
{% endif %}
|
||||
<td colspan="2">£ <span id="vat">{{object.vat|default:0|floatformat:2}}</span></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|default:0|floatformat:2}}</span></td>
|
||||
<td colspan="2">£<span id="total">{{object.total|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tfoot>
|
||||
{% endif %}
|
||||
</table>
|
||||
@@ -59,9 +61,9 @@
|
||||
<em class="description"></em>
|
||||
</div>
|
||||
</td>
|
||||
<td>£ <span class="cost"></span></td>
|
||||
<td>£<span class="cost"></span></td>
|
||||
<td class="quantity"></td>
|
||||
<td>£ <span class="sub-total"></span></td>
|
||||
<td>£<span class="sub-total"></span></td>
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
<div class="btn-group" role="group" aria-label="Action buttons">
|
||||
|
||||
Reference in New Issue
Block a user