Skip to content

Commit

Permalink
Implement set pricing options at global_setting (fossasia#418)
Browse files Browse the repository at this point in the history
* Implement set pricing options at global_setting

* move ticket_fee_percentage

* Update code

* Update code
  • Loading branch information
odkhang authored Nov 21, 2024
1 parent 17f32c9 commit 2609bf5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/pretix/control/forms/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from django import forms
from django.conf import settings
from django.core.validators import MinValueValidator
from django.utils.translation import gettext_lazy as _
from i18nfield.forms import I18nFormField, I18nTextarea, I18nTextInput

Expand Down Expand Up @@ -145,6 +146,19 @@ def __init__(self, *args, **kwargs):
label=_('Stripe Webhook: Secret key'),
required=False,
)),
(
"ticket_fee_percentage",
forms.DecimalField(
label=_("Ticket fee percentage"),
required=False,
decimal_places=2,
max_digits=10,
help_text=_(
"A percentage fee will be charged for each ticket sold."
),
validators=[MinValueValidator(0)],
),
)
])


Expand Down

0 comments on commit 2609bf5

Please sign in to comment.