J’ai une fonction calcul sur une prime d’assiduité. Tous les 3 mois (3 / 6 / 9 /12). Base = (Coef*valeur du point) *3. Globalement elle fonctionne bien : La base et le pourcentage sont ok.
En revanche pour certains salariés elle se déclenche malgré un arrêt maladie ou une absence non rémunérée. Or elle ne devrait pas.
Si vous avez une idée :
Begin
Select case bul.mois
Case 3,6,9,12 :
Prorata = BUL.NbHMN / 151.67
If Emp.Coeff3 = "236" then
Coeff = 236
Endif
If Emp.Coeff3 = "242" then
Coeff = 242
Endif
If Emp.Coeff3 = "248" then
Coeff = 248
Endif
If Emp.Coeff3 = "267" then
Coeff = 267
Endif
If Emp.Coeff3 = "295" then
Coeff = 295
Endif
If Emp.Coeff3 = "340" then
Coeff = 340
Endif
If Emp.Coeff3 = "390" then
Coeff = 390
Endif
If Emp.Coeff3 = "440" then
Coeff = 440
Endif
PrimeBase = 3 * CCN.PT1 * prorata * Coeff
x = Saisie("PrimeBase",0)
If x > 0 then PrimeBase = x
If x < 0 then PrimeBase = 0
If x < 0 then Return
DtFin = Bul.Date
DtDeb = DtFin-2
NbAbs = NombreAbsences(DtDeb,DtFin,"04") + NombreAbsences(DtDeb,DtFin,"09") + NombreAbsences(DtDeb,DtFin,"14") + NombreAbsences(DtDeb,DtFin,"54")
NbCP = NombreAbsences(DtDeb,DtFin,"12")
If NbAbs > 0 and NbAbs > NbCP then
PrimeBase = 0
Endif
Exec("Lprime_D03.CP")
MethodeCalcul = 1
Bases = PrimeBase
Tauxs = 2
Liblong = "Prime Assiduité"
Exec("GenereLprime")
Endselect
End


