forked from CGM_Public/pretix_original
Order change form: No default fee type, use most generic fee type first (Z#23179634) (#4771)
This commit is contained in:
@@ -2281,9 +2281,9 @@ class OrderFee(models.Model):
|
|||||||
FEE_TYPE_OTHER = "other"
|
FEE_TYPE_OTHER = "other"
|
||||||
FEE_TYPE_GIFTCARD = "giftcard"
|
FEE_TYPE_GIFTCARD = "giftcard"
|
||||||
FEE_TYPES = (
|
FEE_TYPES = (
|
||||||
|
(FEE_TYPE_SERVICE, _("Service fee")),
|
||||||
(FEE_TYPE_PAYMENT, _("Payment fee")),
|
(FEE_TYPE_PAYMENT, _("Payment fee")),
|
||||||
(FEE_TYPE_SHIPPING, _("Shipping fee")),
|
(FEE_TYPE_SHIPPING, _("Shipping fee")),
|
||||||
(FEE_TYPE_SERVICE, _("Service fee")),
|
|
||||||
(FEE_TYPE_CANCELLATION, _("Cancellation fee")),
|
(FEE_TYPE_CANCELLATION, _("Cancellation fee")),
|
||||||
(FEE_TYPE_INSURANCE, _("Insurance fee")),
|
(FEE_TYPE_INSURANCE, _("Insurance fee")),
|
||||||
(FEE_TYPE_LATE, _("Late fee")),
|
(FEE_TYPE_LATE, _("Late fee")),
|
||||||
|
|||||||
@@ -612,7 +612,13 @@ class OrderFeeChangeForm(forms.Form):
|
|||||||
|
|
||||||
|
|
||||||
class OrderFeeAddForm(forms.Form):
|
class OrderFeeAddForm(forms.Form):
|
||||||
fee_type = forms.ChoiceField(choices=OrderFee.FEE_TYPES)
|
fee_type = forms.ChoiceField(
|
||||||
|
choices=[("", ""), *OrderFee.FEE_TYPES],
|
||||||
|
help_text=_(
|
||||||
|
"Note that payment fees have a special semantic and might automatically be changed if the "
|
||||||
|
"payment method of the order is changed."
|
||||||
|
)
|
||||||
|
)
|
||||||
value = forms.DecimalField(
|
value = forms.DecimalField(
|
||||||
max_digits=13, decimal_places=2,
|
max_digits=13, decimal_places=2,
|
||||||
localize=True,
|
localize=True,
|
||||||
|
|||||||
Reference in New Issue
Block a user