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