mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix #1067 -- Allow to manually create partial payments
This commit is contained in:
@@ -49,7 +49,7 @@ class ExtendForm(I18nModelForm):
|
||||
return data
|
||||
|
||||
|
||||
class MarkPaidForm(forms.Form):
|
||||
class ConfirmPaymentForm(forms.Form):
|
||||
force = forms.BooleanField(
|
||||
label=_('Overbook quota and ignore late payment'),
|
||||
help_text=_('If you check this box, this operation will be performed even if it leads to an overbooked quota '
|
||||
@@ -75,6 +75,20 @@ class MarkPaidForm(forms.Form):
|
||||
del self.fields['force']
|
||||
|
||||
|
||||
class MarkPaidForm(ConfirmPaymentForm):
|
||||
amount = forms.DecimalField(
|
||||
required=True,
|
||||
max_digits=10, decimal_places=2,
|
||||
localize=True,
|
||||
label=_('Payment amount'),
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
change_decimal_field(self.fields['amount'], self.instance.event.currency)
|
||||
self.fields['amount'].initial = max(0, self.instance.pending_sum)
|
||||
|
||||
|
||||
class ExporterForm(forms.Form):
|
||||
def clean(self):
|
||||
data = super().clean()
|
||||
|
||||
Reference in New Issue
Block a user