fix: Remplacement des enum par des modèles pour les payementModes et les

payementPlans
This commit is contained in:
N3WT DE COMPET
2025-05-18 10:45:00 +02:00
parent 00f7bfde4a
commit 7fe53465ac
12 changed files with 198 additions and 401 deletions

View File

@ -247,10 +247,10 @@ class RegistrationForm(models.Model):
blank=True)
establishment = models.ForeignKey('Establishment.Establishment', on_delete=models.CASCADE, related_name='register_forms')
registration_payment = models.IntegerField(choices=PaymentModeType.choices, null=True, blank=True)
tuition_payment = models.IntegerField(choices=PaymentModeType.choices, null=True, blank=True)
registration_payment_plan = models.IntegerField(choices=PaymentPlanType.choices, null=True, blank=True)
tuition_payment_plan = models.IntegerField(choices=PaymentPlanType.choices, null=True, blank=True)
registration_payment = models.ForeignKey('School.PaymentModeType', on_delete=models.SET_NULL, null=True, blank=True, related_name='registration_payment_modes_forms')
tuition_payment = models.ForeignKey('School.PaymentModeType', on_delete=models.SET_NULL, null=True, blank=True, related_name='tuition_payment_modes_forms')
registration_payment_plan = models.ForeignKey('School.PaymentPlanType', on_delete=models.SET_NULL, null=True, blank=True, related_name='registration_payment_plans_forms')
tuition_payment_plan = models.ForeignKey('School.PaymentPlanType', on_delete=models.SET_NULL, null=True, blank=True, related_name='tuition_payment_plans_forms')
def __str__(self):
return "RF_" + self.student.last_name + "_" + self.student.first_name