Tax rules and reverse charge (#559)

Tax rules and reverse charge
This commit is contained in:
Raphael Michel
2017-08-23 13:13:16 +03:00
committed by GitHub
parent b9ec5ea83c
commit 56338be13e
82 changed files with 2934 additions and 428 deletions

View File

@@ -103,8 +103,18 @@
{% if position.form.operation.value == "price" %}checked="checked"{% endif %}>
{% trans "Change price to" %}
{% bootstrap_field position.form.price layout='inline' %}
{% if request.event.settings.display_net_prices %}
<em>{% trans "Enter a gross price including taxes." %}</em>
{% if position.apply_tax %}
{% if position.item.tax_rule and not position.item.tax_rule.price_includes_tax %}
{% blocktrans trimmed with rate=position.item.tax_rule.rate name=position.item.tax_rule.name %}
<strong>plus</strong> {{ rate }}% {{ name }}
{% endblocktrans %}
{% elif position.item.tax_rule %}
{% blocktrans trimmed with rate=position.item.tax_rule.rate name=position.item.tax_rule.name %}
<strong>incl.</strong> {{ rate }}% {{ name }}
{% endblocktrans %}
{% endif %}
{% else %}
{% trans "no taxes apply" %}
{% endif %}
</label>
</div>
@@ -150,6 +160,24 @@
</div>
</div>
</div>
<div class="panel panel-default items">
<div class="panel-heading">
<h3 class="panel-title">
Other operations
</h3>
</div>
<div class="panel-body">
<div class="form-horizontal">
{% bootstrap_form_errors other_form %}
{% if other_form.custom_error %}
<div class="alert alert-danger">
{{ other_form.custom_error }}
</div>
{% endif %}
{% bootstrap_field other_form.recalculate_taxes layout='horizontal' %}
</div>
</div>
</div>
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">

View File

@@ -9,6 +9,7 @@
{% endblocktrans %}
{% endblock %}
{% block content %}
{% blocktrans asvar s_taxes %}taxes{% endblocktrans %}
<h1>
{% blocktrans trimmed with code=order.code %}
Order details: {{ code }}
@@ -239,16 +240,22 @@
{% if event.settings.display_net_prices %}
<strong>{{ event.currency }} {{ line.net_price|floatformat:2 }}</strong>
{% if line.tax_rate %}
<br /><small>{% blocktrans trimmed with rate=line.tax_rate %}
<strong>plus</strong> {{ rate }}% taxes
{% endblocktrans %}</small>
<br />
<small>
{% blocktrans trimmed with rate=line.tax_rate taxname=line.tax_rule.name|default:s_taxes %}
<strong>plus</strong> {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% else %}
<strong>{{ event.currency }} {{ line.price|floatformat:2 }}</strong>
{% if line.tax_rate %}
<br /><small>{% blocktrans trimmed with rate=line.tax_rate %}
incl. {{ rate }}% taxes
{% endblocktrans %}</small>
<br />
<small>
{% blocktrans trimmed with rate=line.tax_rate taxname=line.tax_rule.name|default:s_taxes %}
incl. {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% endif %}
</div>
@@ -265,17 +272,21 @@
<strong>{{ event.currency }} {{ order.payment_fee_net|floatformat:2 }}</strong>
{% if order.payment_fee_tax_rate %}
<br/>
<small>{% blocktrans trimmed with rate=order.payment_fee_tax_rate %}
<strong>plus</strong> {{ rate }}% taxes
{% endblocktrans %}</small>
<small>
{% blocktrans trimmed with rate=order.payment_fee_tax_rate taxname=order.payment_fee_tax_rule.name|default:s_taxes %}
<strong>plus</strong> {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% else %}
<strong>{{ event.currency }} {{ items.payment_fee|floatformat:2 }}</strong>
{% if order.payment_fee_tax_rate %}
<br/>
<small>{% blocktrans trimmed with rate=order.payment_fee_tax_rate %}
incl. {{ rate }}% taxes
{% endblocktrans %}</small>
<small>
{% blocktrans trimmed with rate=order.payment_fee_tax_rate taxname=order.payment_fee_tax_rule.name|default:s_taxes %}
incl. {{ rate }}% {{ taxname }}
{% endblocktrans %}
</small>
{% endif %}
{% endif %}
</div>
@@ -358,7 +369,20 @@
<dd>{{ order.invoice_address.country.name|default:order.invoice_address.country_old }}</dd>
{% if request.event.settings.invoice_address_vatid %}
<dt>{% trans "VAT ID" %}</dt>
<dd>{{ order.invoice_address.vat_id }}</dd>
<dd>
{{ order.invoice_address.vat_id }}
{% if order.invoice_address.vat_id_validated %}
<span class="fa fa-check" data-toggle="tooltip" title="{% blocktrans trimmed %}Valid EU VAT ID{% endblocktrans %}"></span>
{% else %}
<form class="form-inline helper-display-inline" method="post"
action="{% url "control:event.order.checkvatid" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% csrf_token %}
<button class="btn btn-default btn-xs">
{% trans "Check" %}
</button>
</form>
{% endif %}
</dd>
{% endif %}
</dl>
</div>