mirror of
https://github.com/pretix/pretix.git
synced 2026-08-25 13:12:00 +00:00
Order change interface: Fix taxation edge case
This commit is contained in:
@@ -292,10 +292,7 @@ class OrderPositionChangeForm(forms.Form):
|
|||||||
instance = kwargs.pop('instance')
|
instance = kwargs.pop('instance')
|
||||||
initial = kwargs.get('initial', {})
|
initial = kwargs.get('initial', {})
|
||||||
|
|
||||||
if instance.item.tax_rule and not instance.item.tax_rule.price_includes_tax:
|
initial['price'] = instance.price
|
||||||
initial['price'] = instance.price - instance.tax_value
|
|
||||||
else:
|
|
||||||
initial['price'] = instance.price
|
|
||||||
|
|
||||||
kwargs['initial'] = initial
|
kwargs['initial'] = initial
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|||||||
@@ -121,11 +121,13 @@
|
|||||||
<strong>{% trans "Price" %}</strong>
|
<strong>{% trans "Price" %}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
{{ position.price|money:request.event.currency }}<br>
|
{{ position.price|money:request.event.currency }}
|
||||||
{% if position.tax_rate %}
|
{% if position.tax_rate %}
|
||||||
<small>{% blocktrans trimmed with rate=position.tax_rate name=position.tax_rule.name %}
|
<br>
|
||||||
<strong>incl.</strong> {{ rate }}% {{ name }}
|
<small>
|
||||||
{% endblocktrans %}</small>
|
({{ position.net_price|money:request.event.currency }}
|
||||||
|
+ {{ position.tax_rate }}%)
|
||||||
|
</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 field-container">
|
<div class="col-sm-4 field-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user