Version 2
Fonction F_AGCP
Pour le cas 1 on prend HISTOCUMULSITUBYANCLOT pour le cas suivant
Bulletin de régul en 2025 d'un contrat en chgt de situation le 31/12/2024
Le nouveau contrat ne doit pas prendre en compte le bulletin de régul
Avant :
si ((si (moisfin=0) alors (12) sinon (moisfin))<[AGCPDEBUT.MONTANT])
alors (0)
sinon (
si ((moisdebut=0) ou (moisfin=0) ou ([PLAFONDSECU.NUMCAS]=2))
alors (
F_HISTOCLOTSIT(RUBACUMULER)
)
sinon (
histocumulsitu(RUBACUMULER;
maximum(1;(si (moisdebut=0) alors (1) sinon (moisdebut));[AGCPDEBUT.MONTANT]);
CONSTANTE(GENERAL.ANNEE_PAYE);
(si (moisfin=0) alors (12) sinon (moisfin));
CONSTANTE(GENERAL.ANNEE_PAYE)
)
)
)
Après
si ((si (moisfin=0) alors (12) sinon (moisfin))<[AGCPDEBUT.MONTANT])
alors (0)
sinon (
si ((moisdebut=0) ou (moisfin=0) ou ([PLAFONDSECU.NUMCAS]=2))
alors (
F_HISTOCLOTSIT(RUBACUMULER)
)
sinon (
HISTOCUMULSITUBYANCLOT(RUBACUMULER;
maximum(1;(si (moisdebut=0) alors (1) sinon (moisdebut));[AGCPDEBUT.MONTANT]);
CONSTANTE(GENERAL.ANNEE_PAYE);
(si (moisfin=0) alors (12) sinon (moisfin));
CONSTANTE(GENERAL.ANNEE_PAYE)
)
)
)