mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Prevent accumulation of tax rates when copying events
This commit is contained in:
@@ -176,12 +176,6 @@ class EventWizard(SessionWizardView):
|
||||
active=True
|
||||
)
|
||||
|
||||
if basics_data['tax_rate']:
|
||||
event.settings.tax_rate_default = event.tax_rules.create(
|
||||
name=LazyI18nString.from_gettext(ugettext('VAT')),
|
||||
rate=basics_data['tax_rate']
|
||||
)
|
||||
|
||||
logdata = {}
|
||||
for f in form_list:
|
||||
logdata.update({
|
||||
@@ -204,6 +198,13 @@ class EventWizard(SessionWizardView):
|
||||
all_products=True
|
||||
)
|
||||
|
||||
if basics_data['tax_rate']:
|
||||
if not event.settings.tax_rate_default or event.settings.tax_rate_default.rate != basics_data['tax_rate']:
|
||||
event.settings.tax_rate_default = event.tax_rules.create(
|
||||
name=LazyI18nString.from_gettext(ugettext('VAT')),
|
||||
rate=basics_data['tax_rate']
|
||||
)
|
||||
|
||||
event.settings.set('timezone', basics_data['timezone'])
|
||||
event.settings.set('locale', basics_data['locale'])
|
||||
event.settings.set('locales', foundation_data['locales'])
|
||||
|
||||
Reference in New Issue
Block a user