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

@@ -234,6 +234,7 @@ def test_reverse_charge_note(env):
assert inv.foreign_currency_rate == Decimal("4.2408")
assert inv.foreign_currency_rate_date == date.today()
assert inv.foreign_currency_source == 'eu:ecb:eurofxref-daily'
assert inv.lines.first().tax_code == "AE"
@pytest.mark.django_db
@@ -249,6 +250,7 @@ def test_custom_tax_note(env):
'address_type': '',
'action': 'vat',
'rate': '20',
'code': 'S/reduced',
'invoice_text': {
'de': 'Polnische Steuer anwendbar',
'en': 'Polish tax applies'
@@ -268,6 +270,7 @@ def test_custom_tax_note(env):
inv = generate_invoice(order)
assert "Polish tax applies" in inv.additional_text
assert inv.lines.first().tax_code == "S/reduced"
@pytest.mark.django_db