forked from github/pretix-servicefees
Add service fees based on order volume
This commit is contained in:
parent
089eec77ac
commit
c2e5dff72b
18 changed files with 134 additions and 4 deletions
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -48,5 +48,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr "Servicegebühr"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Servicegebühr (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr "Servicegebühr für Vorverkaufsstellen"
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr "Servicegebühr für Vorverkaufsstellen (%)"
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr "Servicegebühr"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Servicegebühr (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr "Servicegebühr für Vorverkaufsstellen"
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr "Servicegebühr für Vorverkaufsstellen (%)"
|
||||
|
|
|
@ -46,5 +46,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -48,5 +48,13 @@ msgid "Service fee"
|
|||
msgstr "Tarifa por servicio"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Tarifa por servicio (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -48,7 +48,15 @@ msgid "Service fee"
|
|||
msgstr "Frais de service"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Frais de service (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
#, fuzzy
|
||||
#| msgid "Service fees"
|
||||
msgid "Service fee with resellers"
|
||||
msgstr "Frais de service"
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr "Frais de service (%)"
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -50,5 +50,13 @@ msgid "Service fee"
|
|||
msgstr "Servicekosten"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Servicekosten (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr "Servicekosten voor wederverkopers"
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr "Servicekosten voor wederverkopers (%)"
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -50,5 +50,13 @@ msgid "Service fee"
|
|||
msgstr "Servicekosten"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Servicekosten (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr "Servicekosten voor wederverkopers"
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr "Servicekosten voor wederverkopers (%)"
|
||||
|
|
|
@ -45,5 +45,13 @@ msgid "Service fee"
|
|||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
msgid "Service fee with resellers"
|
||||
msgstr ""
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr ""
|
||||
|
|
|
@ -50,7 +50,15 @@ msgid "Service fee"
|
|||
msgstr "Servis ücreti"
|
||||
|
||||
#: pretix_servicefees/views.py:12
|
||||
msgid "Service fee (%)"
|
||||
msgstr "Servis ücreti (%)"
|
||||
|
||||
#: pretix_servicefees/views.py:13
|
||||
#, fuzzy
|
||||
#| msgid "Service fees"
|
||||
msgid "Service fee with resellers"
|
||||
msgstr "Servis ücretleri"
|
||||
|
||||
#: pretix_servicefees/views.py:14
|
||||
msgid "Service fee with resellers (%)"
|
||||
msgstr "Servis ücretleri (%)"
|
||||
|
|
|
@ -26,10 +26,16 @@ def navbar_settings(sender, request, **kwargs):
|
|||
|
||||
|
||||
def get_fees(event, total, invoice_address, mod=''):
|
||||
fee = event.settings.get('service_fee_abs' + mod, as_type=Decimal)
|
||||
if mod and fee is None:
|
||||
fee = event.settings.get('service_fee_abs', as_type=Decimal)
|
||||
if fee and total != Decimal('0.00'):
|
||||
fee_abs = event.settings.get('service_fee_abs' + mod, as_type=Decimal)
|
||||
if mod and fee_abs is None:
|
||||
fee_abs = event.settings.get('service_fee_abs', as_type=Decimal)
|
||||
|
||||
fee_percent = event.settings.get('service_fee_percent' + mod, as_type=Decimal)
|
||||
if mod and fee_percent is None:
|
||||
fee_percent = event.settings.get('service_fee_percent', as_type=Decimal)
|
||||
|
||||
if fee_abs and fee_percent and total != Decimal('0.00'):
|
||||
fee = fee_abs + total * (fee_percent / 100)
|
||||
tax_rule = event.settings.tax_rate_default or TaxRule.zero()
|
||||
if tax_rule.tax_applicable(invoice_address):
|
||||
tax = tax_rule.tax(fee)
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
{% bootstrap_form_errors form %}
|
||||
<fieldset>
|
||||
{% bootstrap_field form.service_fee_abs layout="control" %}
|
||||
{% bootstrap_field form.service_fee_percent layout="control" %}
|
||||
{% bootstrap_field form.service_fee_abs_resellers layout="control" %}
|
||||
{% bootstrap_field form.service_fee_percent_resellers layout="control" %}
|
||||
</fieldset>
|
||||
<div class="form-group submit-group">
|
||||
<button type="submit" class="btn btn-primary btn-save">
|
||||
|
|
|
@ -9,7 +9,9 @@ from pretix.control.views.event import EventSettingsViewMixin, EventSettingsForm
|
|||
|
||||
class ServiceFeeSettingsForm(SettingsForm):
|
||||
service_fee_abs = forms.DecimalField(label=_('Service fee'))
|
||||
service_fee_percent = forms.DecimalField(label=_('Service fee (%)'))
|
||||
service_fee_abs_resellers = forms.DecimalField(label=_('Service fee with resellers'))
|
||||
service_fee_percent_resellers = forms.DecimalField(label=_('Service fee with resellers (%)'))
|
||||
|
||||
|
||||
class SettingsView(EventSettingsViewMixin, EventSettingsFormView):
|
||||
|
|
Loading…
Reference in a new issue