mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Ajout des frais d'inscription lors de la création d'un RF [#18]
This commit is contained in:
@ -4,7 +4,7 @@ from django.conf import settings
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from Auth.models import Profile
|
||||
from School.models import SchoolClass
|
||||
from School.models import SchoolClass, Fee, Discount
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
@ -204,6 +204,12 @@ class RegistrationForm(models.Model):
|
||||
registration_file = models.FileField(upload_to=settings.DOCUMENT_DIR, default="", blank=True)
|
||||
associated_rf = models.CharField(max_length=200, default="", blank=True)
|
||||
|
||||
# Many-to-Many Relationship
|
||||
fees = models.ManyToManyField(Fee, blank=True, related_name='register_forms')
|
||||
|
||||
# Many-to-Many Relationship
|
||||
discounts = models.ManyToManyField(Discount, blank=True, related_name='register_forms')
|
||||
|
||||
def __str__(self):
|
||||
return "RF_" + self.student.last_name + "_" + self.student.first_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user