Add codification of tax rates (#4372)

* draft

* .

* Rebase migration

* Update src/pretix/base/models/tax.py

Co-authored-by: Mira <weller@rami.io>

* Test, isort, flake, migration rebase

* carry data & API

* Fix failing tests

* docs fixes

* Improve validation

* Tests

* More fixes

---------

Co-authored-by: Mira <weller@rami.io>
This commit is contained in:
Raphael Michel
2024-12-13 12:04:38 +01:00
committed by GitHub
parent a4385c8b6e
commit 53f129d5d3
36 changed files with 818 additions and 124 deletions

View File

@@ -202,6 +202,12 @@
+ {{ position.tax_rate }}%)
</small>
{% endif %}
{% if position.tax_code %}
<br>
<small>
{{ position.get_tax_code_display }}
</small>
{% endif %}
</div>
<div class="col-sm-4 field-container">
{% bootstrap_field position.form.price addon_after=request.event.currency layout='inline' %}
@@ -420,6 +426,12 @@
+ {{ fee.tax_rate }}%)
</small>
{% endif %}
{% if fee.tax_code %}
<br>
<small>
{{ fee.get_tax_code_display }}
</small>
{% endif %}
</div>
<div class="col-sm-4 field-container">
{% bootstrap_field fee.form.value addon_after=request.event.currency layout='inline' %}

View File

@@ -19,6 +19,7 @@
<th>{% trans "Date" %}</th>
<th>{% trans "Product" %}</th>
<th class="text-right flip">{% trans "Tax rate" %}</th>
<th>{% trans "Tax code" %}</th>
<th class="text-right flip">{% trans "Quantity" %}</th>
<th class="text-right flip">{% trans "Single price" %}</th>
<th class="text-right flip">{% trans "Total tax value" %}</th>
@@ -52,6 +53,7 @@
{% endif %}
</td>
<td class="text-right flip">{{ t.tax_rate }} %</td>
<td>{{ t.get_tax_code_display }}</td>
<td class="text-right flip">{{ t.count }} &times;</td>
<td class="text-right flip">{{ t.price|money:request.event.currency }}</td>
<td class="text-right flip">{{ t.full_tax_value|money:request.event.currency }}</td>
@@ -64,8 +66,8 @@
<td>
<strong>{% trans "Sum" %}</strong>
</td>
<td>
</td>
<td></td>
<td></td>
<td></td>
<td class="text-right flip">
<strong>