add payment_link and banks

This commit is contained in:
javad committed 2026-10-06 10:03:22 +03:30
1 parent 2ae79b1ca4
commit de3135b588
100 files changed
+6167 -47

No files matched your search

+9
View File
@@ -264,3 +264,12 @@ class UnitSMSTemplateForm(forms.ModelForm):
super().__init__(*args, **kwargs)
self.fields["unit"].queryset = OrganizationalUnit.objects.filter(pk__in=unit_ids if unit_ids is not None else TicketPolicy.unit_ids(user), is_active=True)
self.fields["unit"].required = True
def clean(self):
data = super().clean()
if data.get('event_type') in {'PAYMENT_NOTICE_CREATED', 'PAYMENT_RECEIPT_APPROVED'}:
from apps.payments.notifications import TAGS
self.instance.allowed_tags = list(TAGS)
elif data.get('event_type'):
self.instance.allowed_tags = SMSTemplate._meta.get_field('allowed_tags').default()
return data