Order change interface: Fix taxation edge case

This commit is contained in:
Raphael Michel
2019-06-05 09:18:03 +02:00
parent bd79a93737
commit 55edc8a3d6
2 changed files with 7 additions and 8 deletions

View File

@@ -292,10 +292,7 @@ class OrderPositionChangeForm(forms.Form):
instance = kwargs.pop('instance')
initial = kwargs.get('initial', {})
if instance.item.tax_rule and not instance.item.tax_rule.price_includes_tax:
initial['price'] = instance.price - instance.tax_value
else:
initial['price'] = instance.price
initial['price'] = instance.price
kwargs['initial'] = initial
super().__init__(*args, **kwargs)

View File

@@ -121,11 +121,13 @@
<strong>{% trans "Price" %}</strong>
</div>
<div class="col-sm-5">
{{ position.price|money:request.event.currency }}<br>
{{ position.price|money:request.event.currency }}
{% if position.tax_rate %}
<small>{% blocktrans trimmed with rate=position.tax_rate name=position.tax_rule.name %}
<strong>incl.</strong> {{ rate }}% {{ name }}
{% endblocktrans %}</small>
<br>
<small>
({{ position.net_price|money:request.event.currency }}
+ {{ position.tax_rate }}%)
</small>
{% endif %}
</div>
<div class="col-sm-4 field-container">