remun clean
[auf_rh_dae.git] / project / dae / forms.py
index 8caf6de..a35ecc2 100644 (file)
@@ -83,10 +83,20 @@ class DossierComparaisonForm(forms.ModelForm):
     class Model:
         model = dae.DossierComparaison
 
-
 class DossierComparaisonForm(inlineformset_factory(dae.Dossier, dae.DossierComparaison, extra=3, max_num=3, form=DossierComparaisonForm)):
     pass
 
+class FlexibleRemunForm(forms.ModelForm):
+
+    montant_mensuel = forms.DecimalField(required=False)
+    montant = forms.DecimalField(required=True, label='Montant annuel')
+
+    class Meta:
+        model = dae.Remuneration
+
+class RemunForm(inlineformset_factory(dae.Dossier, dae.Remuneration, extra=5, form=FlexibleRemunForm)):
+    pass
+
 class JustificationNouvelEmployeForm(inlineformset_factory(dae.Dossier,
                                                            dae.JustificationNouvelEmploye,
                                                            extra=0,