mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
New data model for default tax rule and new options for cancellation fees (#4962)
* New data model for default tax rule * Remove misleading empty label when field is not optional * Allow to split cancellation fee * Fix API and tests * Update migration * Update src/tests/api/test_taxrules.py Co-authored-by: luelista <weller@rami.io> * Update src/tests/api/test_taxrules.py Co-authored-by: luelista <weller@rami.io> * Review note * Update src/pretix/base/models/tax.py Co-authored-by: luelista <weller@rami.io> * Flip API behaviour for default * Fix failing tests * Fix failing test * Split migration --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -50,7 +50,7 @@ def item2(event2):
|
||||
|
||||
@pytest.fixture
|
||||
def taxrule(event):
|
||||
return event.tax_rules.create(rate=Decimal('19.00'), code="S/standard")
|
||||
return event.tax_rules.create(rate=Decimal('19.00'), code="S/standard", default=True)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -1351,7 +1351,7 @@ def test_order_mark_canceled_pending(token_client, organizer, event, order):
|
||||
@pytest.mark.django_db
|
||||
def test_order_mark_canceled_pending_fee_with_tax(token_client, organizer, event, order, taxrule):
|
||||
djmail.outbox = []
|
||||
event.settings.tax_rate_default = taxrule
|
||||
event.settings.tax_rule_cancellation = "default"
|
||||
resp = token_client.post(
|
||||
'/api/v1/organizers/{}/events/{}/orders/{}/mark_canceled/'.format(
|
||||
organizer.slug, event.slug, order.code
|
||||
|
||||
Reference in New Issue
Block a user