diff --git a/.github/workflows/check_correctness.yml b/.github/workflows/check_correctness.yml index 58b844f98..d1349f260 100644 --- a/.github/workflows/check_correctness.yml +++ b/.github/workflows/check_correctness.yml @@ -63,6 +63,11 @@ jobs: eval $(opam env) OPTIMIZE=0 make tests + - name: Test irj-checker + run: | + eval $(opam env) + make test_irj + - name: Test DGFIP C backend run: | eval $(opam env) diff --git a/Makefile b/Makefile index 755ed41af..52a0a137b 100644 --- a/Makefile +++ b/Makefile @@ -39,3 +39,16 @@ clean: FORCE remise_a_zero_versionnage rm -f doc/doc.html dune clean +doc-deps: FORCE + python3 -m venv .venv + .venv/bin/pip install sphinx myst-parser + +sphinx-doc: FORCE + @command -v .venv/bin/sphinx-build >/dev/null 2>&1 || \ + { echo "Pour construire la documentation, vous avez besoin de sphinx-build avec \ + l'extension 'myst-parser'. Lancez `make doc-deps`."; exit 1; } + rm -rf _build/default/doc/* + cp -rf doc/* _build/default/doc/ + mkdir -p examples/doc + .venv/bin/sphinx-build -M html _build/default/doc/ examples/doc + .venv/bin/sphinx-build -M latexpdf _build/default/doc/ examples/doc diff --git a/compare_traces.sh b/compare_traces.sh deleted file mode 100755 index 715d9f8cc..000000000 --- a/compare_traces.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash -DGFIP_TARGET_FLAGS=-g,-O,-k4,-t YEAR=2022 make compile_dgfip_c_backend -B -~/fuzzing-calculette/calculette/trunk/2022/AIT \ - -f tests/2022/fuzzing/fuzzer_3469.m_test |& \ - sed -e 's/\x1b\[[0-9;]*m//g' &> aif_trace.txt -NO_BINARY_COMPARE=1 ./examples/dgfip_c/ml_primitif/cal \ - tests/2022/fuzzing/fuzzer_3469.m_test &> mlang_trace.txt -diff aif_trace.txt mlang_trace.txt -u > diff_trace.txt diff --git a/doc/architecture.png b/doc/architecture.png deleted file mode 100644 index 20c96e2f8..000000000 Binary files a/doc/architecture.png and /dev/null differ diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 000000000..5b231de11 --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,27 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'MLang' +copyright = '2025, Direction Générale des FInances Publiques' +author = 'Direction Générale des FInances Publiques' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ['myst_parser'] + +templates_path = ['_templates'] +exclude_patterns = [] + +language = 'fr' + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] diff --git a/doc/exemples/fonctions.md b/doc/exemples/fonctions.md new file mode 100644 index 000000000..a2a7f7795 --- /dev/null +++ b/doc/exemples/fonctions.md @@ -0,0 +1,322 @@ +(exemples/fonctions)= + +# Les fonctions + +## Fichier test : test.m +``` +espace_variables GLOBAL : par_defaut; +domaine regle mon_domaine_de_regle: par_defaut; +domaine verif mon_domaine_de_verifications: par_defaut; +application mon_application; +variable calculee : attribut mon_attribut; + +evenement +: valeur ev_val +: variable ev_var; + +X : calculee mon_attribut = 0 : ""; +TAB : tableau[10] calculee mon_attribut = 2 : ""; + +cible init_tab: +application : mon_application; +iterer : variable I : entre 0..(taille(TAB) - 1) increment 1 : dans ( + TAB[I] = I; +) + +cible reinit_tab: +application : mon_application; +iterer : variable I : entre 0..(taille(TAB) - 1) increment 1 : dans ( + TAB[I] = indefini; +) + +cible test_abs: +application : mon_application; +afficher "\n__ABS__"; +afficher "\n abs(indefini) = "; +afficher (abs(indefini)); +afficher "\n abs(1) = "; +afficher (abs(1)); +afficher "\n abs(-1) = "; +afficher (abs(-1)); +afficher "\n"; + +cible test_arr: +application : mon_application; +afficher "\n__ARR__"; +afficher "\n arr(indefini) = "; +afficher (arr(indefini)); +afficher "\n arr(1.8) = "; +afficher (arr(1.8)); +afficher "\n arr(-1.7) = "; +afficher (arr(-1.7)); +afficher "\n"; + +cible test_attribut: +application : mon_application; +afficher "\n__ATTRIBUT__"; +afficher "\n attribut(X, mon_attribut) = "; +afficher (attribut(X, mon_attribut)); +afficher "\n attribut(TAB, mon_attribut) = "; +afficher (attribut(TAB, mon_attribut)); +afficher "\n"; + +cible test_champ_evenement_base: +application : mon_application; +afficher "\n champ_evenement(0, ev_val) = "; +afficher (champ_evenement (0,ev_val)); +afficher "\n champ_evenement(0, ev_var) = "; +afficher (champ_evenement (0,ev_var)); +afficher "\n"; + +cible test_champ_evenement: +application : mon_application; +afficher "\n__CHAMP_EVENEMENT__"; +arranger_evenements + : ajouter 1 + : dans ( + afficher "\nAvant d'initialiser les champs de l'événement:"; + calculer cible test_champ_evenement_base; + champ_evenement (0,ev_var) reference X; + champ_evenement (0,ev_val) = 42; + X = 2; + afficher "\n Après avoir initialisé les champs de l'événement:"; + calculer cible test_champ_evenement_base; + X = indefini; + ) + +cible test_inf: +application : mon_application; +afficher "\n__INF__"; +afficher "\n inf(indefini) = "; +afficher (inf(indefini)); +afficher "\n inf(1.8) = "; +afficher (inf(1.8)); +afficher "\n inf(-1.7) = "; +afficher (inf(-1.7)); +afficher "\n"; + +cible test_max: +application : mon_application; +afficher "\n__MAX__"; +afficher "\n max(indefini, indefini) = "; +afficher (max(indefini, indefini)); +afficher "\n max(-1, indefini) = "; +afficher (max(-1, indefini)); +afficher "\n max(indefini, -1) = "; +afficher (max(indefini, -1)); +afficher "\n max(1, indefini) = "; +afficher (max(1, indefini)); +afficher "\n"; + +cible test_meme_variable: +application : mon_application; +afficher "\n__MEME_VARIABLE__"; +afficher "\n meme_variable(X,X) = "; +afficher (meme_variable(X,X)); +afficher "\n meme_variable(X,TAB) = "; +afficher (meme_variable(X,TAB)); +afficher "\n meme_variable(TAB[0],TAB) = "; +afficher (meme_variable(TAB[0],TAB)); +afficher "\n"; + +cible test_min: +application : mon_application; +afficher "\n__MIN__"; +afficher "\n min(indefini, indefini) = "; +afficher (min(indefini, indefini)); +afficher "\n min(1, indefini) = "; +afficher (min(1, indefini)); +afficher "\n min(indefini, 1) = "; +afficher (min(indefini, 1)); +afficher "\n min(-1, indefini) = "; +afficher (min(-1, indefini)); +afficher "\n"; + +cible test_multimax_base: +application : mon_application; +afficher "\n multimax(indefini, TAB) = "; +afficher (multimax(indefini, TAB)); +afficher "\n multimax(7, TAB) = "; +afficher (multimax(7, TAB)); +afficher "\n multimax(taille(TAB) + 1, TAB) = "; +afficher (multimax(taille(TAB) + 1, TAB)); +afficher "\n multimax(0, TAB) = "; +afficher (multimax(0, TAB)); +afficher "\n multimax(-1, TAB) = "; +afficher (multimax(-1, TAB)); + +cible test_multimax: +application : mon_application; +afficher "\n__MULTIMAX__"; +afficher "\nAvant initialisation du tableau :"; +calculer cible test_multimax_base; +calculer cible init_tab; +afficher "\nAprès initialisation du tableau :"; +calculer cible test_multimax_base; +calculer cible reinit_tab; +afficher "\n"; + +cible test_nb_evenements_base: +application : mon_application; +afficher "\n nb_evenements() = "; +afficher (nb_evenements ()); +afficher "\n"; + +cible test_nb_evenements: +application : mon_application; +afficher "\n__NB_EVENEMENTS__"; +afficher "\nAvant la définition d'un événement :"; +calculer cible test_nb_evenements_base; +arranger_evenements + : ajouter 1 + : dans ( + afficher "\nPendant la définition d'un événement :"; + calculer cible test_nb_evenements_base; + ) +afficher "\nAprès la définition d'un événement :"; +calculer cible test_nb_evenements_base; + +cible test_null: +application : mon_application; +afficher "\n__NULL__"; +afficher "\n null(indefini) = "; +afficher (null(indefini)); +afficher "\n null(0) = "; +afficher (null(0)); +afficher "\n null(1) = "; +afficher (null(1)); +afficher "\n"; + +cible test_positif: +application : mon_application; +afficher "\n__POSITIF__"; +afficher "\n positif(indefini) = "; +afficher (positif(indefini)); +afficher "\n positif(0) = "; +afficher (positif(0)); +afficher "\n positif(1) = "; +afficher (positif(1)); +afficher "\n positif(-1) = "; +afficher (positif(-1)); +afficher "\n"; + +cible test_positif_ou_nul: +application : mon_application; +afficher "\n__POSITIF OU NUL__"; +afficher "\n positif_ou_nul(indefini) = "; +afficher (positif_ou_nul(indefini)); +afficher "\n positif_ou_nul(0) = "; +afficher (positif_ou_nul(0)); +afficher "\n positif_ou_nul(1) = "; +afficher (positif_ou_nul(1)); +afficher "\n positif_ou_nul(-1) = "; +afficher (positif_ou_nul(-1)); +afficher "\n"; + +cible test_present: +application : mon_application; +afficher "\n__PRESENT__"; +afficher "\n present(indefini) = "; +afficher (present(indefini)); +afficher "\n present(0) = "; +afficher (present(0)); +afficher "\n present(1) = "; +afficher (present(1)); +afficher "\n"; + +cible test_somme: +application : mon_application; +afficher "\n__SOMME__"; +afficher "\n somme() = "; +afficher (somme()); +afficher "\n somme(indefini) = "; +afficher (somme(indefini)); +afficher "\n somme(1, indefini) = "; +afficher (somme(1, indefini)); +afficher "\n somme(1, 2, 3, 4, 5) = "; +afficher (somme(1, 2, 3, 4, 5)); +afficher "\n"; + +cible test_supzero: +application : mon_application; +afficher "\n__SUPZERO__"; +afficher "\n supzero(indefini) = "; +afficher (supzero(indefini)); +afficher "\n supzero(42) = "; +afficher (supzero(42)); +afficher "\n supzero(-1) = "; +afficher (supzero(-1)); +afficher "\n supzero(0) = "; +afficher (supzero(0)); +afficher "\n"; + +cible test_taille: +application : mon_application; +afficher "\n__TAILLE__"; +afficher "\n taille(TAB) = "; +afficher (taille(TAB)); +afficher "\n taille(X) = "; +afficher (taille(X)); +afficher "\n"; + +cible fun_test: +application : mon_application; +# Abs +calculer cible test_abs; +# Arr +calculer cible test_arr; +# Attribut +calculer cible test_attribut; +# Champ evenement +calculer cible test_champ_evenement; +# Inf +calculer cible test_inf; +# Max +calculer cible test_max; +# Meme variable +calculer cible test_meme_variable; +# Min +calculer cible test_min; +# Multimax +calculer cible test_multimax; +# Null +calculer cible test_nb_evenements; +# Null +calculer cible test_null; +# Positif +calculer cible test_positif; +# Positif ou nul +calculer cible test_positif_ou_nul; +# Présent +calculer cible test_present; +# Somme +calculer cible test_somme; +# Supzero +calculer cible test_supzero; +# Taille +calculer cible test_taille; +``` + +## Fichier irj : test.irj + +``` +#NOM +MON-TEST +#ENTREES-PRIMITIF +#CONTROLES-PRIMITIF +#RESULTATS-PRIMITIF +#ENTREES-CORRECTIF +#CONTROLES-CORRECTIF +#RESULTATS-CORRECTIF +## +``` + +## Commande + +``` +mlang test.m \ + --without_dfgip_m \ + -A mon_application \ + --mpp_function fun_test \ + --run_test test.irj +``` diff --git a/doc/exemples/valeurs.md b/doc/exemples/valeurs.md new file mode 100644 index 000000000..2ab328aae --- /dev/null +++ b/doc/exemples/valeurs.md @@ -0,0 +1,141 @@ +(exemples/valeurs)= + +# Calcul des valeurs + +## Fichier test : test.m +``` +espace_variables GLOBAL : par_defaut; +domaine regle mon_domaine_de_regle: par_defaut; +domaine verif mon_domaine_de_verifications: par_defaut; +application mon_application; +variable saisie : attribut mon_attribut; +variable calculee : attribut mon_attribut; +X : saisie mon_attribut = 0 alias AX : ""; + +cible indefini_test: +application : mon_application; +afficher "Bonjour, monde, X = "; +afficher (X); +afficher " !\n"; +# Addition +afficher "X + 1 = "; +afficher (X + 1); +afficher " !\n"; +afficher "1 + X = "; +afficher (1 + X); +afficher " !\n"; +afficher "X + X = "; +afficher (X + X); +afficher " !\n"; +# Soustraction +afficher "X - 1 = "; +afficher (X - 1); +afficher " !\n"; +afficher "1 - X = "; +afficher (1 - X); +afficher " !\n"; +afficher "X - X = "; +afficher (X - X); +afficher " !\n"; +# Multiplication +afficher "X * 1 = "; +afficher (X * 1); +afficher " !\n"; +afficher "1 * X = "; +afficher (1 * X); +afficher " !\n"; +afficher "X * X = "; +afficher (X * X); +afficher " !\n"; +# Division +afficher "X / 1 = "; +afficher (X / 1); +afficher " !\n"; +afficher "1 / X = "; +afficher (1 / X); +afficher " !\n"; +afficher "1 / 0 = "; +afficher (1 / 0); +afficher " !\n"; +afficher "X / 0 = "; +afficher (X / 0); +afficher " !\n"; +afficher "X / X = "; +afficher (X / X); +afficher " !\n"; +# Comparaisons +afficher "(X = 0) = "; +afficher (X = 0); +afficher " !\n"; +afficher "(X = X) = "; +afficher (X = X); +afficher " !\n"; +afficher "(X >= 0) = "; +afficher (X >= 0); +afficher " !\n"; +afficher "(X >= X) = "; +afficher (X >= X); +afficher " !\n"; +afficher "(X > 0) = "; +afficher (X > 0); +afficher " !\n"; +afficher "(X > X) = "; +afficher (X > X); +afficher " !\n"; +afficher "(X <= 0) = "; +afficher (X <= 0); +afficher " !\n"; +afficher "(X < 0) = "; +afficher (X < 0); +afficher " !\n"; +afficher "(X <= X) = "; +afficher (X <= X); +afficher " !\n"; +afficher "(X < X) = "; +afficher (X < X); +afficher " !\n"; +# Opérations booléennes +afficher "(X et X) = "; +afficher (X et X); +afficher " !\n"; +afficher "(X et 1) = "; +afficher (X et 1); +afficher " !\n"; +afficher "(X ou X) = "; +afficher (X ou X); +afficher " !\n"; +afficher "(X ou 1) = "; +afficher (X ou 1); +afficher " !\n"; +afficher "non X = "; +afficher (non X); +afficher " !\n"; +# Vérifier la définition d'une valeur +afficher "present(X) = "; +afficher (present(X)); +afficher " !\n"; +``` + +## Fichier irj : test.irj + +``` +#NOM +MON-TEST +#ENTREES-PRIMITIF +#CONTROLES-PRIMITIF +#RESULTATS-PRIMITIF +#ENTREES-CORRECTIF +#CONTROLES-CORRECTIF +#RESULTATS-CORRECTIF +## +``` + +## Commande + +``` +mlang test.m \ + --without_dfgip_m \ + -A mon_application \ + --mpp_function indefini_test \ + --run_test test.irj +``` diff --git a/doc/fonctions.md b/doc/fonctions.md new file mode 100644 index 000000000..cda4e8ea1 --- /dev/null +++ b/doc/fonctions.md @@ -0,0 +1,149 @@ +(fonctions)= +# Les fonctions + +Voici la liste de toutes les fonctions standard du M. +Leur utilisation est présentée dans l'exemple sur +{ref}`exemples/fonctions`. + +## abs(X) + +Cette fonction prend un argument et renvoie sa valeur absolue. +Si `X` est `indefini`, alors `abs(X) = indefini`. + +## afficher(X) / afficher "texte" + +Cette fonction affiche sur la sortie standard la valeur de l'expression en argument. + +## arr(X) + +Cette fonction prend un argument et renvoie l'entier le plus +proche, ou `indefini` s'il est `indefini`. + +## attribut(X, attribut) + +Cette fonction prend un argument `X` et un nom d'attribut `a` et retourne +la valeur associée à l'attribut `a` de `X`. + +## champ_evenement(X, champ) + +Cette fonction prend un argument `X` et un nom de champ d'événement `champ`. +La valeur `X` correspond à l'identifiant de l'événement. %TODO: référence chap événement +Si le `champ` correspond à une valeur, `champ_evenement` la retourne. Si +le `champ` correspond à une variable, `champ_evenement` retourne sa valeur. + +**Note** : `champ_evenement` peut être utilisée pour assigner des valeurs et +des références à des événéments. Exemple: +``` +evenement +: valeur ev_val +: variable ev_var; + +# Associe la valeur 42 au champ ev_val de l'événement 0. +champ_evenement (0,ev_val) = 42; +# Associe la variable X au champ ev_var de l'événement 0. +champ_evenement (0,ev_var) reference X; +``` + +## inf(X) + +Cette fonction prend un argument et renvoie l'entier inferieur +le plus proche, ou `indefini` s'il est `indefini`. + +## max(X, Y) + +Cette fonction prend deux arguments et renvoie la plus grande +valeur des deux. +Si les deux valeurs sont `indefini`es, alors la fonction renvoie +`indefini`. +Si `X` est défini et `Y` est `indefini`, alors `max(X,Y) = max(X, 0)`. De même, +si `X` est `indéfini` et `Y` est defini, alors `max(X,Y) = max(0, Y)`. + +## meme_variable(X, Y) + +Cette fonction prend en argument deux variables et vérifie s'il s'agit de la même +variable. +Elle est notamment utilisée dans les iterateurs de variables pour effectuer des +traitements spécifiques. + +## multimax(X, TAB) + +Cette fonction prend deux arguments `X` une valeur et `TAB` un tableau +de valeurs. +Elle calcule la plus grande valeur contenue dans `TAB` entre `0` et `X - 1`. +Si X est `indefini` ou `X <= 0`, alors `multimax(X, TAB) = indefini`. +`X` peut être plus grand que la taille de `TAB`, auquel cas `multimax` calculera le +maximum de `TAB`. + +## min(X, Y) + +Cette fonction prend deux arguments et renvoie la plus petite +valeur des deux. +Si les deux valeurs sont `indefini`es, alors la fonction renvoie +`indefini`. +Si `X` est défini et `Y` est `indefini`, alors `min(X,Y) = min(X, 0)`. De même, +si `X` est `indéfini` et `Y` est defini, alors `min(X,Y) = min(0, Y)`. + +## nb_evenements() + +Cette fonction renvoie le nombre total d'événements. + +## null(X) + +Cette fonction prend un argument `X` et renvoie `1` si `X` est +égal à `0`, `0` si `X` est défini et différent de `0`, +et `indefini` s'il est `indefini`. + +Cette fonction est strictement équivalente à l'expression `(X = 0)` + +## positif(X) + +Cette fonction prend un argument `X` et renvoie `1` si `X` est +**strictement** supérieur à `0`, `0` si `X` est inferieur ou égal à `0`, et +`indefini` si `X` est indefini. + +Cette fonction est strictement équivalente à l'expression `X > 0`. + +## positif_ou_nul(X) + +Cette fonction prend un argument `X` et renvoie `1` si `X` est +supérieur ou égale à `0`, `0` si `X` est strictement inferieur ou égal à +`0`, et `indefini` si `X` est indefini. + +Cette fonction est strictement équivalente à l'expression `X >= 0`. + +## present(X) + +Cette fonction prend un argument `X` et renvoie `0` s'il +est `indefini` et `1` sinon. + +**Note** : cette fonction est la seule façon de tester si une valeur est +égale à `indefini` car l'expression booléenne `(indefini = indefini)` +est égale à `indefini`. + +## somme(X, Y, ...) + +Cette fonction n'a pas de limite d'arguments. +Elle calcule leur somme. +Si aucun argument n'est donné à la fonction `somme`, elle renvoie `0`. +Si tous ses arguments sont `indefini`s, alors elle renvoie la valeur +`indefini`. + +## supzero(X) + +Cette fonction prend un argument `X` et renvoie sa valeur s'il est strictement supérieur +à `0`, sinon il renvoie `indefini`. + +## taille(TAB) + +Cette fonction prend en argument soit une variable, soit un tableau. +S'il s'agit d'une variable, `taille` renvoie `1`, sinon elle renvoie la taille du +tableau. +Elle échoue si l'argument est une constante ou une valeur. + +% TODO + +% ## numero_compil() +% Unsupported, raises assert false! + +% ## numero_verif() +% Unsupported as well diff --git a/doc/index.md b/doc/index.md new file mode 100644 index 000000000..d3cd2fb4b --- /dev/null +++ b/doc/index.md @@ -0,0 +1,38 @@ + + +
+
+ .____. ________________________ + | ._ ' | | + | | \ | Direction Générale des | + .-+-+-' | | + | | | Finances Publiques | + ! ! !________________________! +
+
+ +# Documentation du langage M + +## Le langage M + +```{toctree} +:maxdepth: 2 + +intro +syntax +fonctions +syntax_irj +mlang +``` + +## Exemples + +```{toctree} +:maxdepth: 1 + +exemples/valeurs +exemples/fonctions +``` + + + diff --git a/doc/intro.md b/doc/intro.md new file mode 100644 index 000000000..a88c6b59e --- /dev/null +++ b/doc/intro.md @@ -0,0 +1,195 @@ +(intro_m)= + +# Introduction au langage M + +## Les éléments de base + +Un programme M se caracterise par la définition successive : +* de types de variables avec leurs attributs ; +* de domaines et d'événements ; +* d'espaces de variables ; +* d'applications ; +* de variables et de constantes ; +* des fonctions ; +* de règles de calcul associées ou non à une application. + +Exécuter d'un tel programme pour une application donnée correspond à +exécuter l'ensemble des règles de calcul associée la dite application. +%% +L'ordre d'exécution des règles de calcul dépend des dépendances entre les +variables. Si une variable est affectée dans une règle, alors cette règle +sera exécutée avant toutes celles utilisant la valeur de la dite variable. +%% +Si une variable est lue et écrite cycliquement, l'ordre d'exécution des règles +n'est pas garanti. + +## Définitions par défaut + +Les types de variables, leurs attributs, les domaines et les événements +sont historiquement des mots clés propres au langage M. +%% +Il est aujourd'hui possible de les définir à la main. + +## Aperçu de la syntaxe + +Voici un exemple simple de programme M minimal. + +``` +# Fichier: test.m + +# On définit un espace de variable global dans lequel nos variables +# seront stockées par défaut. +espace_variables GLOBAL : par_defaut; + +# On définit deux domaines obligatoires: +# * un domaine pour les règles; +# * un domaine pour les vérificateurs. +domaine regle mon_domaine_de_regle: par_defaut: calculable; +domaine verif mon_domaine_de_verifications: par_defaut; + +# On définit une ou plusiseurs application pour nos règles. +application mon_application; + +# On définit une cible, un ensemble d'instructions à exécuter. +cible hello_world: +application : mon_application; +afficher "Bonjour, monde!\n"; +``` + +Cet exemple jouet n'utilise ni ne définit aucune variable, les domaines +et les espaces de variables ne sont pas utilisés ici mais ils seront nécessaires +plus tard. +%% +Pour essayer notre exemple, nous allons créer un fichier 'test.irj' avec le +contenu suivant : +%% +``` +#NOM +MON-TEST +#ENTREES-PRIMITIF +#CONTROLES-PRIMITIF +#RESULTATS-PRIMITIF +#ENTREES-CORRECTIF +#CONTROLES-CORRECTIF +#RESULTATS-CORRECTIF +## +``` +Le détail de la syntaxe irj peut être sur la page dédiée : {ref}`syntax_irj` + +Enfin, on peut lancer mlang. + +``` + $ mlang --without_dfgip_m test.m -A mon_application --mpp_function hello_world --run_test test.irj + Parsing: completed! + Bonjour, monde! + [RESULT] test.irj + [RESULT] No failure! + [RESULT] Test passed! +``` + +## Définition de variables + +Les variables sont divisées en deux catégories. +* Les variables `saisie`s sont les variables d'entrées du +programme M. +* Les variables `calculee`s sont les variables sur lesquelles seront +calculées les données. + +Chacune de ces catégories principales doivent être dotées d'attributs, +un ensemble d'entiers constants pour une variable donnée. +Ainsi, on peut rajouter à notre programme test les lignes suivantes : +``` +variable saisie : attribut mon_attribut; +variable calculee : attribut mon_attribut; +X : saisie mon_attribut = 0 alias ALIAS_DE_X : "Cette variable s'appelle X"; +Y : calculee mon_attribut = 1 : "Cette variable s'appelle Y"; +``` + +Notez que la variable `X` a un alias `ALIAS_DE_X`. +Toutes les variables saisies doivent être parées d'un alias qui peut être +utilisé de la même façon que son nom original. +Cet alias existe initialement pour faire le lien entre la variable utilisée +dans le M (nom original) et le code de la variable dans le formulaire de +déclaration de l'impot sur le revenu tel qu'on le retrouve aujourd'hui sur +le site de déclaration (1AP, 8TV, ...). + +Ajoutons une nouvelle cible à notre calcul : +``` +cible hello_world2: +application : mon_application; +afficher "Bonjour, monde, X = "; +afficher (X); +afficher " !\n"; +Y = X + 1; +afficher "Y = "; +afficher (Y); +afficher " !\n"; +``` + +Et lançons le calcul : +``` + $ mlang --without_dfgip_m test.m -A mon_application --mpp_function hello_world2 --run_test test.irj +Parsing: completed! +Bonjour, monde, X = indefini ! +Y = 1 ! +[RESULT] test.irj +[RESULT] No failure! +[RESULT] Test passed! +``` + +Pour comprendre la valeur finale de Y, référez-vous à la +section {ref}`valeurs`. + +## Règles de calcul + +Les règles en M sont des unités de calcul de variables associées à une ou +plusieurs application et optionnellement à un domaine de règles. +Elles sont composées d'une successions d'affectations. +Voici la définition de deux règles simples que nous rajoutons à notre fichier test : +``` +Z : calculee mon_attribut = 1 : "Cette variable s'appelle Z"; + +regle mon_domaine_de_regles 1: +application : mon_application; +Z = Y + 1; + +regle 2: +application : mon_application; +Y = X + 1; +``` + +La première règle est associée au domaine `mon_domaine_de_regles` tandis que la +seconde n'étant pas spécifié, sera associée au domaine de règle par défaut. +Dans notre exemple, il s'agissait également de `mon_domaine_de_regles`. + +Le calcul d'un domaine correspond au calcul de l'ensemble de ses règles. +L'ordre d'application des règles dépend de l'ordre d'affectation des variables. +Dans notre cas, `X` est une entrée dont `Y` dépend (règle 2), et `Z` dépend de +`Y`. + +Par conséquent, la règle 2 sera appliquée avant la règle 1. +On peut ainsi rajouter une cible qui calcule le domaine de règles : +``` +cible calc_test: +application : mon_application; +calculer domaine mon_domaine_de_regles; +afficher "X = "; +afficher (X); +afficher "\nY = "; +afficher (Y); +afficher "\nZ = "; +afficher (Z); +afficher "\n"; +``` + +Et lancer le calcul : +``` + $ mlang --without_dfgip_m test.m -A mon_application --mpp_function calc_test --run_test test.irj + Parsing: completed! + X = indefini + Y = 1 + Z = 2 + [RESULT] test.irj + [RESULT] No failure! + [RESULT] Test passed! +``` diff --git a/doc/mlang.md b/doc/mlang.md new file mode 100644 index 000000000..bdf599e54 --- /dev/null +++ b/doc/mlang.md @@ -0,0 +1,306 @@ +(mlang)= + +# Le compilateur MLang + +## Utiliser MLang + +Le binaire `mlang` prend en argument le fichier *M* à exécuter. +Il peut également prendre en argument une liste de fichiers, auquel cas leur +traitement sera équivalent au traitement d'un seul et même fichier dans lequel +serait concatené le contenu de chaque fichier. +%% + +Les deux options principales sont : +* `-A`: le nom de l'application à traiter; +* `--mpp_function`: le nom de la fonction principale à traiter. + +### Mode interpreteur + +Le mode interpreteur de `mlang` utilise un fichier *IRJ* (voir {ref}`syntax_irj`) +pour exécuter le code *M* directement depuis sa représentation abstraite. + +Voici une commande simple pour invoquer l'interpreteur : +``` +$ mlang test.m \ + -A mon_application \ + -b interpreter \ + --mpp_function hello_world \ + --run_test test.irj \ + --without_dfgip_m +``` + +### Mode transpilation + +Le mode transpilation de `mlang` permet de traduire le code *M* dans un autre +langage. +En 2025, seul le langage C est supporté. +Voici une commande simple pour traduire un fichier *M* en *C* : + +``` +$ mlang test.m \ + -A mon_application \ + -b dgfip_c \ + --mpp_function hello_world + --dgfip_options='' + --output output/mon-test.c +``` + +NB: le dossier `output` doit avoir été créé en amont. + +### Options DGFiP + +Les options DGFiP sont à usage interne. + +``` + -b VAL + Set application to "batch" (b0 = normal, b1 = with EBCDIC sort) + + -D Generate labels for output variables + + -g Generate for test (debug) + + -I Generate immediate controls + + -k VAL (absent=0) + Number of debug files + + -L Generate calls to ticket function + + -m VAL (absent=1991) + Income year + + -O Optimize generated code (inline min_max function) + + -o Generate overlays + + -P Primitive calculation only + + -r Pass TGV pointer as register in rules + + -R Set application to both "iliad" and "pro" + + -s Strip comments from generated output + + -S Generate separate controls + + -t Generate trace code + + -U Set application to "cfir" + + -x Generate cross references + + -X Generate global extraction + + -Z Colored output in chainings +``` + +## Comportement de mlang + +### Traduction + +% A faire : traduction du M en M_AST + +### Pré-traitement + +Le prétraitement est une opération purement syntaxique. +Son but est triple : +- éliminer les constructions relatives aux applications non-sélectionnées ; +- remplacer les constantes par leur valeur numérique ; +- remplacer les expressions numériques débutant par `somme` avec des + additions ; +- éliminer les ``s en les remplaçant par des séries de ``s. + +Toute substitution transformant un programme M syntaxiquement valide en un +texte ne correspondant à aucun programme M provoque l'échec du traitement. + +#### Cas des applications + +On élimine du programme M: +- les déclarations des applications non-sélectionnées ; +- les déclarations des enchaîneurs ne spécifiant pas une application + sélectionnée ; +- les déclarations des règles ne spécifiant pas une application + sélectionnée ; +- les déclarations des vérifications ne spécifiant pas une application + sélectionnée ; +- les déclarations des cibles ne spécifiant pas une application sélectionnée. + +Dans les déclarations des règles spécifiant une application sélectionnée, on +élimine les enchaîneurs qui ne sont plus déclarés dans le programme M obtenu. + +#### Cas des constantes + +Pour prétraiter un programme, on le parcourt du début à la fin. Pour chaque +`` rencontrée, si elle correspond à une contante défini précédemment, +alors il est remplacé dans le programme par la valeur numérique correspondante. + +Un intervalle de la forme `..` est +converti par substitution de la constante `const` en l'intervalle +`..`, avec `fin` le naturel correspondant +à `const`. + +*Exemple* : considérons le programme suivant : +``` +fin : const = 10; +… +pour i = 9-fin : + Bi = Bi + fin; +``` + +Par substitution de la constante `fin`, il est remplacé dans un premier temps +remplacée par le programme : + +``` +fin : const = 10;` +… +pour i = 9..10 : + Bi = Bi + fin; +``` + +puis dans un second temps par le programme : +``` +fin : const = 10; +… +pour i = 9..10 : + Bi = Bi + 10; +``` + +#### Interprétation des indices + +Pour rappel, les *indices* ont la forme suivante : +``` + ::= ; … + ::= = , … +``` + +avec : +* ` ::= [a-z]` +* ` ::= [A-Z]` +* ` ::= + | .. | (.. | - )?` + +Chaque `` associe à une lettre minuscule une série de chaînes de +caractères de même taille. +Cette série est composée de la succession de chaque + à droite du symbole `=`. + +Les séries associées aux sont définis comme suit : +* `+` est la série composée de chacune des majuscules prises + séparément, donc de taille 1 (*par exemple* : `AXF` représente la série `A`, `X`, `F`); +* `****` est la série composée de toutes + les majuscules comprises entre /début/ et /fin/, bornes comprises, suivant + l'ordre alphabétique, donc de taille 1 (*par exemple* : `A..D` représente la série `A`, `B`, `C`, `D`); +* `..` est la série composée de tous les + nombres naturels entre `début` et `fin`, bornes comprises, la taille des + éléments étant égale à la taille du plus grand naturel en base 10; les + naturels trop petits pour avoir la taille requise sont complétés par des 0 à + gauche (*par exemple* : `9..11` représente la série `09`, `10`, `11`); +* `-` est converti lors du prétraitement des constantes + en un intervalle de la forme `..`. + +#### Cas des expressions `somme(…)` + +Pour une expression numérique +`somme ( : )`, +l'expression *expr* sera remplacée par la somme des expressions construites +ainsi : pour chaque chaîne de caractères de la série introduite par *ind*, les +symboles apparaîssant dans *expr* sont remplacés par ceux dans lesquels la +lettre minuscule de /ind/ est substituéé par la chaine de caractère. +% +La somme ainsi générée est parenthésée. + +Une expression numérique +`somme ( ; : )`, +est remplacée par la somme des expressions +*`somme`*` : expr'> )` avec `expr'` prenant sa valeur +dans la série `sub(ind, expr)`. +% +La procédure est ensuite appliquée récursivement à cette somme. +% +La somme ainsi générée est parenthésée. +% +Notons que les sous-sommes récursivement produites n'ont pas besoin de l'être +car l'addition est associative. + +On applique cette transformation à toutes les expressions `somme(…)` tant +qu'il en existe dans le programme. + +**Exemple**. Considérons l'expression suivante : + +* `somme(i = XZ ; j = 9..10 : Bi + Bj)` + +Elle est dans un premier temps remplacée par la somme suivante : + +* `(somme(j = 9..10 : BX + Bj) + somme(j = 9..10 : BZ + Bj))` + +puis dans un second temps par la somme : + +* `(BX + B09 + BX + B10 + BZ + B09 + BZ + B10)` + +On remarque que seule l'expression globale est parenthésée car l'addition est +associative. + +#### Cas des multi-formules + +On commence par substituer toutes les expressions `somme(…)` apparaissant dans +les multi-formules. +% +Puis on transforme les multi-formules en séries de formules en suivant la +méthode décrite ci-dessous. + +Pour chaque multi-formule rencontrée, de la forme `pour : `, +dès que les constantes apparaîssant dans les ont été substitués, on +remplace cette multi-formule par la série de formules générée de la manière +suivante. + +Pour une multi-formule `pour : `, la +formule `f` sera remplacée par la série des formules construites ainsi : pour +chaque chaîne de caractères de la série introduite par `ind`, les symboles +apparaîssant dans `f` sont remplacés par ceux dans lesquels la lettre +minuscule de `ind` est substituéé par la chaïne de caractère. +% +On notera `sub(ind, f)` la série constituée des formules ainsi régérées. + +Une multi-formule `pour ; : `, +est remplacée par la série des multi-formules +`pour : f'>` avec `f'` prenant sa valeur +dans la série `sub(ind, f)`. +% +La procédure est ensuite appliquée récursivement +à ces multi-formules. + +**Exemple**. Considérons la multi-formule suivante : +``` +pour i = XZ ; j = 9..10 : + Bi = Bi + Bj; +``` + +Elle est dans un premier temps remplacée par la série suivante : +``` +pour j = 9..10 : + BX = BX + Bj; + +pour j = 9..10 : + BZ = BZ + Bj; +``` + +Puis dans un second temps par la série des formules : +``` +BX = BX + B09; +BX = BX + B10; +BZ = BZ + B09; +BZ = BZ + B10; +```` + +### Vérification de cohérence + +% A faire : documentation de la verification + +### Traitement + +#### Interpreteur + +Lecture du fichier IRJ et interpretation du code. + +#### Transpilation + +Ecriture du code C équivalent au code M. diff --git a/doc/syntax.md b/doc/syntax.md new file mode 100644 index 000000000..2863faabb --- /dev/null +++ b/doc/syntax.md @@ -0,0 +1,575 @@ +(syntax)= + +# La syntaxe du M + +## Programme M et applications + +Un programme M est formé d'une suite de caractères codés sur 8 bits. +Les 128 premiers codes de caractères correspondent aux codes ASCII. +Un programme M est constitué d'une suite d'éléments parmi lesquels on compte : +* des déclarations d'applications ; +* des définitions de constantes ; +* des déclarations d'enchaîneurs ; +* des définitions de catégories de variables ; +* des déclarations de variables ; +* des déclarations d'erreurs ; +* des déclarations de fonctions externes ; +* des définitions de domaines de règles ; +* des définitions de domaines de vérifications ; +* des déclarations de sorties ; +* des règles ; +* des vérifications ; +* des fonctions ; +* des cibles. + +Un programme M peut définir plusieurs applications. +Pour être traité (compilation, interprétation, etc.), il nécessite la donnée +d'une liste d'applications. +Cette liste est typiquement fournie comme argument du compilateur, de +l'interpréteur ou de tout autre outil de traitement. +Cette liste sera appelée la liste des applications sélectionnées. + +## Définitions liminaires +Les formes de Backus-Naur étendues sont utilisées pour préciser la morphologie +du langage. +Un lexème est une suite de caractères et chaque forme est susceptible d'en +reconnaître un ensemble. + +Ces formes sont étendues avec les notations suivantes : + +* `` représente le non-terminal, pour lequel la +chaîne de caractères qu'il reconnaît est représentée par identifiant ; +* `forme 1 ^ … ^ forme n` qui représente une suite de lexèmes correspondants +aux formes 1 à n, dans n'importe quel ordre; +* et : `(forme 0) séparateur …` qui représente une liste non-vide de lexèmes +reeconnus par la forme 0, tous séparés par des lexèmes correspondants au +séparateur. + +Les lexèmes suivants sont les mots réservés : +**BOOLEEN**, +**DATE_AAAA**, +**DATE_JJMMAAAA**, +**DATE_MM**, +**ENTIER**, +**REEL**, +**afficher**, +**afficher_erreur**, +**aiguillage**, +**ajouter**, +**alias**, +**alors**, +**anomalie**, +**application**, +**apres**, +**argument**, +**arranger_evenements**, +**attribut**, +**autorise**, +**avec**, +**base**, +**calculable**, +**calculee**, +**calculer**, +**cas**, +**categorie**, +**champ_evenement**, +**cible**, +**const**, +**dans**, +**dans_domaine**, +**discordance**, +**domaine**, +**enchaineur**, +**entre**, +**erreur**, +**espace**, +**espace_variables**, +**et**, +**evenement**, +**evenements**, +**exporte_erreurs**, +**faire**, +**filtrer**, +**finalise_erreurs**, +**finquand**, +**finsi**, +**fonction**, +**increment**, +**indefini**, +**indenter**, +**informative**, +**iterer**, +**leve_erreur**, +**meme_variable**, +**nb_anomalies**, +**nb_bloquantes**, +**nb_categorie**, +**nb_discordances**, +**nb_informatives**, +**neant**, +**nettoie_erreurs**, +**nettoie_erreurs_finalisees**, +**nom**, +**non**, +**numero_compl**, +**numero_verif**, +**ou**, +**par_defaut**, +**pour**, +**puis_quand**, +**quand**, +**reference**, +**regle**, +**restaurer**, +**restituee**, +**resultat**, +**saisie**, +**si**, +**sinon**, +**sinon_si**, +**sortie**, +**specialise**, +**stop**, +**tableau**, +**taille**, +**trier**, +**type**, +**un**, +**valeur** +**variable**, +**verif**, +**verifiable**, +et **verifier**. + +Les lexèmes numériques sont définis comme suit : +* ` ::= [0-9] [0-9 _]*` +* ` ::= (. )?` +* `` est la forme `[a-z A-Z 0-9 _]+` dont sont exclus ``s et +les mots réservés ; +* `` est un `` que l'on distingue pour représenter les +mots pouvant prendre le nom d'une constante. + +On définit également les atomes numériques, prenant une valeur soit par un +nombre littéral, soit par un symbole représentant une constante ou une +variable : + +* ` ::= | ` +* ` ::= | ` + +Les chaînes de caractères littérales ont la forme suivante : +* ` :: = " [^ "]* "` + +### Déclaration une d'application + +Les *déclarations d'applications* ont la forme suivante : +``` +application ; +``` + +où `` est le nom de l'application +déclarée. + +### Définition d'une constante + +Les *définitions de constantes* ont la forme suivante : +``` + : const = ; +``` + +Le symbole est le nom de la constante. + +### Déclaration d'un enchaîneur +Les *déclarations d'enchaîneurs* ont la forme suivante : +``` +enchaineur : ; +``` + +avec : +` ::= , …` représente l'ensemble des applications incluant cet enchaîneur. +Le `` de l'enchaineur est le nom de l'application déclarée. + + +### Définition d'une catégorie de variables + +Les *définitions de catégories de variables* ont la forme suivante : +``` +variable (saisie | calculee) (: attribut )? ; +``` + +avec : + +* ` ::= +` est le nom de la catégorie de variables; +* ` ::= , …` représente l'ensemble de ses attributs. + +### Déclaration d'une variable + +La forme des *types de variables *est comme suit : + +``` + ::= BOOLEEN | DATE_AAAA | DATE_JJMMAAAA | DATE_MM | ENTIER | REEL +``` + +#### Variable saisie + +Les *déclarations de variables saisies* ont la forme suivante : + +``` + : saisie alias : type ; +``` + +avec : + +* ` ::= +` +* ` ::= restituee? ` +* ` ::= = ` + +Le `` est le nom de la variable. + +#### Variable calculée + +Les *déclarations de variables calculées* ont la forme suivante : +``` + +: (table [ ])? calculee (base? ^ restituee?) +: type ; +``` + +Le est le nom de la variable. Si c'est un tableau, l' +est sa taille. + +### Déclaration d'une erreur + +Les *déclarations d'erreurs* ont la forme suivante : +``` + : : : : : : ; +``` +avec : +* ` ::= anomalie | discordance | informative` + +Le symbole est le nom de l'erreur. +% A faire: documenter les s ! + +### Déclaration d'une fonction externe + +Les *déclarations de fonctions* externes ont la forme suivante : + +``` + : fonction ; +``` + +Le `` est le nom de la fonction, et l' son arité. + +### Définition d'un domaine de règles + +Les *défintions de domaines de règles* ont la forme suivante : + +``` +domaine regle ; +``` + +avec : +* ` ::= +` est le nom du domaine de règles. +* ` ::= (: specialise )? ^ (: calculable)? ^ (: par_defaut)? +* ::= , …` représente l'ensemble des domaines de règles que spécialise ce domaine. + +### Définition d'un domaine de vérifications + +Les *définitions de domaines de vérifications* ont la forme suivante : + +``` +domaine verif ; +``` + +avec : +* ` ::= +` est le nom domaine de vérifications que spécialise ce domaine. +* ` ::= (: specialise )? ^ (: autorise )? ^ (: par_defaut)? ^ (: verifiable)?` +* ` ::= , …` +* ` ::= * | saisie (* | ) | calculee (* | base)?` représente les catégories des variables autorisées à êtres utilisées dans les vérifications de ce domaine. + +### Déclaration d'une sortie + +Les *déclarations de sorties* ont la forme suivante : +``` +sortie ( ) ; +``` + +### Indices + +Les *indices* ont la forme suivante : + +``` + ::= ; … + ::= = , … +``` + +avec : +* ` ::= [a-z]` +* ` ::= [A-Z]` +* ` ::= + | .. | (.. | - )?` + + +### Expressions + +Les *expressions atomiques* ont la forme suivante : + +``` + ::= +( ) +| (<= | >= | < | > | != | =) +| non? dans ( ) +| (present | non_present) ( ([ ])? ) + + ::= +| +| +| [ ] +| ( ( , …)? ) +| somme ( : ) +| si ( ) + alors ( ) + (( sinon ))? + finsi +``` + +avec : +* ` ::= | ou ` +* ` ::= | et ` +* ` ::= | non ` +* ` ::= | (+ | -) ` +* ` ::= | (* | /) ` +* ` ::= | - ` +* ` ::= , …` +* ` ::= (.. )?` + + +Les `formules` ont la forme suivante : +``` + ::= + ([ ])? = +``` + +Les `multi-formules` ont la forme suivante : +``` + ::= pour : +``` + +### Instructions + +Les *instructions* ont la forme suivante : +``` + ::= + + | + | si + alors + + (sinon +)? + finsi + | calculer domaine +; + | calculer enchaineur ; + | calculer cible + (: avec , …)?; + | verifier domaine + + (: avec ); + | (afficher | afficher__erreur) +; + | iterer + : variable + : categorie + , … + (: avec )? + : dans ( + ) + | restaurer + ( + : , … + | : variable : categorie + , … + (: avec )? + )+ + : apres ( + ) + | leve__erreur ?; + | ( + nettoie__erreurs + | exporte__erreurs + | finalise__erreurs + ) ; + | aiguillage (nom)? () : () + | stop ? +``` + +avec : + +``` + ::= + + | `*(*` `*)*` + (`*:*` (`*..*` )?)? + | (`*nom*` | `*alias*`) `*(*` `*)*` + | `*indenter*` `*(*` `*)*` + + ::= * + + ::= + cas : + + | cas indefini : + + | cas : + + | par_default : + + + ::= + application + | cible + | fonction + | +``` + +Les *instructions simples* ont la forme suivante : + +``` + ::= + + | + | `*si*` + `*alors*` + + (`*sinon*` +)? + `*finsi*` + | (`*afficher*` | `*afficher__erreur*`) + `*;*` +``` + +### Définition d'une règle + +Les *règles* ont la forme suivante : +``` + ::= + regle .. : + ( + application : , … ; + ^^ (enchaineur : , … ;)? + ^^ (variable temporaire : , … ;)? + ) + + +``` + +avec : + +* ` ::= ([ ])?` + +### Définition d'une vérification + +Les *vérifications* ont la forme suivante : + +``` + ::= + verif : + application : , … ; + si + alors erreur ? + ; +``` +### Définition d'une fonction + +Les *fonctions* ont la forme suivante : +``` + ::= + fonction : + ( + application : , … ; + ^^ (variable temporaire : , … ;)? + ^^ (argument : , … ;)? + ^^ resultat : ; + ) + + +``` + +avec : +* ` ::= ([ ])?` + +### Définition d'une cible + +Les *cibles* ont la forme suivante : + +``` + ::= + cible : + ( + application : , … ; + ^^ (enchaineur : , … ;)? + ^^ (variable temporaire : , … ;)? + ^^ (argument : , … ;)? + ) + + +``` + +avec : +* ` ::= ([ ])?` + +### Commentaires + +Les commentaires sont précédés du caractère `#`. +Il est possible d'inclure des commentaires multi-ligne avec les délimiteurs `#{` et +`}#`. + +Exemple: + +``` +# Ceci est un commentaire sur une ligne +#{ Ceci est un commentaire + sur plusieurs lignes. }# +``` + +(valeurs)= +## Les valeurs + +Les variables en M prennent soit leur valeur sur les flottants, soit ont la +valeur `indefini`. +Les valeurs de type booléen sont représentées par les flottants `0` et +`1`, respectivement pour `faux` et `vrai`. + +Les résultats suivants peuvent être observés en exécutant le script disponible +dans l'exemple sur le {ref}`exemples/valeurs`. + +### Calcul booléen + +Les opérations booléennes standard (`et`, `ou`, `non`) comportent sur les +flottants de façon standard. +Toute valeur flottante différente de `0` sera considerée comme `vrai`e dans +le cas d'un calcul booléen (`10 ou 0 = 1`). +Les calculs booléens impliquant la valeur `indefini` ont un comportement +spécifique : + +* `indefini ou indefini = indefini` +* `indefini ou b = (0 si b = 0, 1 sinon)` +* `b ou indefini = (0 si b = 0, 1 sinon)` +* `indefini et indefini = indefini` +* `b et indefini = indefini` +* `indefini et b = indefini` +* `non indefini = indefini` + +Les comparaisons (`=`, `<`, `>`, `<=`, `>=`) renvoient soit `0` soit `1` +lorsque des valeurs definies sont comparées. +Si l'une des valeurs comparée est `indéfini`e, alors le résultat est également +`indefini`. + +**Note**: même l'égalité `indefini = indefini` renvoie `indefini`. +Pour vérifier si une valeur est définie ou non, il faut utiliser la fonction +`present` qui renvoie `0` si la valeur est indéfinie et `1` sinon. + +### Calcul numérique + +Les opérations arithmétiques standard (`+`, `-`, `*`, `/`) se comportent sur +les flottants de façon standard, à l'exception de la division d'un flottant par +zero qui renvoie toujours `0`. +Les calculs impliquant la valeur `indefini` ont un comportement spécifique : + +* `indefini + indefini = indefini` +* `indefini + n = n` +* `n + indefini = n` +* `indefini - indefini = indefini` +* `indefini - n = -n` +* `n - indefini = n` +* `indefini * indefini = indefini` +* `indefini * n = indefini` +* `n * indefini = indefini` +* `indefini / indefini = indefini` +* `indefini / n = indefini` +* `n / indefini = indefini` + +Pour résumer, seules les opérations d'addition et de soustraction avec une +valeur renvoient autre chose que `indefini`. + +% A faire : les fonctions prédéfinies devraient avoir leur chapitre dedié diff --git a/doc/syntax_irj.md b/doc/syntax_irj.md new file mode 100644 index 000000000..9becb8066 --- /dev/null +++ b/doc/syntax_irj.md @@ -0,0 +1,88 @@ +(syntax_irj)= + +# Les fichiers IRJ + +## Syntaxe + +Les fichiers IRJ sont des fichiers de test faisant corespondre entrées et +sorties du calcul d'un programme M. +Chaque fichier IRJ est divisé en 7 parties, plus 3 parties optionnelles, +et est terminé par la ligne `##`. + +* `NOM` : le nom du test. +* `ENTREES-PRIMITIF` : les valeurs des variables d'entrées au début du calcul. A chaque variable `VAR` est associée une valeur `val` entière ou décimale sur une ligne de la forme `VAR/val`. Les variables d'entrées qui ne sont pas définies dans le fichier IRJ seront initialisées à `indefini`. +* `CONTROLES-PRIMITIF` : à documenter +* `RESULTATS-PRIMITIF` : les valeurs des variables restituées à la fin du calcul. Comme pour les variables d'entrées, elles sont décrites sous la forme `VAR/val`. Les valeurs restituées absentes du fichiers IRJ sont supposées avoir la valeur `indefini` à la fin du calcul. +* `ENTREES-CORRECTIF` : à documenter +* `CONTROLES-CORRECTIF` : à documenter +* `RESULTATS-CORRECTIF` : à documenter +* `ENTREES-RAPPELS` : partie optionnelle, à documenter +* `CONTROLES-RAPPELS` : partie optionnelle, à documenter +* `RESULTATS-RAPPELS` : partie optionnelle, à documenter + +Voici un exemple de fichier IRJ minimal +``` + #NOM + MON-TEST + #ENTREES-PRIMITIF + X/0.0 + #CONTROLES-PRIMITIF + #RESULTATS-PRIMITIF + Y/1 + Z/2.0 + #ENTREES-CORRECTIF + #CONTROLES-CORRECTIF + #RESULTATS-CORRECTIF + ## +``` + +De nombreux exemples de fichiers IRJ sont disponibles dans le dossier `tests/`. + +## Utilisation + +Trois utilitaires sont dédiés à l'utilisation des fichiers IRJ. + +### IRJ checker + +Les sources de mlang mettent à disposition un code de vérification de fichiers +IRJ. +Après compilation, il peut être exécuté via la commande : +``` +$ dune exec -- irj_checker +``` + +### Interpreteur + +Le binaire mlang intègre un interpreteur de M qui prend en entrée un ou +plusieurs fichiers M ainsi qu'un fichier IRJ. +Après compilation, l'interpreteur peut être exécuté via la commande : +``` +$ dune exec -- mlang test.m -A application -b interpreter --mpp_function cible_dentree --dgfip_options='' -r test.irj +``` + +L'option `-r` peut être remplacée par `-R` pour tester l'ensemble des tests d'un +dossier complet. + +### Fichiers C + +Il est également possible d'utiliser les fichiers IRJ comme entrée du code C +généré à partir d'une compilation de code M par `mlang`. +Ce traitement est effectué dans le cas du backend `dgfip_c` de mlang, dont +le code est disponible dans `examples/dgfip_c/ml_primitif`. +La calculette d'une année donnée peut êter compilée via : +``` +$ make YEAR=year compile_dgfip_c_backend +``` + +Les scripts présents dans `examples/dgfip_c/ml_primitif/ml_driver` permettent +d'interfacer les fichiers IRJ avec les valeurs `C` de type `T_irdata` contenant +le TGV (Tableau Général des Variables). +La commande suivante permet de tester la calculette d'une année sur l'ensemble +des tests fuzzés de la dite année. + +``` +$ make test_dgfip_c_backend +``` + +L'utilisation du script `cal` utilisé dans cette règle est documentée dans +`examples/dgfip_c/README.md`. diff --git a/examples/dgfip_c/ml_primitif/c_driver/aide.c b/examples/dgfip_c/ml_primitif/c_driver/aide.c new file mode 100644 index 000000000..2d1dab66d --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/aide.c @@ -0,0 +1,71 @@ +#include +#include +#include + +#include +#include +#include +#include + +void aide_trt(FILE *sortie, T_options opts) { + fprintf(sortie, "Traitement des fichiers IRJ :\n"); + fprintf(sortie, " %s\n", opts->exe); + fprintf(sortie, " -mode [primitif|correctif] (-m [p|c])\n"); + fprintf(sortie, " -annee [année] (-a [année])\n"); + fprintf(sortie, " -def [variable] [valeur] (-d [variable] [valeur])\n"); + fprintf(sortie, " -recursif (-r)\n"); + fprintf(sortie, " -strict (-s)\n"); + fprintf(sortie, " [fichiers IRJ] ([fichiers IRJ ne commençant pas par '-'])\n"); + fprintf(sortie, " -- [fichiers IRJ]\n"); + fflush(sortie); +} + +void aide_aid(FILE *sortie, T_options opts) { + fprintf(sortie, "Affichage de l'aide :\n"); + fprintf(sortie, " %s -aide (-?) [catégorie d'aide] (optionnelle)\n", opts->exe); + fprintf(sortie, "\n"); + fprintf(sortie, "Catégories d'aide :\n"); + fprintf(sortie, " traitement : aide sur le traitement des fichiers IRJ;\n"); + fprintf(sortie, " format : aide sur le validateur de fichiers IRJ;\n"); + fprintf(sortie, " aide : aide sur l'aide (catégorie par défaut);\n"); + fprintf(sortie, " tout : toutes les aides.\n"); + fflush(sortie); +} + +void aide_fmt(FILE *sortie, T_options opts) { + fprintf(sortie, "Vérification du format des fichiers IRJ :\n"); + fprintf(sortie, " %s -format (-f)\n", opts->exe); + fprintf(sortie, " -recursif (-r)\n"); + fprintf(sortie, " -strict (-s)\n"); + fprintf(sortie, " [fichiers IRJ] ([fichiers IRJ ne commençant pas par '-'])\n"); + fprintf(sortie, " -- [fichiers IRJ]\n"); + fflush(sortie); +} + +void aide(FILE *sortie, T_options opts) { + fprintf(sortie, "\n"); + if (opts->args.aid.cat == NULL || strcmp(opts->args.aid.cat, "aide") == 0) { + aide_aid(sortie, opts); + return; + } + if (strcmp(opts->args.aid.cat, "traitement") == 0) { + aide_trt(sortie, opts); + return; + } + if (strcmp(opts->args.aid.cat, "format") == 0) { + aide_fmt(sortie, opts); + return; + } + if (strcmp(opts->args.aid.cat, "tout") == 0) { + aide_trt(sortie, opts); + fprintf(sortie, "\n"); + aide_fmt(sortie, opts); + fprintf(sortie, "\n"); + aide_aid(sortie, opts); + return; + } + opts->args.aid.err = VRAI; + anoOptsCat(opts->args.aid.cat); + fprintf(sortie, "\n"); + aide_aid(sortie, opts); +} diff --git a/examples/dgfip_c/ml_primitif/c_driver/aide.h b/examples/dgfip_c/ml_primitif/c_driver/aide.h new file mode 100644 index 000000000..055cdbbd3 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/aide.h @@ -0,0 +1,11 @@ +#ifndef __AIDE_H__ +#define __AIDE_H__ + +#include +#include + +#include + +extern void aide (FILE *sortie, T_options opts); + +#endif /* __AIDE_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/chaine.c b/examples/dgfip_c/ml_primitif/c_driver/chaine.c new file mode 100644 index 000000000..58e468415 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/chaine.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include + +char *strConcatListe(T_tas tas, L_char lstr) { + size_t lng = 0; + L_char l = NULL; + char *res = NULL; + int i = 0; + + if (lstr == NULL) return ""; + for (l = lstr; l != NIL(char); l = QUEUE(char, l)) { + char *str = NULL; + + str = TETE(char, l); + if (str == NULL) return ""; + lng += strLng(str); + } + if (lng == 0) return ""; + res = (char *)memAlloue(tas, lng + 1); + for (l = lstr; l != NIL(char); l = QUEUE(char, l)) { + char *str = NULL; + int j = 0; + + str = TETE(char, l); + for (j = 0; str[j] != 0; j++, i++) { + res[i] = str[j]; + } + } + res[i] = 0; + return res; +} diff --git a/examples/dgfip_c/ml_primitif/c_driver/chaine.h b/examples/dgfip_c/ml_primitif/c_driver/chaine.h new file mode 100644 index 000000000..133897f37 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/chaine.h @@ -0,0 +1,9 @@ +#ifndef __CHAINE_H__ +#define __CHAINE_H__ + +#include +#include + +extern char *strConcatListe(T_tas tas, L_char lstr); + +#endif /* __CHAINE_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/commun.c b/examples/dgfip_c/ml_primitif/c_driver/commun.c new file mode 100644 index 000000000..9a2ae9531 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/commun.c @@ -0,0 +1,27 @@ +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +T_varVal creeVarVal(T_tas tas, char *nom, double val) { + T_varVal vv = NULL; + + assert(nom != NULL); + vv = memAlloue(tas, sizeof (S_varVal)); + vv->varinfo = cherche_varinfo_statique(nom); + if (vv->varinfo == NULL) return NULL; + vv->val = val; + return vv; +} + +void libereVarVal(T_varVal vv) { + if (vv == NULL) return; + memLibere(vv); +} diff --git a/examples/dgfip_c/ml_primitif/c_driver/commun.h b/examples/dgfip_c/ml_primitif/c_driver/commun.h new file mode 100644 index 000000000..9f2614f54 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/commun.h @@ -0,0 +1,25 @@ +#ifndef __COMMUN_H__ +#define __COMMUN_H__ + +#include +#include +#include + +#include + +typedef enum { Primitif, Correctif } T_mode; + +struct S_varVal; +typedef struct S_varVal S_varVal; +typedef S_varVal * T_varVal; +struct S_varVal { + T_varinfo *varinfo; + double val; +}; + +TYPEDEF_LISTE(S_varVal) + +extern T_varVal creeVarVal(T_tas tas, char *nom, double val); +extern void libereVarVal(T_varVal vv); + +#endif /* __COMMUN_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/fichiers.c b/examples/dgfip_c/ml_primitif/c_driver/fichiers.c new file mode 100644 index 000000000..422d52682 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/fichiers.c @@ -0,0 +1,186 @@ +#include +#include +#include /* open */ +#include /* clode */ +#include /* fstat */ +#include +#include +#include +#include + +int estRep(char *chemin) { + struct stat st = {0}; + + if (chemin == NULL) { + errno = EINVAL; + return -1; + } + if (lstat(chemin, &st) == -1) { + return -1; + } + return S_ISDIR(st.st_mode) & ! S_ISLNK(st.st_mode); +} + +int estReg(char *chemin) { + struct stat st = {0}; + + if (chemin == NULL) { + errno = EINVAL; + return -1; + } + if (lstat(chemin, &st) == -1) { + return -1; + } + return S_ISREG(st.st_mode) & ! S_ISLNK(st.st_mode); +} + +int estLien(char *chemin) { + struct stat st = {0}; + + if (chemin == NULL) { + errno = EINVAL; + return -1; + } + if (lstat(chemin, &st) == -1) { + return -1; + } + return S_ISLNK(st.st_mode); +} + +L_char contenuRep(T_tas tas, char *chemin) { + DIR* dir = NULL; + L_char res = NULL; + struct dirent *dirent = NULL; + char *nom = NULL; + + if (chemin == NULL || strcmp(chemin, "") == 0) { + errno = EINVAL; + return NULL; + } + + dir = opendir(chemin); + if (dir == NULL) { + return NULL; + } + + res = NIL(char); + while ((dirent = readdir(dir)) != NULL) { + if (strcmp(dirent->d_name, ".") != 0 && strcmp(dirent->d_name, "..") != 0) { + nom = (char *)memAlloue(tas, strlen(dirent->d_name) + 1); + strcpy(nom, dirent->d_name); + res = CONS(tas, char, nom, res); + } + } + + closedir(dir); + return res; +} + +L_char contenuRepPrefix(T_tas tas, char *chemin) { + DIR* dir = NULL; + L_char res = NULL; + struct dirent *dirent = NULL; + char *nom = NULL; + int lenChemin = 0; + int contientSep = 0; + + if (chemin == NULL || strcmp(chemin, "") == 0) { + errno = EINVAL; + return NULL; + } + + dir = opendir(chemin); + if (dir == NULL) { + return NULL; + } + + lenChemin = strlen(chemin); + contientSep = (chemin[lenChemin - 1] == '/'); + res = NIL(char); + while ((dirent = readdir(dir)) != NULL) { + if (strcmp(dirent->d_name, ".") != 0 && strcmp(dirent->d_name, "..") != 0) { + int len = lenChemin + (contientSep ? 0 : 1) + strlen(dirent->d_name); + nom = (char *)memAlloue(tas, len + 1); + nom[0] = 0; + strcat(nom, chemin); + if (! contientSep) { + strcat(nom, "/"); + } + strcat(nom, dirent->d_name); + res = CONS(tas, char, nom, res); + } + } + + closedir(dir); + return res; +} + +extern T_fich ouvreFich(T_tas tas, char *chemin) { + T_fich fich = NULL; + FILE *file; + + if (chemin == NULL || strcmp(chemin, "") == 0) { + errno = EINVAL; + return NULL; + } + file = fopen(chemin, "r"); + if (file == NULL) { + return NULL; + } + fich = (T_fich)memAlloue(tas, sizeof (S_fich)); + fich->file = file; + fich->lin = 1; + fich->col = 1; + fich->pos = 0; + fich->lng = 0; + return fich; +} + +void fermeFich(T_fich fich) { + if (fich != NULL) { + fclose(fich->file); + memLibere(fich); + } +} + +int remplisBuf(T_fich fich) { + if (fich == NULL) { + return 0; + } + if (fich->pos < fich->lng) { + return 1; + } + fich->lng = fread(&(fich->buf), 1, LNG_BUF, fich->file); + fich->pos = 0; + if (fich->lng == 0 && ferror(fich->file)) { + return 0; + } else { + return 1; + } +} + +char lisFich(T_fich fich) { + char c = 0; + + if (! remplisBuf(fich)) return ERR_FICH; + if (fich->pos == fich->lng) return 0; + c = fich->buf[fich->pos]; + if (c == 0) return ERR_FICH; + return c; +} + +char incFich(T_fich fich) { + char c = 0; + + c = lisFich(fich); + if (c == 0 || c == ERR_FICH) return c; + fich->pos++; + if (c == '\n') { + fich->lin++; + fich->col = 1; + } else { + fich->col++; + } + return c; +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/fichiers.h b/examples/dgfip_c/ml_primitif/c_driver/fichiers.h new file mode 100644 index 000000000..ce0ab9e2f --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/fichiers.h @@ -0,0 +1,33 @@ +#ifndef __FICHIERS_H__ +#define __FICHIERS_H__ + +#include +#include +#include +#include +#include + +#define LNG_BUF 1024 +#define ERR_FICH '\xFF' + +typedef struct S_fich * T_fich; +typedef struct S_fich { + FILE *file; + int lin; + int col; + size_t pos; + size_t lng; + char buf[1024]; +} S_fich; + +extern int estRep(char *chemin); +extern int estReg(char *chemin); +extern int estLien(char *chemin); +extern L_char contenuRep(T_tas tas, char *chemin); +extern L_char contenuRepPrefix(T_tas tas, char *chemin); +extern T_fich ouvreFich(T_tas tas, char *chemin); +extern void fermeFich(T_fich fich); +extern char lisFich(T_fich fich); +extern char incFich(T_fich fich); + +#endif /* __FICHIERS_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/format.c b/examples/dgfip_c/ml_primitif/c_driver/format.c new file mode 100644 index 000000000..592128730 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/format.c @@ -0,0 +1,115 @@ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +int verifieFormat(char *chemin, T_options opts) { + T_tas tasFmt = NULL; + T_fich fich = NULL; + T_irj irj = NULL; + int code = IRJ_CODE_VIDE; + L_char lnom = NULL; + char *nom = NULL; + int ok = 1; + + tasFmt = memCreeTas(); + fich = ouvreFich(tasFmt, chemin); + if (fich == NULL) { + discoFichier(chemin, -1); + ok = -1; + goto fin; + } + irj = creeIrj(tasFmt, opts->args.fmt.strict); + code = codeIrj(irj); + lnom = NIL(char); + while (code != IRJ_FIN && code != IRJ_INVALIDE) { + lisIrj(fich, irj); + code = codeIrj(irj); + switch (code) { + case IRJ_NOM: + lnom = CONS(tasFmt, char, strCopie(tasFmt, irj->args.nom), lnom); + break; + case IRJ_NOM_FIN: + RETOURNE(char, &lnom, lnom); + nom = strConcatListe(tasFmt, lnom); + break; + case IRJ_DEF_VAR: + switch (irj->section) { + case IRJ_ENTREES_PRIMITIF_DEBUT: + if (cherche_varinfo_statique(irj->args.defVar.var) == NULL) { + anoVarAbs(irj->args.defVar.var); + ok = -1; + goto fin; + } + break; + case IRJ_RESULTATS_PRIMITIF_DEBUT: + case IRJ_RESULTATS_CORRECTIF_DEBUT: + case IRJ_RESULTATS_RAPPELS_DEBUT: + if (opts->args.fmt.strict) { + T_varinfo *varinfo = cherche_varinfo_statique(irj->args.defVar.var); + + if (varinfo == NULL) { + anoVarAbs(irj->args.defVar.var); + ok = -1; + goto fin; + } else if (! varinfo->est_restituee) { + anoVarNonRestituee(irj->args.defVar.var); + ok = -1; + goto fin; + } + } + break; + default: + ok = -1; + goto fin; + } + break; + case IRJ_DEF_ANO: + switch (irj->section) { + case IRJ_CONTROLES_PRIMITIF_DEBUT: + case IRJ_CONTROLES_CORRECTIF_DEBUT: + case IRJ_CONTROLES_RAPPELS_DEBUT: + break; + default: + ok = -1; + goto fin; + } + break; + case IRJ_DEF_RAP: + if (irj->section == IRJ_ENTREES_RAPPELS_DEBUT) { + if (cherche_varinfo_statique(irj->args.defRap.code) == NULL) { + anoVarAbs(irj->args.defRap.code); + ok = -1; + goto fin; + } + } else { + ok = -1; + goto fin; + } + break; + case IRJ_INVALIDE: + anoLigneInvalide(irj->ligne, irj->args.err); + ok = -1; + goto fin; + case IRJ_CODE_VIDE: + anoCodeVide(irj->ligne); + ok = -1; + goto fin; + default: + break; + } + } + +fin: + memLibere(nom); + fermeFich(fich); + memLibereTas(tasFmt); + return ok; +} diff --git a/examples/dgfip_c/ml_primitif/c_driver/format.h b/examples/dgfip_c/ml_primitif/c_driver/format.h new file mode 100644 index 000000000..cd28625d0 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/format.h @@ -0,0 +1,8 @@ +#ifndef __FORMAT_H__ +#define __FORMAT_H__ + +#include + +extern int verifieFormat(char *chemin, T_options opts); + +#endif /* __FORMAT_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/ida.c b/examples/dgfip_c/ml_primitif/c_driver/ida.c new file mode 100644 index 000000000..b559e79ea --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/ida.c @@ -0,0 +1,226 @@ +#include +#include + +#include +#include + +/* infos */ + +void infoActVide(void) { + fprintf(stdout, "IACT000 | aide par défaut\n"); +} + +void infoActAide(void) { + fprintf(stdout, "IACT001 | aide de l'application\n"); +} + +void infoActFmt(void) { + fprintf(stdout, "IACT002 | vérification du format des fichiers IRJ\n"); +} + +void infoActTrt(void) { + fprintf(stdout, "IACT003 | tests IRJ\n"); +} + +void infoRep(char *nom) { + fprintf(stdout, "IACT004 | parcours du repertoire \"%s\"\n", nom); +} + +void infoReg(char *nom) { + fprintf(stdout, "IACT005 | traitement du fichier \"%s\"\n", nom); +} + +void infoOk(char *fich) { + fprintf(stdout, "IACT006 | \"%s\" OK\n", fich); +} + +void infoKo(char *fich) { + fprintf(stdout, "IACT007 | \"%s\" KO\n", fich); +} + +void infoKc(char *fich) { + fprintf(stdout, "IACT008 | \"%s\" invalide\n", fich); +} + +void infoNbOk(int ok, int tot) { + fprintf(stdout, "IACT009 | %d/%d fichiers corrects\n", ok, tot); +} + +void infoNbKo(int ko, int tot) { + fprintf(stdout, "IACT010 | %d/%d fichiers incorrects\n", ko, tot); +} + +void infoNbKc(int kc, int tot) { + fprintf(stdout, "IACT011 | %d/%d fichiers invalides\n", kc, tot); +} + +void infoNonRec(char *dir) { + fprintf(stdout, "IACT012 | le répertoire \"%s\" est ignoré\n", dir); +} + +void infoLien(char *nom) { + fprintf(stdout, "IACT013 | le lien \"%s\" est ignoré\n", nom); +} + +/* discos */ + +int discoOptsRecDup(int b) { + if (b) { + fprintf(stdout, "DLDC000 | récursivité spécifiée plusieurs fois\n"); + return 1; + } + return 0; +} + +int discoOptsStrictDup(int b) { + if (b) { + fprintf(stdout, "DLDC001 | rigueur (strict) spécifiée plusieurs fois\n"); + return 1; + } + return 0; +} + +int discoOptsAnneeParDefaut(int annee, int b) { + if (b) { + fprintf(stdout, "DLDC002 | année par défaut (année revenu + 1: %d)\n", annee); + return 1; + } + return 0; +} + +int discoOptsModeDup(int b) { + if (b) { + fprintf(stdout, "DLDC003 | mode spécifié plusieurs fois\n"); + return 1; + } + return 0; +} + +int discoOptsAnneeDup(int b) { + if (b) { + fprintf(stdout, "DLDC004 | année spécifiée plusieurs fois\n"); + return 1; + } + return 0; +} + +int discoRep(char *nom, L_char l) { + if (l == NULL) { + fprintf(stdout, "DACT001 | repertoire \"%s\" inaccessible\n", nom); + return 1; + } + return 0; +} + +int discoStat(char *nom, int b) { + if (b == -1) { + fprintf(stdout, "DACT002 | fichier \"%s\" inaccessible\n", nom); + return 1; + } + return 0; +} + +int discoFichier(char *nom, int b) { + if (b == -1) { + fprintf(stdout, "DACT003 | fichier \"%s\" illisible\n", nom); + return 1; + } + return 0; +} + +int discoAnneeRevenu(int anneeCalc, int anneeRevenu) { + if (anneeCalc != anneeRevenu) { + fprintf(stdout, "DTRT000 | année calculette (%d) <> année revenu (%d)\n", anneeCalc, anneeRevenu); + return 1; + } + return 0; +} + +/* anos */ + +void anoOptsExe(void) { + fprintf(stdout, "ALDC000 | nom de l'exécutable inconnu\n"); +} + +void anoOptsTrop(char *arg) { + fprintf(stdout, "ALDC001 | trop de paramètres : %s ...\n", arg); +} + +void anoOptsAction(char *act) { + fprintf(stdout, "ALDC002 | action inconnue : %s\n", act); +} + +void anoOptsCat(char *cat) { + fprintf(stdout, "ALDC003 | catégorie d'aide inconnue : %s\n", cat); +} + +void anoOptsInc(char *arg) { + fprintf(stdout, "ALDC004 | paramètre inconnu : %s\n", arg); +} + +void anoOptsModeAbs(void) { + fprintf(stdout, "ALDC005 | mode manquant (-mode ? | -m ?)\n"); +} + +void anoOptsModeArg(char *arg) { + fprintf(stdout, "ALDC006 | mode inconnu : %s\n", arg); +} + +void anoOptsModeAbsent(void) { + fprintf(stdout, "ALDC007 | mode non spécifié\n"); +} + +void anoOptsModeDup(T_mode mode0, T_mode mode1) { + char *m0 = (mode0 == Primitif ? "primitif" : "correctif"); + char *m1 = (mode1 == Primitif ? "primitif" : "correctif"); + fprintf(stdout, "ALDC008 | modes surnuméraires contradictoires (%s <> %s)\n", m0, m1); +} + +void anoOptsAnneeAbs(void) { + fprintf(stdout, "ALDC009 | année manquante (-annee ? | -a ?)\n"); +} + +void anoOptsAnneeArg(char *arg) { + fprintf(stdout, "ALDC010 | année invalide : %s\n", arg); +} + +void anoOptsAnneeDup(int annee0, int annee1) { + fprintf(stdout, "ALDC011 | années surnuméraires contradictoires (%d <> %d)\n", annee0, annee1); +} + +void anoOptsDefValArg(char *arg) { + fprintf(stdout, "ALDC012 | nombre invalide : %s\n", arg); +} + +void anoOptsDefVarArg(char *arg) { + fprintf(stdout, "ALDC013 | variable indefinissable : %s\n", arg); +} + +void anoLigneInvalide(int ligne, int err) { + fprintf(stdout, "AFMT000 | ligne %d invalide (%d)\n", ligne, err); +} + +void anoCodeVide(int ligne) { + fprintf(stdout, "AFMT001 | ligne %d : code vide\n", ligne); +} + +void anoVarAbs(char *var) { + fprintf(stdout, "AFMT002 | variable inconnue : %s\n", var); +} + +void anoVarNonRestituee(char *var) { + fprintf(stdout, "AFMT003 | variable testee non-restituee : %s\n", var); +} + +void anoErrEnTrop(char *err) { + fprintf(stdout, "ATRT000 | KO | %s recu en trop\n", err); +} + +void anoErrNonRecue(char *err) { + fprintf(stdout, "ATRT001 | KO | %s attendue non recue\n", err); +} + +void anoValeurFausse(char *nom, double val, double valRes) { + fprintf(stdout, "ATRT002 | KO | %s = %f au lieu de %f\n", nom, val, valRes); +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/ida.h b/examples/dgfip_c/ml_primitif/c_driver/ida.h new file mode 100644 index 000000000..9cd0ee0b8 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/ida.h @@ -0,0 +1,54 @@ +#ifndef __IDA_H__ +#define __IDA_H__ + +#include +#include + +extern void infoActVide(void); +extern void infoActAide(void); +extern void infoActFmt(void); +extern void infoActTrt(void); +extern void infoRep(char *nom); +extern void infoReg(char *nom); +extern void infoOk(char *fich); +extern void infoKo(char *fich); +extern void infoKc(char *fich); +extern void infoNbOk(int ok, int tot); +extern void infoNbKo(int ko, int tot); +extern void infoNbKc(int kc, int tot); +extern void infoNonRec(char *dir); +extern void infoLien(char *nom); + +extern int discoOptsRecDup(int b); +extern int discoOptsStrictDup(int b); +extern int discoOptsAnneeParDefaut(int annee, int b); +extern int discoOptsModeDup(int b); +extern int discoOptsAnneeDup(int b); +extern int discoRep(char *nom, L_char l); +extern int discoStat(char *nom, int b); +extern int discoFichier(char *nom, int b); +extern int discoAnneeRevenu(int anneeCalc, int anneeRevenu); + +extern void anoOptsExe(void); +extern void anoOptsTrop(char *arg); +extern void anoOptsAction(char *act); +extern void anoOptsCat(char *cat); +extern void anoOptsInc(char *arg); +extern void anoOptsModeAbs(void); +extern void anoOptsModeArg(char *arg); +extern void anoOptsModeAbsent(void); +extern void anoOptsModeDup(T_mode mode0, T_mode mode1); +extern void anoOptsAnneeAbs(void); +extern void anoOptsAnneeArg(char *arg); +extern void anoOptsAnneeDup(int annee0, int annee1); +extern void anoOptsDefValArg(char *arg); +extern void anoOptsDefVarArg(char *arg); +extern void anoLigneInvalide(int ligne, int err); +extern void anoCodeVide(int ligne); +extern void anoVarAbs(char *var); +extern void anoVarNonRestituee(char *var); +extern void anoErrEnTrop(char *err); +extern void anoErrNonRecue(char *err); +extern void anoValeurFausse(char *nom, double val, double valRes); + +#endif /* __IDA_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/irdata.c b/examples/dgfip_c/ml_primitif/c_driver/irdata.c new file mode 100644 index 000000000..1f7efc25b --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/irdata.c @@ -0,0 +1,163 @@ +/****** LICENCE CECIL *****/ + +#include +#include +#include +#include +#include + +#include "mlang.h" + +#ifndef isinf +int isinf(double d) { + return d < -DBL_MAX || DBL_MAX < d; +} +#endif /* isinf */ + +void ajouter_espace(int *sz, char ***tab, int nb) { + if (nb >= *sz) { + int i = 0; + int old_sz = *sz; + if (*sz == 0) { + *sz = 128; + } else { + while (nb >= *sz) { + *sz *= 2; + } + } + if (*tab == NULL) { + *tab = (char **)malloc(*sz * (sizeof (char *))); + } else { + *tab = (char **)realloc(*tab, *sz * (sizeof (char *))); + } + for (i = old_sz; i < *sz; i++) { + (*tab)[i] = NULL; + } + } +} + +void finalise_erreur_corr(T_irdata *irdata) { + int i = 0; + int trouve = 0; + int ano = 0; + T_discord *pDisco = irdata->discords; + + while (pDisco != NULL && ano == 0) { + trouve = 0; + for (i = 0; i < irdata->nb_err_finalise && ! trouve; i++) { + if (strcmp(pDisco->erreur->nom, irdata->err_finalise[i]) == 0) { + trouve = 1; + } + } + if (! trouve) { + ajouter_espace(&irdata->sz_err_finalise, &irdata->err_finalise, irdata->nb_err_finalise); + irdata->err_finalise[irdata->nb_err_finalise] = pDisco->erreur->nom; + irdata->nb_err_finalise++; + if (pDisco->erreur->type == ANOMALIE) ano = 1; + } + pDisco = pDisco->suivant; + } +} + +void exporte_erreur_corr(T_irdata *irdata) { + int i = 0; + int j = 0; + int trouve = 0; + + for (i = 0; i < irdata->sz_err_finalise && irdata->err_finalise[i] != NULL; i++) { + trouve = 0; + for (j = 0; j < irdata->nb_err_archive && ! trouve; j++) { + if (strcmp(irdata->err_finalise[i], irdata->err_archive[j]) == 0) { + trouve = 1; + } + } + if (! trouve) { + ajouter_espace(&irdata->sz_err_archive, &irdata->err_archive, irdata->nb_err_archive); + irdata->err_archive[irdata->nb_err_archive] = irdata->err_finalise[i]; + irdata->nb_err_archive++; + ajouter_espace(&irdata->sz_err_sortie, &irdata->err_sortie, irdata->nb_err_sortie); + irdata->err_sortie[irdata->nb_err_sortie] = irdata->err_finalise[i]; + irdata->nb_err_sortie++; + irdata->err_finalise[i] = NULL; + } + } + irdata->nb_err_finalise = 0; +} + +void finalise_erreur_prim(T_irdata *irdata) { + int i = 0; + int trouve = 0; + T_discord *pDisco = irdata->discords; + irdata->nb_err_finalise = 0; + + while (pDisco != NULL) { + trouve = 0; + for (i = 0; i < irdata->nb_err_archive && ! trouve; i++) { + if (strcmp(pDisco->erreur->nom, irdata->err_archive[i]) == 0) { + trouve = 1; + } + } + if (! trouve) { + ajouter_espace(&irdata->sz_err_archive, &irdata->err_archive, irdata->nb_err_archive); + irdata->err_archive[irdata->nb_err_archive] = pDisco->erreur->nom; + irdata->nb_err_archive++; + ajouter_espace(&irdata->sz_err_finalise, &irdata->err_finalise, irdata->nb_err_finalise); + irdata->err_finalise[irdata->nb_err_finalise] = pDisco->erreur->nom; + irdata->nb_err_finalise++; + } + pDisco = pDisco->suivant; + } +} + +void exporte_erreur_prim(T_irdata *irdata) { + int i = 0; + + for (i = 0; i < irdata->sz_err_finalise && irdata->err_finalise[i] != NULL; i++) { + ajouter_espace(&irdata->sz_err_sortie, &irdata->err_sortie, irdata->nb_err_sortie); + irdata->err_sortie[irdata->nb_err_sortie] = irdata->err_finalise[i]; + irdata->nb_err_sortie++; + } +} + +void finalise_erreur(T_irdata *irdata) { + T_varinfo *mode_corr = cherche_varinfo(irdata, "MODE_CORR"); + char def = 0; + double val = 0.0; + if (mode_corr == NULL) { + finalise_erreur_prim(irdata); + return; + } + lis_varinfo(irdata, ESPACE_PAR_DEFAUT, mode_corr, &def, &val); + if (def == 1 && val == 1.0) { + finalise_erreur_corr(irdata); + } else { + finalise_erreur_prim(irdata); + } +} + +void exporte_erreur(T_irdata *irdata) { + T_varinfo *mode_corr = cherche_varinfo(irdata, "MODE_CORR"); + char def = 0; + double val = 0.0; + if (mode_corr == NULL) { + exporte_erreur_prim(irdata); + return; + } + lis_varinfo(irdata, ESPACE_PAR_DEFAUT, mode_corr, &def, &val); + if (def == 1 && val == 1.0) { + exporte_erreur_corr(irdata); + } else { + exporte_erreur_prim(irdata); + } +} + + +void nettoie_erreurs_finalisees(T_irdata *irdata) { + int i = 0; + + for (i = 0; i < irdata->sz_err_finalise && irdata->err_finalise[i] != NULL; i++) { + irdata->err_finalise[i] = NULL; + } + irdata->nb_err_finalise = 0; +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/irj.c b/examples/dgfip_c/ml_primitif/c_driver/irj.c new file mode 100644 index 000000000..de481df59 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/irj.c @@ -0,0 +1,676 @@ +#include +#include +#include +#include +#include +#include + +T_irj creeIrj(T_tas tas, int strict) { + T_irj irj = NULL; + + irj = (T_irj)memAlloue(tas, sizeof (S_irj)); + irj->code = IRJ_CODE_VIDE; + irj->section = IRJ_CODE_VIDE; + irj->codePri = IRJ_CODE_VIDE; + irj->strict = (strict != 0); + irj->ligne = 0; + irj->lng = LNG_IRJ_BUF; + irj->buf = (char *)memAlloue(tas, irj->lng); + irj->pos = 0; + irj->tas = tas; + return irj; +} + +void nettoieIrj(T_irj irj) { + if (irj == NULL) return; + switch (irj->code) { + case IRJ_NOM: + memLibere(irj->args.nom); + break; + case IRJ_DEF_VAR: + memLibere(irj->args.defVar.var); + break; + case IRJ_DEF_ANO: + memLibere(irj->args.defAno.ano); + break; + case IRJ_DEF_RAP: + memLibere(irj->args.defRap.code); + break; + } +} + +void detruisIrj(T_irj irj) { + if (irj == NULL) return; + memLibere(irj->buf); + memLibere(irj); +} + +void initBuf(T_irj irj) { + irj->pos = 0; +} + +void ajBuf(T_irj irj, char c) { + if (irj->pos >= irj->lng) { + irj->lng = irj->lng * 2; + irj->buf = (char *)memRealloue(irj->buf, irj->lng); + } + irj->buf[irj->pos] = c; + irj->pos++; +} + +void rtBuf(T_irj irj) { + if (irj->pos > 0) { + irj->pos--; + } +} + +char lsBuf(T_irj irj) { + if (irj->pos <= 0) { + return 0; + } + return irj->buf[irj->pos - 1]; +} + +char *dsBuf(T_irj irj) { + return irj->buf; +} + +char *lisMot(T_fich fich, T_irj irj) { + char c = 0; + int cpt = 0; + + initBuf(irj); + c = lisFich(fich); + cpt++; + if (cpt > IRJ_LNG_MAX) return NULL; + while (c == ' ' || c == '\r') { + incFich(fich); + c = lisFich(fich); + cpt++; + if (cpt > IRJ_LNG_MAX) return NULL; + } + while (c != '\n' && c != 0 && c != '/') { + ajBuf(irj, c); + incFich(fich); + c = lisFich(fich); + cpt++; + if (cpt > IRJ_LNG_MAX) return NULL; + } + while (lsBuf(irj) == ' ' || lsBuf(irj) == '\r') rtBuf(irj); + ajBuf(irj, 0); + return irj->buf; +} + +void ligneSuiv(T_fich fich) { + char c = 0; + + c = lisFich(fich); + while (c != '\n' && c != 0) { + incFich(fich); + c = lisFich(fich); + } + incFich(fich); +} + +char *cpBuf(T_irj irj) { + char *res = NULL; + int i = 0; + + res = (char *)memAlloue(irj->tas, irj->lng); + for (i = 0; i < irj->pos; i++) { + res[i] = irj->buf[i]; + } + return res; +} + +int estDigit(char c) { + return '0' <= c && c <= '9'; +} + +int versDigit(char c) { + return (int)(c - '0'); +} + +double dblBuf(T_irj irj) { + double res = 0.0; + double neg = 1.0; + int i = 0; + + while (i < irj->pos && irj->buf[i] == ' ') i++; + if (i < irj->pos && irj->buf[i] == '-') { + neg = -1.0; + i++; + while (i < irj->pos && irj->buf[i] == ' ') i++; + } + while (i < irj->pos && estDigit(irj->buf[i])) { + res = res * 10.0 + (double)versDigit(irj->buf[i]); + i++; + while (i < irj->pos && irj->buf[i] == ' ') i++; + } + if (i < irj->pos && irj->buf[i] == '.') { + double den = 1.0; + + i++; + while (i < irj->pos && irj->buf[i] == ' ') i++; + while (i < irj->pos && estDigit(irj->buf[i])) { + res = res * 10.0 + (double)versDigit(irj->buf[i]); + den *= 10.0; + i++; + while (i < irj->pos && irj->buf[i] == ' ') i++; + } + res = res / den; + } + return neg * res; +} + +double sensBuf(T_irj irj) { + if (strlen(irj->buf) != 1) return -1.0; + switch (irj->buf[0]) { + case 'R': + case 'r': + return 0.0; + case 'M': + case 'm': + return 1.0; + case 'P': + case 'p': + return 2.0; + case 'C': + case 'c': + return 3.0; + default: + return -1.0; + } +} + +int estFinLigne(T_fich fich) { + char c = 0; + + c = lisFich(fich); + return c == '\n' || c == 0; +} + +int estFinFich(T_fich fich) { + return lisFich(fich) == 0; +} + +int finSection(T_irj irj) { +/* nom */ + if (irj->code == IRJ_NOM_DEBUT) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + if (irj->code == IRJ_NOM) { + irj->codePri = IRJ_NOM_FIN; + return 1; + } + +/* primitif */ + if (irj->section == IRJ_ENTREES_PRIMITIF_DEBUT) { + if (irj->code == IRJ_ENTREES_PRIMITIF_DEBUT || irj->code == IRJ_DEF_VAR) { + irj->codePri = IRJ_ENTREES_PRIMITIF_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + + if (irj->section == IRJ_CONTROLES_PRIMITIF_DEBUT) { + if (irj->code == IRJ_CONTROLES_PRIMITIF_DEBUT || irj->code == IRJ_DEF_ANO) { + irj->codePri = IRJ_CONTROLES_PRIMITIF_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + + if (irj->section == IRJ_RESULTATS_PRIMITIF_DEBUT) { + if (irj->code == IRJ_RESULTATS_PRIMITIF_DEBUT || irj->code == IRJ_DEF_VAR) { + irj->codePri = IRJ_RESULTATS_PRIMITIF_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + +/* correctif */ + if (irj->section == IRJ_ENTREES_CORRECTIF_DEBUT) { + if (irj->code == IRJ_ENTREES_CORRECTIF_DEBUT || irj->code == IRJ_DEF_CORR) { + irj->codePri = IRJ_ENTREES_CORRECTIF_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + + if (irj->section == IRJ_CONTROLES_CORRECTIF_DEBUT) { + if (irj->code == IRJ_CONTROLES_CORRECTIF_DEBUT || irj->code == IRJ_DEF_ANO) { + irj->codePri = IRJ_CONTROLES_CORRECTIF_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + + if (irj->section == IRJ_RESULTATS_CORRECTIF_DEBUT) { + if (irj->code == IRJ_RESULTATS_CORRECTIF_DEBUT || irj->code == IRJ_DEF_VAR) { + irj->codePri = IRJ_RESULTATS_CORRECTIF_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + +/* rappels */ + if (irj->section == IRJ_ENTREES_RAPPELS_DEBUT) { + if (irj->code == IRJ_ENTREES_RAPPELS_DEBUT || irj->code == IRJ_DEF_RAP) { + irj->codePri = IRJ_ENTREES_RAPPELS_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + + if (irj->section == IRJ_CONTROLES_RAPPELS_DEBUT) { + if (irj->code == IRJ_CONTROLES_RAPPELS_DEBUT || irj->code == IRJ_DEF_ANO) { + irj->codePri = IRJ_CONTROLES_RAPPELS_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + + if (irj->section == IRJ_RESULTATS_RAPPELS_DEBUT) { + if (irj->code == IRJ_RESULTATS_RAPPELS_DEBUT || irj->code == IRJ_DEF_VAR) { + irj->codePri = IRJ_RESULTATS_RAPPELS_FIN; + return 1; + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; + } + } + +/* défaut */ + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return 0; +} + +void lisIrj(T_fich fich, T_irj irj) { + char *mot = NULL; + + if (irj == NULL) return; + if (irj->code == IRJ_INVALIDE) return; + nettoieIrj(irj); + if (fich == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + if (irj->codePri != IRJ_CODE_VIDE) { + irj->codePri = IRJ_CODE_VIDE; + return; + } + irj->codePri = IRJ_CODE_VIDE; + irj->ligne = fich->lin; + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + while (strcmp(mot, "") == 0 && estFinLigne(fich) && ! estFinFich(fich)) { + ligneSuiv(fich); + irj->ligne = fich->lin; + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + } + if (estFinFich(fich)) { + if (irj->strict) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + } else { + if (! finSection(irj)) return; + irj->code = IRJ_FIN; + irj->section = IRJ_CODE_VIDE; + } + return; + } + if (estFinLigne(fich)) { + if (strcmp(mot, "#NOM") == 0) { + irj->code = IRJ_NOM_DEBUT; + irj->section = IRJ_NOM_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#ENTREES-PRIMITIF") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_ENTREES_PRIMITIF_DEBUT; + irj->section = IRJ_ENTREES_PRIMITIF_DEBUT; + ligneSuiv(fich); + return; + } + if ( + strcmp(mot, "#CONTROLES-PRIMITIF") == 0 + || (! irj->strict && strcmp(mot, "CONTROLES-PRIMITIF") == 0) + ) { + if (! finSection(irj)) return; + irj->code = IRJ_CONTROLES_PRIMITIF_DEBUT; + irj->section = IRJ_CONTROLES_PRIMITIF_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "CONTROLES-PRIMITIF") == 0) { + if (irj->strict) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + } else { + if (! finSection(irj)) return; + irj->code = IRJ_CONTROLES_PRIMITIF_DEBUT; + irj->section = IRJ_CONTROLES_PRIMITIF_DEBUT; + ligneSuiv(fich); + return; + } + } + if (strcmp(mot, "#RESULTATS-PRIMITIF") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_RESULTATS_PRIMITIF_DEBUT; + irj->section = IRJ_RESULTATS_PRIMITIF_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#ENTREES-CORRECTIF") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_ENTREES_CORRECTIF_DEBUT; + irj->section = IRJ_ENTREES_CORRECTIF_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#CONTROLES-CORRECTIF") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_CONTROLES_CORRECTIF_DEBUT; + irj->section = IRJ_CONTROLES_CORRECTIF_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#RESULTATS-CORRECTIF") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_RESULTATS_CORRECTIF_DEBUT; + irj->section = IRJ_RESULTATS_CORRECTIF_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#ENTREES-RAPPELS") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_ENTREES_RAPPELS_DEBUT; + irj->section = IRJ_ENTREES_RAPPELS_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#CONTROLES-RAPPELS") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_CONTROLES_RAPPELS_DEBUT; + irj->section = IRJ_CONTROLES_RAPPELS_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "#RESULTATS-RAPPELS") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_RESULTATS_RAPPELS_DEBUT; + irj->section = IRJ_RESULTATS_RAPPELS_DEBUT; + ligneSuiv(fich); + return; + } + if (strcmp(mot, "##") == 0) { + if (! finSection(irj)) return; + irj->code = IRJ_FIN; + irj->section = IRJ_CODE_VIDE; + return; + } + } + switch (irj->section) { + case IRJ_NOM_DEBUT: + if (! irj->strict || irj->code == IRJ_NOM_DEBUT) { + irj->code = IRJ_NOM; + irj->args.nom = cpBuf(irj); + ligneSuiv(fich); + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + } + return; + case IRJ_ENTREES_PRIMITIF_DEBUT: + case IRJ_RESULTATS_PRIMITIF_DEBUT: + case IRJ_RESULTATS_CORRECTIF_DEBUT: + case IRJ_RESULTATS_RAPPELS_DEBUT: + if (lisFich(fich) == '/' || (! irj->strict && estFinLigne(fich))) { + irj->code = IRJ_DEF_VAR; + irj->args.defVar.var = cpBuf(irj); + if (lisFich(fich) == '/') { + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defVar.val = dblBuf(irj); + } else { + irj->args.defVar.val = 0.0; + } + ligneSuiv(fich); + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + } + return; + case IRJ_CONTROLES_PRIMITIF_DEBUT: + case IRJ_CONTROLES_CORRECTIF_DEBUT: + case IRJ_CONTROLES_RAPPELS_DEBUT: + if (estFinLigne(fich)) { + irj->code = IRJ_DEF_ANO; + irj->args.defAno.ano = cpBuf(irj); + ligneSuiv(fich); + } else { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + } + return; + case IRJ_ENTREES_RAPPELS_DEBUT: + irj->code = IRJ_DEF_RAP; + irj->args.defRap.numero = dblBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.rappel = dblBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + if (strcmp(mot, "") == 0) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.code = cpBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.montant = dblBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.sens = sensBuf(irj); + if (irj->args.defRap.sens == -1.0) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.penalite = dblBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.base_tl = dblBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap.date = dblBuf(irj); + if (lisFich(fich) != '/') { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + incFich(fich); + mot = lisMot(fich, irj); + if (mot == NULL) { + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->args.defRap._2042_rect = dblBuf(irj); + ligneSuiv(fich); + return; + case IRJ_ENTREES_CORRECTIF_DEBUT: + irj->code = IRJ_DEF_CORR; + /* vieux format de rappel, ignoré */ + ligneSuiv(fich); + return; + default: + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; + } + irj->code = IRJ_INVALIDE; + irj->args.err = __LINE__; + return; +} + +int codeIrj(T_irj irj) { + if (irj == NULL) return IRJ_CODE_VIDE; + if (irj->codePri == IRJ_CODE_VIDE) return irj->code; + return irj->codePri; +} + +char *codeIrjVersStr(int code) { + switch (code) { + case IRJ_DEBUT: return "début"; + case IRJ_NOM_DEBUT: return "début nom"; + case IRJ_NOM: return "nom"; + case IRJ_NOM_FIN: return "fin nom"; + case IRJ_ENTREES_PRIMITIF_DEBUT: return "début entrées primitif"; + case IRJ_ENTREES_PRIMITIF_FIN: return "fin entrées primitif"; + case IRJ_CONTROLES_PRIMITIF_DEBUT: return "début contrôles primitif"; + case IRJ_CONTROLES_PRIMITIF_FIN: return "fin contrôles primitif"; + case IRJ_RESULTATS_PRIMITIF_DEBUT: return "début résultats primitif"; + case IRJ_RESULTATS_PRIMITIF_FIN: return "fin résultats primitif"; + case IRJ_ENTREES_CORRECTIF_DEBUT: return "début entrées correctif"; + case IRJ_ENTREES_CORRECTIF_FIN: return "fin entrées correctif"; + case IRJ_CONTROLES_CORRECTIF_DEBUT: return "début contrôles correctif"; + case IRJ_CONTROLES_CORRECTIF_FIN: return "fin contrôles correctif"; + case IRJ_RESULTATS_CORRECTIF_DEBUT: return "début résultats correctif"; + case IRJ_RESULTATS_CORRECTIF_FIN: return "fin résultats correctif"; + case IRJ_ENTREES_RAPPELS_DEBUT: return "début entrées rappels"; + case IRJ_ENTREES_RAPPELS_FIN: return "fin entrées rappels"; + case IRJ_CONTROLES_RAPPELS_DEBUT: return "début contrôles rappels"; + case IRJ_CONTROLES_RAPPELS_FIN: return "fin contrôles rappels"; + case IRJ_RESULTATS_RAPPELS_DEBUT: return "début résultats rappels"; + case IRJ_RESULTATS_RAPPELS_FIN: return "fin résultats rappels"; + case IRJ_IGNORE: return "ignoré"; + case IRJ_DEF_VAR: return "définition de variable"; + case IRJ_DEF_ANO: return "définition d'anomalie"; + case IRJ_DEF_RAP: return "définition de rappel"; + case IRJ_DEF_CORR: return "définition de rappel correctif"; + case IRJ_FIN: return "fin"; + case IRJ_INVALIDE: return "invalide"; + case IRJ_CODE_VIDE: return "code vide"; + default: return "code invalide"; + } +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/irj.h b/examples/dgfip_c/ml_primitif/c_driver/irj.h new file mode 100644 index 000000000..c387c820b --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/irj.h @@ -0,0 +1,99 @@ +#ifndef __IRJ_H__ +#define __IRJ_H__ + +#include +#include + +#define LNG_IRJ_BUF 256 +#define IRJ_LNG_MAX 1024 + +#define IRJ_CODE_VIDE (-1) +#define IRJ_INVALIDE 0 +#define IRJ_DEBUT 1 +#define IRJ_NOM_DEBUT 2 +#define IRJ_NOM 3 +#define IRJ_NOM_FIN 4 +#define IRJ_ENTREES_PRIMITIF_DEBUT 5 +#define IRJ_ENTREES_PRIMITIF_FIN 6 +#define IRJ_CONTROLES_PRIMITIF_DEBUT 7 +#define IRJ_CONTROLES_PRIMITIF_FIN 8 +#define IRJ_RESULTATS_PRIMITIF_DEBUT 9 +#define IRJ_RESULTATS_PRIMITIF_FIN 10 +#define IRJ_ENTREES_CORRECTIF_DEBUT 11 +#define IRJ_ENTREES_CORRECTIF_FIN 12 +#define IRJ_CONTROLES_CORRECTIF_DEBUT 13 +#define IRJ_CONTROLES_CORRECTIF_FIN 14 +#define IRJ_RESULTATS_CORRECTIF_DEBUT 15 +#define IRJ_RESULTATS_CORRECTIF_FIN 16 +#define IRJ_ENTREES_RAPPELS_DEBUT 17 +#define IRJ_ENTREES_RAPPELS_FIN 18 +#define IRJ_CONTROLES_RAPPELS_DEBUT 19 +#define IRJ_CONTROLES_RAPPELS_FIN 20 +#define IRJ_RESULTATS_RAPPELS_DEBUT 21 +#define IRJ_RESULTATS_RAPPELS_FIN 22 +#define IRJ_IGNORE 23 +#define IRJ_DEF_VAR 24 +#define IRJ_DEF_ANO 25 +#define IRJ_DEF_RAP 26 +#define IRJ_DEF_CORR 27 +#define IRJ_FIN 28 + +struct S_irj_def_var; +typedef struct S_irj_def_var S_irj_def_var; +typedef S_irj_def_var * T_irj_def_var; +struct S_irj_def_var { + char *var; + double val; +}; + +struct S_irj_def_ano; +typedef struct S_irj_def_ano S_irj_def_ano; +typedef S_irj_def_ano * T_irj_def_ano; +struct S_irj_def_ano { + char *ano; +}; + +struct S_irj_def_rap; +typedef struct S_irj_def_rap S_irj_def_rap; +typedef S_irj_def_rap * T_irj_def_rap; +struct S_irj_def_rap { + double numero; + double rappel; + char *code; + double montant; + double sens; + double penalite; + double base_tl; + double date; + double _2042_rect; +}; + +struct S_irj; +typedef struct S_irj S_irj; +typedef S_irj * T_irj; +struct S_irj { + int code; + int section; + union { + char *nom; /* IRJ_NOM */ + S_irj_def_var defVar; /* variable = valeur */ + S_irj_def_ano defAno; /* anomalie */ + S_irj_def_rap defRap; /* rappel */ + int err; + } args; + int strict; + int codePri; + int ligne; + char *buf; + int pos; + int lng; + T_tas tas; +}; + +extern T_irj creeIrj(T_tas tas, int strict); +extern void lisIrj(T_fich fich, T_irj irj); +extern int codeIrj(T_irj irj); +extern char *codeIrjVersStr(int code); +extern void detruisIrj(T_irj irj); + +#endif /* __IRJ_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/liste.c b/examples/dgfip_c/ml_primitif/c_driver/liste.c new file mode 100644 index 000000000..5670e610f --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/liste.c @@ -0,0 +1,199 @@ +#include +#include +#include + +#include +#include +#include + +static SL_void nilVal = {&nilVal, NULL}; +L_void nilPtr = &nilVal; + +static L_void allocCons(T_tas tas) { + L_void l = NULL; + + l = (L_void)memAlloue(tas, sizeof (SL_void)); + if (l == NULL) { + return NULL; + } + l->tete = NULL; + l->queue = nilPtr; + return l; +} + +void libereCons(L_void l) { + if (l == NULL || l == nilPtr) { + return; + } + memLibere(l); +} + +L_void nil(void) { + return nilPtr; +} + +L_void cons(T_tas tas, void *e, L_void l) { + L_void res = NULL; + + assert(l != NULL); + res = allocCons(tas); + res->tete = e; + res->queue = l; + return res; +} + +void libereListe(L_void l) { + assert(l != NULL); + while (l != nilPtr) { + L_void ll = l->queue; + + libereCons(l); + l = ll; + } +} + +long longueur(L_void l) { + long lng = 0; + + assert(l != NULL); + while (l != nilPtr) { + lng++; + l = l->queue; + } + return lng; +} + +void **versTableau(T_tas tas, L_void l) { + long lng = 0; + void **res = NULL; + int i = 0; + + assert(l != NULL); + if (l == nilPtr) { + return NULL; + } + lng = longueur(l); + res = (void **)memAlloue(tas, lng * (sizeof (void *))); + for (i = 0; i < lng; i++) { + res[i] = l->tete; + l = l->queue; + } + return res; +} + +void concat(L_void *res, L_void l0, L_void l1) { + L_void l = l0; + + assert(l0 != NULL); + assert(l1 != NULL); + if (l0 == nilPtr) { + *res = l1; + return; + } + while (l->queue != nilPtr) { + l = l->queue; + } + l->queue = l1; + *res = l0; +} + +void retourne(L_void *res, L_void l) { + L_void lp = nilPtr; + + assert(l != NULL); + while (l != nilPtr) { + L_void queue = l->queue; + + l->queue = lp; + lp = l; + l = queue; + } + *res = lp; +} + +L_void copie(T_tas tas, L_void l) { + L_void res = nilPtr; + + assert(l != NULL); + while (l != nilPtr) { + res = cons(tas, l->tete, res); + l = l->queue; + } + retourne(&res, res); + return res; +} + +void triSurPlace(L_void *res, L_void l, int cmp(void *, void *)) { + assert(l != NULL); + if (l == nilPtr) { + *res = l; + return; + } else { + long lng = 1; + + while (1) { + L_void *lp = &l; + L_void l0 = l; + + while (l0 != nilPtr) { + long k0 = 0; + long k1 = 0; + L_void l1 = l0; + + while (k0 < lng && l1 != nilPtr) { + l1 = l1->queue; + k0++; + } + if (l0 == l && l1 == nilPtr) { + *res = l; + return; + } + k0 = 0; + while (k0 < lng && k1 < lng && l1 != nilPtr) { + if (cmp(l0->tete, l1->tete)) { + *lp = l0; + lp = &(l0->queue); + l0 = l0->queue; + k0++; + } else { + *lp = l1; + lp = &(l1->queue); + l1 = l1->queue; + k1++; + } + } + while (k0 < lng && l0 != nilPtr) { + *lp = l0; + lp = &(l0->queue); + l0 = l0->queue; + k0++; + } + while (k1 < lng && l1 != nilPtr) { + *lp = l1; + lp = &(l1->queue); + l1 = l1->queue; + k1++; + } + *lp = l1; + l0 = l1; + } + lng *= 2; + } + } +} + +void elimDoublons(L_void l, int egal(void *, void *)) { + L_void lc = NULL; + L_void ll = NULL; + + lc = l; + while (lc != nilPtr) { + ll = lc; + while (ll != nilPtr && egal(lc->tete, ll->tete)) { + ll = ll->queue; + } + lc->queue = ll; + lc = ll; + } +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/liste.h b/examples/dgfip_c/ml_primitif/c_driver/liste.h new file mode 100644 index 000000000..d2b941e55 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/liste.h @@ -0,0 +1,61 @@ +#ifndef __LISTE_H__ +#define __LISTE_H__ + +#include +#include + +#include + +#define TYPEDEF_LISTE(type) \ + struct SL_##type; \ + typedef struct SL_##type SL_##type; \ + typedef SL_##type * L_##type; \ + struct SL_##type { \ + L_##type queue; \ + type *tete; \ + }; + +TYPEDEF_LISTE(void) + +extern void libereBlocs(size_t taille); + +extern L_void nil(void); + +extern L_void cons(T_tas tas, void *e, L_void l); + +extern void libereCons(L_void l); + +extern void libereListe(L_void l); + +extern long longueur(L_void l); + +extern void **versTableau(T_tas tas, L_void l); + +extern void concat(L_void *res, L_void l0, L_void l1); + +extern void retourne(L_void *res, L_void l); + +extern L_void copie(T_tas tas, L_void l); + +extern void triSurPlace(L_void *res, L_void l, int cmp(void *, void *)); + +extern void elimDoublons(L_void l, int egal(void *, void *)); + +#define NIL(type) ((L_##type)nil()) +#define CONS(tas, type, e, l) ((L_##type)cons(tas, (void *)e, (L_void)l)) +#define TETE(type, l) ((type *)(l->tete)) +#define QUEUE(type, l) ((L_##type)(l->queue)) +#define LIBERE_CONS(l) libereCons((L_void)l) +#define LONGUEUR(type, l) (longueur((L_void)l)) +#define LIBERE_LISTE(type, l) libereListe((L_void)l) +#define VERS_TABLEAU(type, l) ((type **)versTableau((L_void)l)) +#define CONCAT(type, res, l0, l1) concat((L_void *)res, (L_void)l0, (L_void)l1) +#define RETOURNE(type, res, l) retourne((L_void *)res, (L_void)l) +#define COPIE(tas, type, l) ((L_##type)copie(tas, (L_void)l)) +#define TRI_SUR_PLACE(type, res, l, cmp) triSurPlace((L_void *)res, (L_void)l, (int (*)(void *, void *))cmp) +#define ELIM_DOUBLONS(type, l, egal) elimDoublons((L_void)l, (int (*)(void *, void *))egal) + +TYPEDEF_LISTE(char) + +#endif /* __LISTE_H__ */ + diff --git a/examples/dgfip_c/ml_primitif/c_driver/main.c b/examples/dgfip_c/ml_primitif/c_driver/main.c new file mode 100644 index 000000000..5125424e4 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/main.c @@ -0,0 +1,138 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +T_tas tasGbl = NULL; + +void itereFichiers( + L_char lf, int rec, + int (*traiteFich)(char *, T_options), T_options opts, + int *nbOk, int *nbKo, int *nbKc +) { + *nbOk = 0; + *nbKo = 0; + *nbKc = 0; + if (lf == NULL || opts == NULL) return; + while (lf != NIL(char)) { + L_char lfSav = NULL; + char *fich = NULL; + char *nomFich = NULL; + int estl = 0, estd = 0, estr = 0; + + fich = TETE(char, lf); + nomFich = strApresDernier('/', fich); /* pointeur dans fich */ + estl = estLien(fich); + if (! discoStat(nomFich, estl) && estl) { + infoLien(nomFich); + lf = QUEUE(char, lf); + memLibere(fich); + LIBERE_CONS(lfSav); + continue; + } + estd = estRep(fich); + if (! discoStat(nomFich, estd) && estd) { + if (rec) { + L_char lff = NULL; + + infoRep(nomFich); + lff = contenuRepPrefix(tasGbl, fich); + if (! discoRep(nomFich, lff)) { + TRI_SUR_PLACE(char, &lff, lff, cmpChar); + CONCAT(char, &lf, lff, QUEUE(char, lf)); + } else { + lf = QUEUE(char, lf); + } + } else { + infoNonRec(nomFich); + lf = QUEUE(char, lf); + } + memLibere(fich); + LIBERE_CONS(lfSav); + continue; + } + estr = estReg(fich); + if (! discoStat(fich, estr) && estr) { + infoReg(nomFich); +/* traitement */ + switch (traiteFich(fich, opts)) { + case 1: + (*nbOk)++; + infoOk(nomFich); + break; + case 0: + (*nbKo)++; + infoKo(nomFich); + break; + case -1: + (*nbKc)++; + infoKc(nomFich); + } +/* fin traitement */ + lf = QUEUE(char, lf); + memLibere(fich); + LIBERE_CONS(lfSav); + continue; + } + discoFichier(nomFich, -1); + lf = QUEUE(char, lf); + memLibere(fich); + LIBERE_CONS(lfSav); + } +} + +int main(int argc, char **argv) { + T_options opts = NULL; + int res = 0; + + tasGbl = memCreeTas(); + opts = analyseLdc(tasGbl, argc, argv); + switch (opts->action) { + case ACT_TRT: { + int nbOk = 0, nbKo = 0, nbKc = 0; + + itereFichiers( + opts->args.trt.fichiers, opts->args.trt.recursif, + traitement, opts, + &nbOk, &nbKo, &nbKc + ); + infoNbOk(nbOk, nbOk + nbKo); + infoNbKo(nbKo, nbOk + nbKo); + infoNbKc(nbKc, nbOk + nbKo + nbKc); + res = (nbKo == 0); + break; + } + case ACT_FMT: { + int nbOk = 0, nbKo = 0, nbKc = 0; + + itereFichiers( + opts->args.fmt.fichiers, opts->args.fmt.recursif, + verifieFormat, opts, + &nbOk, &nbKo, &nbKc + ); + infoNbOk(nbOk, nbOk + nbKc); + infoNbKc(nbKc, nbOk + nbKc); + res = (nbKc == 0); + break; + } + case ACT_AID: + aide(stdout, opts); + res = ! opts->args.aid.err; + break; + } + memLibereTout(); + return (res ? EXIT_SUCCESS : EXIT_FAILURE); +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/mem.c b/examples/dgfip_c/ml_primitif/c_driver/mem.c new file mode 100644 index 000000000..ebcf33127 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/mem.c @@ -0,0 +1,166 @@ +#include +#include + +struct S_mem; +typedef struct S_mem S_mem; +typedef S_mem *T_mem; + +struct S_tas; +typedef struct S_tas S_tas; +typedef S_tas *T_tas; + +struct S_mem { + char occ; + size_t taille; + T_tas tas; + T_mem prec; + T_mem suiv; +}; + +struct S_tas { + T_mem mem; + size_t taille; + long nb; + T_tas prec; + T_tas suiv; +}; + +#define TAILLE_MEM (sizeof (S_mem)) + +static T_tas sauvTas = NULL; + +T_tas memCreeTas(void) { + T_tas tas = NULL; + + tas = (T_tas)malloc(sizeof (S_tas)); + if (tas == NULL) { + return NULL; + } + tas->mem = NULL; + tas->taille = 0; + tas->nb = 0; + tas->prec = NULL; + tas->suiv = sauvTas; + if (sauvTas != NULL) { + sauvTas->prec = tas; + } + sauvTas = tas; + return tas; +} + +void *memAlloue(T_tas tas, size_t t) { + T_mem m = NULL; + char *z = NULL; + + if (tas == NULL || t <= 0) { + return NULL; + } + z = (char *)malloc(TAILLE_MEM + t); + if (z == NULL) { + return NULL; + } + m = (T_mem)z; + m->occ = 2; + m->taille = t; + m->tas = tas; + m->prec = NULL; + m->suiv = tas->mem; + if (tas->mem != NULL) { + tas->mem->prec = m; + } + tas->mem = m; + tas->taille += t; + tas->nb++; + return (void *)(z + TAILLE_MEM); +} + +void *memRealloue(void *p, size_t t) { + T_tas tas = NULL; + T_mem m = NULL; + size_t taille = 0; + T_mem mbis = NULL; + + if (p == NULL || t == 0) { + return NULL; + } + m = (T_mem)(((char *)p) - TAILLE_MEM); + tas = m->tas; + taille = m->taille; + if (taille == t) { + return p; + } + mbis = realloc(m, TAILLE_MEM + t); + if (mbis == NULL) { + return NULL; + } + tas->taille = tas->taille - taille + t; + mbis->taille = t; + if (mbis != m) { + mbis->occ = 2; + if (mbis->prec != NULL) { + mbis->prec->suiv = mbis; + } + if (mbis->suiv != NULL) { + mbis->suiv->prec = mbis; + } + if (tas->mem == m) { + tas->mem = mbis; + } + } + return (void *)(((char *)mbis) + TAILLE_MEM); +} + +void memLibere(void *p) { + T_tas tas = NULL; + T_mem m = NULL; + + if (p == NULL) { + return; + } + m = (T_mem)(((char *)p) - TAILLE_MEM); + tas = m->tas; + if (m->prec != NULL) { + m->prec->suiv = m->suiv; + } + if (m->suiv != NULL) { + m->suiv->prec = m->prec; + } + if (m == tas->mem) { + tas->mem = m->suiv; + } + m->occ = 3; + m->prec = NULL; + m->suiv = NULL; + tas->taille -= m->taille; + tas->nb--; + free(m); +} + +void memLibereTas(T_tas tas) { + if (tas == NULL) { + return; + } + while (tas->mem != NULL) { + T_mem suiv = tas->mem->suiv; + + free(tas->mem); + tas->mem = suiv; + } + if (tas->prec != NULL) { + tas->prec->suiv = tas->suiv; + } + if (tas->suiv != NULL) { + tas->suiv->prec = tas->prec; + } + if (tas == sauvTas) { + sauvTas = tas->suiv; + } + free(tas); +} + +void memLibereTout(void) { + while (sauvTas != NULL) { + memLibereTas(sauvTas); + } +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/mem.h b/examples/dgfip_c/ml_primitif/c_driver/mem.h new file mode 100644 index 000000000..651ef4d1d --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/mem.h @@ -0,0 +1,17 @@ +#ifndef __MEM_H__ +#define __MEM_H__ + +#include + +struct S_tas; +typedef struct S_tas S_tas; +typedef S_tas *T_tas; + +extern T_tas memCreeTas(void); +extern void *memAlloue(T_tas tas, size_t t); +extern void *memRealloue(void *p, size_t t); +extern void memLibere(void *p); +extern void memLibereTas(T_tas tas); +extern void memLibereTout(void); + +#endif /* __MEM_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/options.c b/examples/dgfip_c/ml_primitif/c_driver/options.c new file mode 100644 index 000000000..d03d22f47 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/options.c @@ -0,0 +1,241 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +T_options analyseLdcSans(T_options opts) { + infoActVide(); + opts->action = ACT_AID; + opts->args.aid.cat = NULL; + opts->args.aid.err = FAUX; + return opts; +} + +T_options analyseLdcAide(T_options opts, int argc, char **argv, int i) { + infoActAide(); + opts->action = ACT_AID; + opts->args.aid.cat = NULL; + i++; + if (argc <= i) return opts; + opts->args.aid.cat = argv[i]; + i++; + if (argc > i) { + anoOptsTrop(argv[i]); + opts->args.aid.cat = NULL; + opts->args.aid.err = VRAI; + } + return opts; +} + +#define FMT_ERR(ano) \ + ano; \ + LIBERE_LISTE(char, opts->args.fmt.fichiers); \ + opts->action = ACT_AID; \ + opts->args.aid.cat = NULL; \ + opts->args.aid.err = VRAI; \ + return opts; + +T_options analyseLdcFormat(T_tas tas, T_options opts, int argc, char **argv, int i) { + int nbRec = 0; + int nbStrict = 0; + + infoActFmt(); + opts->action = ACT_FMT; + opts->args.fmt.recursif = FAUX; + opts->args.fmt.strict = FAUX; + opts->args.fmt.fichiers = NIL(char); + i++; + while (i < argc) { + if (strcmp(argv[i], "-recursif") == 0 || strcmp(argv[i], "-r") == 0) { + nbRec++; + opts->args.fmt.recursif = VRAI; + i++; + } else if (strcmp(argv[i], "-strict") == 0 || strcmp(argv[i], "-s") == 0) { + nbStrict++; + opts->args.fmt.strict = VRAI; + i++; + } else if (strcmp(argv[i], "--") == 0) { + i++; + while (i < argc) { + opts->args.fmt.fichiers = CONS(tas, char, strCopie(tas, argv[i]), opts->args.fmt.fichiers); + i++; + } + RETOURNE(char, &(opts->args.fmt.fichiers), opts->args.fmt.fichiers); + goto fin; + } else if (strcmp(argv[i], "") != 0 && argv[i][0] != '-') { + opts->args.fmt.fichiers = CONS(tas, char, strCopie(tas, argv[i]), opts->args.fmt.fichiers); + i++; + } else { + FMT_ERR(anoOptsInc(argv[i])) + } + } + RETOURNE(char, &(opts->args.fmt.fichiers), opts->args.fmt.fichiers); + +fin: + discoOptsRecDup(nbRec > 1); + discoOptsStrictDup(nbStrict > 1); + return opts; +} + +#define TRT_ERR(ano) \ + ano; \ + LIBERE_LISTE(char, opts->args.trt.defs); \ + LIBERE_LISTE(char, opts->args.trt.fichiers); \ + opts->action = ACT_AID; \ + opts->args.aid.cat = NULL; \ + opts->args.aid.err = VRAI; \ + return opts; + +T_options analyseLdcTraitement(T_tas tas, T_options opts, int argc, char **argv, int i) { + int nbMode = 0; + int nbAnnee = 0; + int nbRec = 0; + int nbStrict = 0; + + infoActTrt(); + opts->action = ACT_TRT; + opts->args.trt.mode = Primitif; + opts->args.trt.annee = ANNEE_REVENU + 1; + opts->args.trt.recursif = FAUX; + opts->args.trt.strict = FAUX; + opts->args.trt.defs = NIL(S_varVal); + opts->args.trt.fichiers = NIL(char); + while (i < argc) { + if (strcmp(argv[i], "-mode") == 0 || strcmp(argv[i], "-m") == 0) { + T_mode mode = Primitif; + + i++; + nbMode++; + if (argc <= i || strcmp(argv[i], "") == 0 || argv[i][0] == '-') { + TRT_ERR(anoOptsModeAbs()) + } + if (strcmp(argv[i], "primitif") == 0 || strcmp(argv[i], "p") == 0) { + mode = Primitif; + i++; + } else if (strcmp(argv[i], "correctif") == 0 || strcmp(argv[i], "c") == 0) { + mode = Correctif; + i++; + } else { + TRT_ERR(anoOptsModeArg(argv[i])) + } + if (nbMode > 1 && opts->args.trt.mode != mode) { + TRT_ERR(anoOptsModeDup(opts->args.trt.mode, mode)) + } else { + opts->args.trt.mode = mode; + } + } else if (strcmp(argv[i], "-annee") == 0 || strcmp(argv[i], "-a") == 0) { + int annee = 0; + + i++; + nbAnnee++; + if (argc <= i || strcmp(argv[i], "") == 0 || argv[i][0] == '-') { + TRT_ERR(anoOptsAnneeAbs()) + } + if (strVersUint(argv[i], &annee) != 1) { + TRT_ERR(anoOptsAnneeArg(argv[i])) + } + if (nbAnnee > 1 && opts->args.trt.annee != annee) { + TRT_ERR(anoOptsAnneeDup(opts->args.trt.annee, annee)) + } else { + opts->args.trt.annee = annee; + } + i++; + } else if (strcmp(argv[i], "-recursif") == 0 || strcmp(argv[i], "-r") == 0) { + nbRec++; + opts->args.trt.recursif = VRAI; + i++; + } else if (strcmp(argv[i], "-strict") == 0 || strcmp(argv[i], "-s") == 0) { + nbStrict++; + opts->args.trt.strict = VRAI; + i++; + } else if (strcmp(argv[i], "-def") == 0 || strcmp(argv[i], "-d") == 0) { + char *nom = NULL; + double val = 0.0; + T_varVal vv = NULL; + + i++; + nom = argv[i]; + i++; + if (strVersNum(argv[i], &val) != 1) { + TRT_ERR(anoOptsDefValArg(argv[i])) + } + i++; + vv = creeVarVal(tas, nom, val); + if (vv == NULL) { + if (opts->args.trt.strict) { + TRT_ERR(anoOptsDefVarArg(nom)) + } + } else { + opts->args.trt.defs = CONS(tas, S_varVal, vv, opts->args.trt.defs); + } + } else if (strcmp(argv[i], "--") == 0) { + i++; + while (i < argc) { + opts->args.trt.fichiers = CONS(tas, char, strCopie(tas, argv[i]), opts->args.trt.fichiers); + i++; + } + RETOURNE(S_varval, &(opts->args.trt.defs), opts->args.trt.defs); + RETOURNE(char, &(opts->args.trt.fichiers), opts->args.trt.fichiers); + goto fin; + } else if (strcmp(argv[i], "") != 0 && argv[i][0] != '-') { + opts->args.trt.fichiers = CONS(tas, char, strCopie(tas, argv[i]), opts->args.trt.fichiers); + i++; + } else { + TRT_ERR(anoOptsInc(argv[i])) + } + } + RETOURNE(S_varval, &(opts->args.trt.defs), opts->args.trt.defs); + RETOURNE(char, &(opts->args.trt.fichiers), opts->args.trt.fichiers); + +fin: + if (nbMode == 0) { + TRT_ERR(anoOptsModeAbsent()) + } + discoOptsModeDup(nbMode > 1); + discoOptsAnneeParDefaut(opts->args.trt.annee, nbAnnee == 0); + discoOptsAnneeDup(nbAnnee > 1); + discoOptsRecDup(nbRec > 1); + discoOptsStrictDup(nbStrict > 1); + return opts; +} + +T_options analyseLdc(T_tas tas, int argc, char **argv) { + T_options opts = NULL; + int i = 0; + + opts = (T_options)memAlloue(tas, sizeof (S_options)); + if (argv == NULL || argc <= i) { + anoOptsExe(); + opts->exe = "commande"; + opts->action = ACT_AID; + opts->args.aid.cat = NULL; + opts->args.aid.err = VRAI; + return opts; + } + opts->exe = argv[i]; + i++; + + /* sans argument */ + if (argc <= i) { + return analyseLdcSans(opts); + } + + /* aide */ + if (strcmp(argv[i], "-aide") == 0 || strcmp(argv[i], "-?") == 0) { + return analyseLdcAide(opts, argc, argv, i); + } + + /* format */ + if (strcmp(argv[i], "-format") == 0 || strcmp(argv[i], "-f") == 0) { + return analyseLdcFormat(tas, opts, argc, argv, i); + } + + /* traitement */ + return analyseLdcTraitement(tas, opts, argc, argv, i); +} diff --git a/examples/dgfip_c/ml_primitif/c_driver/options.h b/examples/dgfip_c/ml_primitif/c_driver/options.h new file mode 100644 index 000000000..7d55714d2 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/options.h @@ -0,0 +1,46 @@ +#ifndef __OPTIONS_H__ +#define __OPTIONS_H__ + +#include +#include +#include + +typedef struct S_options_trt { + T_mode mode; + int annee; + int recursif; + int strict; + L_S_varVal defs; + L_char fichiers; +} S_options_trt; + +typedef struct S_options_fmt { + int recursif; + int strict; + L_char fichiers; +} S_options_fmt; + +typedef struct S_options_aid { + char *cat; + int err; +} S_options_aid; + +#define ACT_TRT 0 +#define ACT_FMT 1 +#define ACT_AID 2 + +typedef struct S_options { + int action; + union { + S_options_trt trt; + S_options_fmt fmt; + S_options_aid aid; + } args; + char *exe; +} S_options; + +typedef struct S_options * T_options; + +extern T_options analyseLdc(T_tas tas, int argc, char **argv); + +#endif /* __OPTIONS_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/traitement.c b/examples/dgfip_c/ml_primitif/c_driver/traitement.c new file mode 100644 index 000000000..2a0c6b1b5 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/traitement.c @@ -0,0 +1,425 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +char *creeAno(T_tas tas, T_irj_def_ano da) { + if (da == NULL) return NULL; + return strCopie(tas, da->ano); +} + +void libereAno(char *a) { + memLibere(a); +} + +struct S_rap; +typedef struct S_rap S_rap; +typedef S_rap * T_rap; +struct S_rap { + double numero; + double rappel; + T_varinfo *code; + double montant; + double sens; + double penalite; + double base_tl; + double date; + double _2042_rect; +}; + +T_rap creeRap(T_tas tas, T_irdata *tgv, T_irj_def_rap dr) { + T_rap r = NULL; + + if (dr == NULL) return NULL; + r = (T_rap)memAlloue(tas, sizeof (S_rap)); + r->numero = dr->numero; + r->rappel = dr->rappel; + r->code = cherche_varinfo(tgv, dr->code); + if (r->code == NULL) return NULL; + r->montant = dr->montant; + r->sens = dr->sens; + r->penalite = dr->penalite; + r->base_tl = dr->base_tl; + r->date = dr->date; + r->_2042_rect = dr->_2042_rect; + return r; +} + +void libereRap(T_rap r) { + if (r == NULL) return; + memLibere(r); +} + +TYPEDEF_LISTE(S_rap) + +int ecrisVar(T_irdata *tgv, char *nom, int def, double val) { + T_varinfo *varinfo = cherche_varinfo(tgv, nom); + if (varinfo == NULL) { + return 0; + } + if (def == 0) { + ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, 0, 0.0); + } else { + ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, 1, val); + } + return 1; +} + +int lisAnneeRevenu(T_irdata *tgv, int anneeCalc) { + T_varinfo *varinfo = NULL; + char def = 0; + double val = 0.0; + + varinfo = cherche_varinfo(tgv, "ANREV"); + if (varinfo == NULL) { + return anneeCalc; + } + lis_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, &def, &val); + if (def == 0) { + return anneeCalc; + } else { + return (int)val; + } +} + +L_char erreursVersListe(T_tas tas, T_irdata *tgv) { + L_char res = NULL; + char **errs = NULL; + int i = 0; + + res = NIL(char); + errs = tgv->err_sortie; + for (i = 0; i < tgv->nb_err_sortie; i++) { + res = CONS(tas, char, strCopie(tas, errs[i]), res); + } + TRI_SUR_PLACE(char, &res, res, cmpChar); + ELIM_DOUBLONS(char, res, egalChar); + + return res; +} + +int controleResultat(T_tas tas, T_irdata *tgv, L_S_varVal res, L_char ctl) { + L_char errs = NULL; + int cas = 0; /* 0: OK, 1: KO trop, 2: KO non recue*/ + int ok = 1; + + errs = erreursVersListe(tas, tgv); + while (errs != NIL(char) || ctl != NIL(char)) { + if (errs == NIL(char)) cas = 2; + else if (ctl == NIL(char)) cas = 1; + else { + int cmp = strcmp(TETE(char, ctl), TETE(char, errs)); + if (cmp < 0) cas = 1; + else if (cmp > 0) cas = 2; + else cas = 0; + } + switch (cas) { + case 1: + anoErrEnTrop(TETE(char, errs)); + errs = QUEUE(char, errs); + ok = 0; + break; + case 2: + anoErrNonRecue(TETE(char, ctl)); + ctl = QUEUE(char, ctl); + ok = 0; + break; + default: + ctl = QUEUE(char, ctl); + errs = QUEUE(char, errs); + break; + } + } + + while (res != NIL(S_varVal)) { + S_varVal *vv = TETE(S_varVal, res); + char def = 0; + double val = 0.0; + double val100 = 0.0; + double valRes100 = 0.0; + int lng = strlen(vv->varinfo->name); + + if ( + ! ( + strncmp(vv->varinfo->name, "NBPT", 4) == 0 + || strncmp(vv->varinfo->name, "RETX", 4) == 0 + || (strncmp(vv->varinfo->name, "NATMAJ", 6) == 0 && (lng == 7 || lng == 9 || lng == 10)) + || strncmp(vv->varinfo->name, "TL_", 3) == 0 + ) + && vv->varinfo->est_restituee + ) { + lis_varinfo(tgv, ESPACE_PAR_DEFAUT, vv->varinfo, &def, &val); + val100 = arrondi(val * 100.0); + valRes100 = arrondi(vv->val * 100.0); + if (fabs(val100 - valRes100) > 0.0) { + anoValeurFausse(vv->varinfo->name, val, vv->val); + ok = 0; + } + } + res = QUEUE(S_varVal, res); + } + + return ok; +} + +#define ECRIS_VAR(nom, val) \ + if (! ecrisVar(tgv, nom, 1, val)) { \ + anoVarAbs(nom); \ + ok = -1; \ + goto fin; \ + } + +int ecrisRappels(T_irdata *tgv, L_S_rap rappels) { + tgv->nb_events = LONGUEUR(S_rap, rappels); + if (tgv->nb_events == 0) { + tgv->events = NULL; + } else { + int i = 0; + + tgv->events = (T_event **)malloc(tgv->nb_events * sizeof (T_event *)); + while (rappels != NIL(S_rap)) { + S_rap *r = NULL; + T_event *evt = NULL; + + r = TETE(S_rap, rappels); + evt = (T_event *)malloc(sizeof (T_event)); + tgv->events[i] = evt; + + evt->field_numero_def = 1; + evt->field_numero_val = r->numero; + + evt->field_rappel_def = 1; + evt->field_rappel_val = r->rappel; + + evt->field_code_var = r->code; + + evt->field_montant_def = 1; + evt->field_montant_val = r->montant; + + evt->field_sens_def = 1; + evt->field_sens_val = r->sens; + + evt->field_penalite_def = 1; + evt->field_penalite_val = r->penalite; + + evt->field_base_tl_def = 1; + evt->field_base_tl_val = r->base_tl; + + evt->field_date_def = 1; + evt->field_date_val = r->date; + + evt->field_2042_rect_def = 1; + evt->field_2042_rect_val = r->_2042_rect; + + evt->field_anc_penalite_def = 0; + evt->field_anc_penalite_val = 0.0; + + evt->field_id_evt_def = 0; + evt->field_id_evt_val = 0.0; + + evt->field_strate_def = 0; + evt->field_strate_val = 0.0; + + rappels = QUEUE(S_rap, rappels); + i++; + } + } + + return 1; +} + +void initDefs(T_irdata *tgv, L_S_varVal defs) { + L_S_varVal l = NULL; + + for (l = defs; l != NIL(S_varVal); l = QUEUE(S_varVal, l)) { + T_varVal vv = TETE(S_varVal, l); + + ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, vv->varinfo, 1, vv->val); + } +} + +int traitement(char *chemin, T_options opts) { + T_tas tasTrt = NULL; + T_fich fich = NULL; + T_irj irj = NULL; + int code = IRJ_CODE_VIDE; + L_char lnom = NULL; + char *nom = NULL; + int estCorr = 0; + T_irdata *tgv = NULL; + L_S_varVal resPrim = NULL; + L_char ctlPrim = NULL; + L_S_rap rappels = NULL; + L_S_varVal resRap = NULL; + L_char ctlRap = NULL; + int anneeCalc = 0; + int anneeRevenu = 0; + int ok = 1; + + tasTrt = memCreeTas(); + estCorr = FAUX; + resPrim = NIL(S_varVal); + ctlPrim = NIL(char); + rappels = NIL(S_rap); + resRap = NIL(S_varVal); + ctlRap = NIL(char); + fich = ouvreFich(tasTrt, chemin); + if (fich == NULL) { + discoFichier(chemin, -1); + ok = -1; + goto fin; + } + irj = creeIrj(tasTrt, opts->args.trt.strict); + code = codeIrj(irj); + lnom = NIL(char); + tgv = cree_irdata(); + while (code != IRJ_FIN && code != IRJ_INVALIDE) { + lisIrj(fich, irj); + code = codeIrj(irj); + switch (code) { + case IRJ_NOM: + lnom = CONS(tasTrt, char, strCopie(tasTrt, irj->args.nom), lnom); + break; + case IRJ_NOM_FIN: + RETOURNE(char, &lnom, lnom); + nom = strConcatListe(tasTrt, lnom); + break; + case IRJ_DEF_VAR: + switch (irj->section) { + case IRJ_ENTREES_PRIMITIF_DEBUT: + ECRIS_VAR(irj->args.defVar.var, irj->args.defVar.val); + break; + case IRJ_RESULTATS_PRIMITIF_DEBUT: { + T_varVal vv = creeVarVal(tasTrt, irj->args.defVar.var, irj->args.defVar.val); + + if (vv == NULL) { + if (opts->args.trt.strict) { + anoVarAbs(irj->args.defVar.var); + ok = -1; + goto fin; + } + } else { + resPrim = CONS(tasTrt, S_varVal, vv, resPrim); + } + break; + } + case IRJ_RESULTATS_CORRECTIF_DEBUT: + case IRJ_RESULTATS_RAPPELS_DEBUT: { + T_varVal vv = creeVarVal(tasTrt, irj->args.defVar.var, irj->args.defVar.val); + + if (vv == NULL) { + if (opts->args.trt.strict) { + anoVarAbs(irj->args.defVar.var); + ok = -1; + goto fin; + } + } else { + if (opts->args.trt.strict && ! vv->varinfo->est_restituee) { + anoVarNonRestituee(irj->args.defVar.var); + ok = -1; + goto fin; + } else if (vv->varinfo->est_restituee) { + resRap = CONS(tasTrt, S_varVal, vv, resRap); + } + } + estCorr = VRAI; + break; + } + default: + ok = -1; + goto fin; + } + break; + case IRJ_DEF_ANO: + switch (irj->section) { + case IRJ_CONTROLES_PRIMITIF_DEBUT: + ctlPrim = CONS(tasTrt, char, creeAno(tasTrt, &(irj->args.defAno)), ctlPrim); + break; + case IRJ_CONTROLES_CORRECTIF_DEBUT: + case IRJ_CONTROLES_RAPPELS_DEBUT: + ctlRap = CONS(tasTrt, char, creeAno(tasTrt, &(irj->args.defAno)), ctlRap); + estCorr = VRAI; + break; + default: + ok = -1; + goto fin; + } + break; + case IRJ_DEF_RAP: + if (irj->section == IRJ_ENTREES_RAPPELS_DEBUT) { + T_rap rap = creeRap(tasTrt, tgv, &(irj->args.defRap)); + + if (rap == NULL) { + anoVarAbs(irj->args.defRap.code); + ok = -1; + goto fin; + } + rappels = CONS(tasTrt, S_rap, rap, rappels); + estCorr = VRAI; + } else { + ok = -1; + goto fin; + } + break; + case IRJ_INVALIDE: + case IRJ_CODE_VIDE: + ok = -1; + goto fin; + default: + break; + } + } + + RETOURNE(S_varVal, &resPrim, resPrim); + TRI_SUR_PLACE(char, &ctlPrim, ctlPrim, cmpChar); + ELIM_DOUBLONS(char, ctlPrim, egalChar); + RETOURNE(S_rap, &rappels, rappels); + RETOURNE(S_varVal, &resRap, resRap); + TRI_SUR_PLACE(char, &ctlRap, ctlRap, cmpChar); + ELIM_DOUBLONS(char, ctlRap, egalChar); + ignore((int)estCorr); + + anneeCalc = ANNEE_REVENU; + anneeRevenu = lisAnneeRevenu(tgv, anneeCalc); + discoAnneeRevenu(anneeCalc, anneeRevenu); + if (! ecrisRappels(tgv, rappels)) { + ok = -1; + goto fin; + } + ecrisVar(tgv, "ANCSDED", 1, opts->args.trt.annee); + ecrisVar(tgv, "V_MILLESIME", 1, anneeCalc); + switch (opts->args.trt.mode) { + case Primitif: + initDefs(tgv, opts->args.trt.defs); + enchainement_primitif_interpreteur(tgv); + ok = controleResultat(tasTrt, tgv, resPrim, ctlPrim); + break; + case Correctif: + ecrisVar(tgv, "MODE_CORR", 1, 1.0); + initDefs(tgv, opts->args.trt.defs); + enchaineur_primitif(tgv); + enchaineur_correctif(tgv); + ok = controleResultat(tasTrt, tgv, resRap, ctlRap); + break; + } + +fin: + detruis_irdata(tgv); + memLibere(nom); + fermeFich(fich); + memLibereTas(tasTrt); + return ok; +} diff --git a/examples/dgfip_c/ml_primitif/c_driver/traitement.h b/examples/dgfip_c/ml_primitif/c_driver/traitement.h new file mode 100644 index 000000000..9e4a05ab2 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/traitement.h @@ -0,0 +1,8 @@ +#ifndef __TRAITEMENT_H__ +#define __TRAITEMENT_H__ + +#include + +extern int traitement(char *chemin, T_options opts); + +#endif /* __TRAITEMENT_H__ */ diff --git a/examples/dgfip_c/ml_primitif/c_driver/utils.c b/examples/dgfip_c/ml_primitif/c_driver/utils.c new file mode 100644 index 000000000..188b695a9 --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/utils.c @@ -0,0 +1,204 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define E0 "\033[0m" +#define E30 "\033[30m" +#define E33 "\033[33m" +#define E94 "\033[94m" +#define E107 "\033[107m" + +const char *enteteDgfipCouleurTab[] = { + E107 E94 " .____." E107 E30 + " .___________________________________________. " E0 "\n", + E107 " " E94 " | " E33 "._ " E94 "'" E107 E30 + " | | " E0 "\n", + E107 " " E94 " | " E33 "| \\ " E107 E30 + " | Direction générale des Finances publiques | " E0 "\n", + E107 E94 ".-+-+-' " E107 E30 + " | | " E0 "\n", + E107 " " E94 " | " E33 "| " E107 E30 + " | calculette - interface C | " E0 "\n", + E107 " " E94 " ! " E33 "\\ " E107 E30 + " !___________________________________________! " E0 "\n", + E107 + " " E0 "\n", + NULL +}; + +char enteteDgfipCouleur[1024] = ""; + +const char enteteDgfipNB[] = +" .____. .___________________________________________.\n\ + | ._ ' | |\n\ + | | \\ | Direction générale des Finances publiques |\n\ +.-+-+-' | |\n\ + | | | calculette - interface C |\n\ + ! \\ !___________________________________________!\n\n"; + +const char *enteteDgfip(char couleur) { + if (couleur) { + if (enteteDgfipCouleur[0] == 0) { + int i = 0, j = 0, k = 0; + + while (enteteDgfipCouleurTab[i] != NULL) { + j = 0; + while (enteteDgfipCouleurTab[i][j] != 0) { + enteteDgfipCouleur[k] = enteteDgfipCouleurTab[i][j]; + k++; + j++; + } + i++; + } + enteteDgfipCouleur[k] = 0; + } + return enteteDgfipCouleur; + } + return enteteDgfipNB; +} + +double arrondi(double d) { + if (fabs(d) <= (double)LONG_MAX) { + if (d < 0.0) { + return ceil(d - 0.5); + } else { + return floor(d + 0.5); + } + } else { + return d; + } +} + +size_t strLng(char *str) { + size_t len = 0; + + if (str == NULL) { + return 0; + } + while (str[len] != 0) len++; + return len; +} + +char *strCopie(T_tas tas, char *str) { + size_t len = 0; + char *res = NULL; + int i = 0; + + if (tas == NULL || str == NULL) { + return NULL; + } + len = strLng(str) + 1; + res = (char *)memAlloue(tas, len); + for (i = 0; i < len; i++) { + res[i] = str[i]; + } + return res; +} + +int anneeCourante(void) { + time_t t = time(NULL); + struct tm tm = *localtime(&t); + + return 1900 + tm.tm_year; +} + +void ignore(int i) {} + +int cmpChar(char *s0, char *s1) { + return strcmp(s0, s1) <= 0; +} + +int egalChar(char *s0, char *s1) { + return strcmp(s0, s1) == 0; +} + +int strVersUint(char *s, int *res) { + int i = 0; + char c = 0; + + assert(res != NULL); + *res = 0; + if (s == NULL || s[i] == 0) { + return 2; + } + for (c = s[i]; c != 0; i++, c = s[i]) { + if (c < '0' || '9' < c) { + return -i; + } + *res = 10 * *res + (c - '0'); + } + return 1; +} + +int strVersNum(char *s, double *res) { + int i = 0; + char c = 0; + double sg = 1.0; + + assert(res != NULL); + *res = 0.0; + if (s == NULL || s[i] == 0) { + return 2; + } + if (s[i] == '-') { + sg = -1.0; + i++; + } else if (s[i] < '0' || '9' < s[i]) { + return -i; + } + for (c = s[i]; c != 0 && c != '.'; i++, c = s[i]) { + if (c < '0' || '9' < c) { + return -i; + } + *res = 10.0 * *res + (double)(c - '0'); + } + if (c == 0) { + *res = sg * *res; + return 1; + } else if (c == '.') { + double dec = 1.0; + + i++; + if (s[i] == 0) { + return -i; + } + for (c = s[i]; c != 0; i++, c = s[i]) { + if (c < '0' || '9' < c) { + return -i; + } + *res = 10.0 * *res + (double)(c - '0'); + dec = dec * 10.0; + } + *res = sg * *res / dec; + return 1; + } else { + return -i; + } +} + +char *strApresDernier(char c, char *s) { + char *res = s; + + if (s == NULL) { + return res; + } + while (*s != 0) { + res = s; + while (*s != 0 && *s != c) { + s++; + } + if (*s == c) { + s++; + } + } + return res; + +} + diff --git a/examples/dgfip_c/ml_primitif/c_driver/utils.h b/examples/dgfip_c/ml_primitif/c_driver/utils.h new file mode 100644 index 000000000..bc3742d0b --- /dev/null +++ b/examples/dgfip_c/ml_primitif/c_driver/utils.h @@ -0,0 +1,25 @@ +#ifndef __UTILS_H__ +#define __UTILS_H__ + +#include + +#define VRAI 1 +#define FAUX 0 + +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; + +extern const char *enteteDgfip(char couleur); +double arrondi(double d); +extern size_t strLng(char *str); +extern char *strCopie(T_tas tas, char *str); +extern int anneeCourante(void); +extern void ignore(int i); +extern int cmpChar(char *s0, char *s1); +extern int egalChar(char *s0, char *s1); +extern int strVersUint(char *s, int *res); +extern int strVersNum(char *s, double *res); +extern char *strApresDernier(char c, char *s); + +#endif /* __UTILS_H__ */ diff --git a/examples/dgfip_c/ml_primitif/ml_driver/common.ml b/examples/dgfip_c/ml_primitif/ml_driver/common.ml deleted file mode 100644 index 201d1f01b..000000000 --- a/examples/dgfip_c/ml_primitif/ml_driver/common.ml +++ /dev/null @@ -1,14 +0,0 @@ -module StrSet = Set.Make(String) -module StrMap = Map.Make(String) - -type rappel = - float - * float - * string - * float - * float - * float option - * float option - * float - * float option - diff --git a/examples/dgfip_c/ml_primitif/ml_driver/irdata.c b/examples/dgfip_c/ml_primitif/ml_driver/irdata.c index e8282b1fe..1f7efc25b 100644 --- a/examples/dgfip_c/ml_primitif/ml_driver/irdata.c +++ b/examples/dgfip_c/ml_primitif/ml_driver/irdata.c @@ -1,19 +1,19 @@ +/****** LICENCE CECIL *****/ + #include #include -#include +#include #include +#include #include "mlang.h" -/* Gestion des erreurs */ +#ifndef isinf +int isinf(double d) { + return d < -DBL_MAX || DBL_MAX < d; +} +#endif /* isinf */ -/* - * # ajouter_espace(sz, tab, nb) # - * - * tab est un tableau dynamique de taille sz. - * On demande à disposer de nb cases dans tab. - * Si il n'y a pas assez de place dans tab, on double sa taille. - */ void ajouter_espace(int *sz, char ***tab, int nb) { if (nb >= *sz) { int i = 0; @@ -36,7 +36,55 @@ void ajouter_espace(int *sz, char ***tab, int nb) { } } -void finalise_erreur(T_irdata *irdata) { +void finalise_erreur_corr(T_irdata *irdata) { + int i = 0; + int trouve = 0; + int ano = 0; + T_discord *pDisco = irdata->discords; + + while (pDisco != NULL && ano == 0) { + trouve = 0; + for (i = 0; i < irdata->nb_err_finalise && ! trouve; i++) { + if (strcmp(pDisco->erreur->nom, irdata->err_finalise[i]) == 0) { + trouve = 1; + } + } + if (! trouve) { + ajouter_espace(&irdata->sz_err_finalise, &irdata->err_finalise, irdata->nb_err_finalise); + irdata->err_finalise[irdata->nb_err_finalise] = pDisco->erreur->nom; + irdata->nb_err_finalise++; + if (pDisco->erreur->type == ANOMALIE) ano = 1; + } + pDisco = pDisco->suivant; + } +} + +void exporte_erreur_corr(T_irdata *irdata) { + int i = 0; + int j = 0; + int trouve = 0; + + for (i = 0; i < irdata->sz_err_finalise && irdata->err_finalise[i] != NULL; i++) { + trouve = 0; + for (j = 0; j < irdata->nb_err_archive && ! trouve; j++) { + if (strcmp(irdata->err_finalise[i], irdata->err_archive[j]) == 0) { + trouve = 1; + } + } + if (! trouve) { + ajouter_espace(&irdata->sz_err_archive, &irdata->err_archive, irdata->nb_err_archive); + irdata->err_archive[irdata->nb_err_archive] = irdata->err_finalise[i]; + irdata->nb_err_archive++; + ajouter_espace(&irdata->sz_err_sortie, &irdata->err_sortie, irdata->nb_err_sortie); + irdata->err_sortie[irdata->nb_err_sortie] = irdata->err_finalise[i]; + irdata->nb_err_sortie++; + irdata->err_finalise[i] = NULL; + } + } + irdata->nb_err_finalise = 0; +} + +void finalise_erreur_prim(T_irdata *irdata) { int i = 0; int trouve = 0; T_discord *pDisco = irdata->discords; @@ -61,7 +109,7 @@ void finalise_erreur(T_irdata *irdata) { } } -void exporte_erreur(T_irdata *irdata) { +void exporte_erreur_prim(T_irdata *irdata) { int i = 0; for (i = 0; i < irdata->sz_err_finalise && irdata->err_finalise[i] != NULL; i++) { @@ -71,3 +119,45 @@ void exporte_erreur(T_irdata *irdata) { } } +void finalise_erreur(T_irdata *irdata) { + T_varinfo *mode_corr = cherche_varinfo(irdata, "MODE_CORR"); + char def = 0; + double val = 0.0; + if (mode_corr == NULL) { + finalise_erreur_prim(irdata); + return; + } + lis_varinfo(irdata, ESPACE_PAR_DEFAUT, mode_corr, &def, &val); + if (def == 1 && val == 1.0) { + finalise_erreur_corr(irdata); + } else { + finalise_erreur_prim(irdata); + } +} + +void exporte_erreur(T_irdata *irdata) { + T_varinfo *mode_corr = cherche_varinfo(irdata, "MODE_CORR"); + char def = 0; + double val = 0.0; + if (mode_corr == NULL) { + exporte_erreur_prim(irdata); + return; + } + lis_varinfo(irdata, ESPACE_PAR_DEFAUT, mode_corr, &def, &val); + if (def == 1 && val == 1.0) { + exporte_erreur_corr(irdata); + } else { + exporte_erreur_prim(irdata); + } +} + + +void nettoie_erreurs_finalisees(T_irdata *irdata) { + int i = 0; + + for (i = 0; i < irdata->sz_err_finalise && irdata->err_finalise[i] != NULL; i++) { + irdata->err_finalise[i] = NULL; + } + irdata->nb_err_finalise = 0; +} + diff --git a/examples/dgfip_c/ml_primitif/ml_driver/m.ml b/examples/dgfip_c/ml_primitif/ml_driver/m.ml index 54bd75785..c5792fdcd 100644 --- a/examples/dgfip_c/ml_primitif/ml_driver/m.ml +++ b/examples/dgfip_c/ml_primitif/ml_driver/m.ml @@ -1,166 +1,49 @@ -open Common - -module TGV = struct - type t - - external alloc_tgv : unit -> t = "ml_tgv_alloc" - external unalias : t -> string -> string = "ml_unalias" - external udefined : t -> string -> bool = "ml_tgv_defined" - external ureset : t -> string -> unit = "ml_tgv_reset" - external uget : t -> string -> float option = "ml_tgv_get" - external uget_array : t -> string -> int -> float option = "ml_tgv_get_array" - external uset : t -> string -> float -> unit = "ml_tgv_set" - external copy_all : t -> t -> unit = "ml_tgv_copy" - - let defined tgv var = udefined tgv var - - let reset tgv var = ureset tgv var - - let reset_list (tgv : t) var_list = - List.iter (fun var -> reset tgv var) var_list - - let get_opt (tgv : t) var = uget tgv var - - let get_bool_opt (tgv : t) var = - match get_opt tgv var with - | None -> None - | Some v -> Some (v <> 0.0) - - let get_int_opt (tgv : t) var = - match get_opt tgv var with - | None -> None - | Some v -> Some (int_of_float v) - - let get_def (tgv : t) var def = - match get_opt tgv var with - | None -> def - | Some v -> v - - let get_bool_def (tgv : t) var def = - match get_opt tgv var with - | None -> def - | Some v -> v <> 0.0 - - let get_int_def (tgv : t) var def = - match get_opt tgv var with - | None -> def - | Some v -> int_of_float v - - let get_map_opt (tgv : t) var_list = - List.fold_left (fun map var -> - match get_opt tgv var with - | None -> map - | Some v -> StrMap.add (unalias tgv var) v map) - StrMap.empty var_list - - let get_map_def (tgv : t) var_list def = - List.fold_left (fun map var -> - StrMap.add (unalias tgv var) (get_def tgv var def) map) - StrMap.empty var_list - - let get_array_opt (tgv : t) var idx = uget_array tgv var idx - - let get_array_def (tgv : t) var idx def = - match get_array_opt tgv var idx with - | None -> def - | Some v -> v - - let set ?(ignore_negative=false) (tgv : t) var v = - if ignore_negative && v < 0.0 then () - else uset tgv var v - - let set_bool (tgv : t) var v = - set tgv var (if v then 1.0 else 0.0) - - let set_int (tgv : t) var v = - set tgv var (float_of_int v) - - let set_list0 set (tgv : t) var_v_list = - List.iter (fun (var, v) -> set tgv var v) var_v_list - - let set_list (tgv : t) var_v_list = - set_list0 set tgv var_v_list - - let set_bool_list (tgv : t) var_v_list = - set_list0 set_bool tgv var_v_list - - let set_int_list (tgv : t) var_v_list = - set_list0 set_int tgv var_v_list - - let set_map ?(ignore_negative=false) (tgv : t) var_v_map = - StrMap.iter (fun var montant -> - if ignore_negative && montant < 0.0 then () - else set tgv var montant - ) var_v_map - - let update (tgv : t) var v_opt = - match v_opt with - | None -> reset tgv var - | Some v -> set tgv var v - - let update_bool (tgv : t) var v_opt = - match v_opt with - | None -> reset tgv var - | Some v -> set_bool tgv var v +type tgv +type var + +external tgv_alloc : unit -> tgv = "ml_tgv_alloc" +external cherche_var_opt : tgv -> string -> var option = "ml_cherche_var_opt" +external nom_var : var -> string = "ml_nom_var" +external alias_var : var -> string option = "ml_alias_var" +external get_var_opt : tgv -> var -> float option = "ml_get_var_opt" +external set_var_opt : tgv -> var -> float option -> unit = "ml_set_var_opt" +external init_erreurs : tgv -> unit = "ml_init_erreurs" +external get_discords : tgv -> string list = "ml_get_discords" +external exporte_erreurs : tgv -> unit = "ml_exporte_erreurs" +external get_erreurs : tgv -> string list = "ml_get_erreurs" +external set_evt_list : + tgv + -> (float * float * string * float * float * float * float * float * float) list + -> unit += "ml_set_evt_list" - let update_int (tgv : t) var v_opt = - match v_opt with - | None -> reset tgv var - | Some v -> set_int tgv var v +let cherche_var tgv code = + match cherche_var_opt tgv code with + | Some var -> var + | None -> + Printf.eprintf "variable non trouvee: %s\n" code; + raise Not_found - let copy_abs (tgv : t) svar dvar signvar = - match get_opt tgv svar with - | None -> () - | Some v -> - set tgv svar (Float.abs v); - set_bool tgv signvar (v < 0.0); - set tgv dvar (Float.abs v) +let alias_var_str var = + match alias_var var with + | None -> nom_var var + | Some a -> a - type undef_action = UDIgnore | UDZero | UDCopy +let get tgv name = get_var_opt tgv (cherche_var tgv name) - let internal_copy ~undef (tgv : t) var_list = - List.iter (fun (svar, dvar) -> - match get_opt tgv svar with - | Some v -> set tgv dvar v - | None -> ( - match undef with - | UDIgnore -> () - | UDZero -> set tgv dvar 0.0 - | UDCopy -> reset tgv dvar - ) - ) var_list +let get0 tgv name value = + Option.value ~default:0.0 (get_var_opt tgv (cherche_var tgv name)) - let copy_list ~undef (stgv : t) (dtgv : t) var_list = - List.iter (fun (svar, dvar) -> - match get_opt stgv svar with - | Some v -> set dtgv dvar v - | None -> ( - match undef with - | UDIgnore -> () - | UDZero -> set dtgv dvar 0.0 - | UDCopy -> reset dtgv dvar - ) - ) var_list -end +let set tgv name value = set_var_opt tgv (cherche_var tgv name) (Some value) -external init_errs : TGV.t -> unit = "ml_init_errs" -external get_err_list : TGV.t -> string list = "ml_get_err_list" -external annee_calc : unit -> int = "ml_annee_calc" -external export_errs : TGV.t -> unit = "ml_export_errs" -external enchainement_primitif : TGV.t -> unit = "ml_enchainement_primitif" external set_evt_list : - TGV.t - -> ( - float - * float - * string - * float - * float - * float option - * float option - * float - * float option - ) list + tgv + -> (float * float * string * float * float * float * float * float * float) list -> unit -= "ml_set_evt_list" += "ml_set_evt_list" + +external annee_calc : unit -> int = "ml_annee_calc" +external enchainement_primitif_interpreteur : tgv -> unit = "ml_enchainement_primitif_interpreteur" +external enchaineur_primitif : tgv -> unit = "ml_enchaineur_primitif" +external enchaineur_correctif : tgv -> unit = "ml_enchaineur_correctif" diff --git a/examples/dgfip_c/ml_primitif/ml_driver/main.ml b/examples/dgfip_c/ml_primitif/ml_driver/main.ml index 881bddb4e..410092a22 100644 --- a/examples/dgfip_c/ml_primitif/ml_driver/main.ml +++ b/examples/dgfip_c/ml_primitif/ml_driver/main.ml @@ -1,225 +1,270 @@ -open Common +module StrSet = Set.Make (String) +module StrMap = Map.Make (String) -type instance = { - nom : string; - label : string; - vars : float StrMap.t; - events : rappel list; - expectedVars : float StrMap.t; - expectedAnos : StrSet.t; -} +let pp fmt = Format.printf fmt +let ppe fmt = Format.eprintf fmt -type options = { - files: string list; - year: int; - recursive: bool - } +type mode = Primitif | Correctif -let new_instance nom = { - nom; - label = ""; - vars = StrMap.empty; - events = []; - expectedVars = StrMap.empty; - expectedAnos = StrSet.empty; +type options = { + files: string list; + recursive: bool; + year: int; + mode : mode; } -let read_test filename = +let read_test tgv filename = let test = Read_test.read_test filename in - let fold_prim (nom, inst, insts) s = - match s with - | `Nom noms -> - let nom = String.concat " " noms in - let inst = {inst with nom} in - let insts = List.map (fun i -> {i with nom}) insts in - (nom, inst, insts) - | `EntreesPrimitif pl -> - let vars = - let fold res (code, montant) = StrMap.add code montant res in - List.fold_left fold StrMap.empty pl - in - (nom, {inst with vars}, insts) - | `ControlesPrimitif el -> - let expectedAnos = - let fold err e = StrSet.add e err in - List.fold_left fold StrSet.empty el - in - (nom, {inst with expectedAnos}, insts) - | `ResultatsPrimitif pl -> - let expectedVars = - let fold res (code, montant) = StrMap.add code montant res in - List.fold_left fold StrMap.empty pl - in - let inst = {inst with label = "primitif"; expectedVars} in - (nom, new_instance nom, inst :: insts) - | `EntreesCorrectif _ - | `ControlesCorrectif _ - | `ResultatsCorrectif _ -> (nom, inst, insts) - | `EntreesRappels events -> (nom, {inst with events}, insts) - | `ControlesRappels el -> - let expectedAnos = - let fold err e = StrSet.add e err in - List.fold_left fold StrSet.empty el - in - (nom, {inst with expectedAnos}, insts) - | `ResultatsRappels pl -> - let expectedVars = - let fold res (code, montant) = StrMap.add code montant res in - List.fold_left fold StrMap.empty pl - in - let inst = {inst with label = "correctif"; expectedVars} in - (nom, new_instance nom, inst :: insts) - | `Skip -> (nom, inst, insts) - in - let _, _, insts = List.fold_left fold_prim ("", new_instance "", []) test in - insts + List.fold_left + (fun (nom, est_corr, res_prim, ctl_prim, rappels, res_corr, ctl_rapp) s -> + match s with + | `Nom noms -> + let nom = String.concat " " noms in + nom, est_corr, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | `EntreesPrimitif pl -> + List.iter + (fun (code, montant) -> + M.set_var_opt tgv (M.cherche_var tgv code) (Some montant)) + pl; + nom, est_corr, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | `ControlesPrimitif el -> + let ctl_prim = + let fold err e = StrSet.add e err in + List.fold_left fold ctl_prim el + in + nom, est_corr, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | `ResultatsPrimitif pl -> + let res_prim = + List.fold_left + (fun resultats (code, montant) -> + StrMap.add code montant resultats + ) + res_prim + pl + in + nom, est_corr, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | `EntreesRappels rappels -> + nom, true, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | `ControlesRappels el -> + let ctl_rapp = + let fold err e = StrSet.add e err in + List.fold_left fold ctl_rapp el + in + nom, true, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | `ResultatsRappels pl -> + let res_corr = + List.fold_left (fun resultats (code, montant) -> + StrMap.add code montant resultats + ) res_corr pl + in + nom, est_corr, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + | _ -> nom, true, res_prim, ctl_prim, rappels, res_corr, ctl_rapp + ) + ( + "defaut", + false, + StrMap.empty, + StrSet.empty, + [], + StrMap.empty, + StrSet.empty + ) + test let check_result tgv err expected_tgv expected_err = - let result = ref true in - StrMap.iter (fun code montant -> - (* Consider missing variables as 0.0 and dismiss NBPT (DGFiP does the same) *) - (* NBPT variable doesn't bear any meaning due to DGFiP test generation method *) + let missing_errs = StrSet.diff expected_err err in + let unexpected_errs = StrSet.diff err expected_err in + let res = StrSet.is_empty missing_errs && StrSet.is_empty unexpected_errs in + if not res then ( + StrSet.iter (pp "KO | %s attendue non recue@.") missing_errs; + StrSet.iter (pp "KO | %s recu en trop@.") unexpected_errs; + ); + StrMap.fold + (fun code montant res -> match code with - | "NBPT" -> () + | "NBPT" -> res | _ -> - let montant' = try M.TGV.get_def tgv code 0.0 with Not_found -> 0.0 in - (* Comparaison des valeurs au centime près, conformément à la doctrine - DGFiP actuellement en vigueur *) - let comp = + let montant' = + match M.cherche_var_opt tgv code with + | Some var -> Option.value ~default:0.0 (M.get_var_opt tgv var) + | None -> 0.0 + in + let err = let m = Float.round (montant *. 100.) in let m' = Float.round (montant' *. 100.) in abs_float (m -. m') > 0.0 in - if comp then - begin - result := false; - Printf.eprintf "KO | %s = %f au lieu de %f\n" - code montant' montant - end - ) expected_tgv; - let missing_errs = StrSet.diff expected_err err in - let unexpected_errs = StrSet.diff err expected_err in - if not (StrSet.is_empty missing_errs && StrSet.is_empty unexpected_errs) then ( - result := false; - StrSet.iter (Printf.eprintf "KO | %s attendue non recue\n") missing_errs; - StrSet.iter (Printf.eprintf "KO | %s recu en trop\n") unexpected_errs; - ); - !result + if err then ( + pp "KO | %s = %f au lieu de %f@." code montant' montant + ); + res && not err + ) + expected_tgv + res + +let list_vers_set l = + let add res e = StrSet.add e res in + List.fold_left add StrSet.empty l -let var_addr () = - let vars = lazy - (let vf = open_in "vars.txt" in - let rec aux vars = - try - let line = input_line vf in - match String.split_on_char ' ' line with - | addr::var::_ -> aux ((int_of_string ("0x"^addr), var)::vars) - | _ -> assert false - with - | End_of_file -> vars - in - aux [] |> List.rev) +let run_test_instance options test_file = + let tgv = M.tgv_alloc () in + let _, _, res_prim, ctl_prim, rappels, res_corr, ctl_rapp = + read_test tgv test_file in - Lazy.force vars + M.set_evt_list tgv rappels; + let annee_calc = M.annee_calc () in + let annee_revenu = + match M.get tgv "ANREV" with + | Some anrev -> int_of_float anrev + | None -> annee_calc + in + if annee_revenu <> annee_calc then ( + pp "DLDC02 | année calculette (%d) <> année revenu (%d)@." + annee_calc + annee_revenu + ); + M.set tgv "ANCSDED" (float options.year); + let resultat = + match options.mode with + | Primitif -> + M.enchainement_primitif_interpreteur tgv; + let err_set = list_vers_set (M.get_erreurs tgv) in + check_result tgv err_set res_prim ctl_prim + | Correctif -> + (* Note: AIF fait le calcul correctif même si le primitif a échoué *) + (* Note: techniquement il faut aussi qu'une section rappels soit + présente, même si elle est vide *) + M.set tgv "MODE_CORR" 1.0; + M.enchaineur_primitif tgv; + M.enchaineur_correctif tgv; + let err_set = list_vers_set (M.get_erreurs tgv) in + check_result tgv err_set res_corr ctl_rapp + in + Gc.minor (); (* évite une erreur de segmentation mystérieuse *) + resultat -let rec run_test ~options test_file = - if Sys.is_directory test_file then - if options.recursive then ( - Printf.printf "Reading folder %s...\n%!" test_file; - run_tests - ~options - (Sys.readdir test_file |> Array.to_list |> List.map (Filename.concat test_file)) - ) - else ( - Printf.printf "Ignoring folder %s (add --rec to explore subfolders).\n%!" test_file; - true - ) - else if Read_test.is_empty test_file then ( - Printf.printf "Warning: skipping empty file %s.\n%!" test_file; - true - ) else ( - Printf.printf "Testing %s...\n%!" test_file; - let annee_calc = M.annee_calc () in - let insts = read_test test_file in - let rec run_insts res = function - | [] -> res - | inst :: insts -> - Printf.printf " Running %s:%s...\n%!" inst.nom inst.label; - let tgv = M.TGV.alloc_tgv () in - StrMap.iter (M.TGV.set tgv) inst.vars; - M.set_evt_list tgv inst.events; - let annee_revenu = M.TGV.get_int_def tgv "ANREV" annee_calc in - if annee_revenu <> annee_calc then ( - Printf.eprintf - "Attention, année calculette (%d) <> année revenu (%d)\n%!" - annee_calc - annee_revenu - ); - (match inst.label with - | "primitif" -> M.TGV.set_int tgv "IND_TRAIT" 4 - | "correctif" -> M.TGV.set_int tgv "IND_TRAIT" 5 - | _ -> M.TGV.set_int tgv "IND_TRAIT" 0); - M.TGV.set_int tgv "ANCSDED" options.year; - M.init_errs tgv; - let _err = M.enchainement_primitif tgv in - M.export_errs tgv; - let err_set = - let add res e = StrSet.add e res in - List.fold_left add StrSet.empty (M.get_err_list tgv) - in - res && check_result tgv err_set inst.expectedVars inst.expectedAnos - in - run_insts true insts - ) +let run_tests options = + let rec loop dir ok ko = function + | [] -> ok, ko + | test_file :: test_files -> + let fname = Filename.basename test_file in + let fdir = Filename.dirname test_file in + if Sys.is_directory test_file then ( + if options.recursive then ( + let test_files' = + let content = + Sys.readdir test_file + |> Array.to_list + |> List.map (Filename.concat test_file) + in + content @ test_files + in + loop dir ok ko test_files' + ) else ( + let dir = + if dir <> fdir then ( + pp "ILDC01 | repertoire \"%s\"@." fdir; + fdir + ) else dir + in + pp "ILDC02 | repertoire \"%s\" ignore@." fname; + loop dir ok ko test_files + ) + ) else ( + let dir = + if dir <> fdir then ( + pp "ILDC01 | repertoire \"%s\"@." fdir; + fdir + ) else dir + in + if Read_test.is_empty test_file then ( + pp "DLDC01 | le fichier \"%s\" est vide@." fname; + loop dir ok ko test_files + ) else ( + pp "ILDC03 | teste \"%s\"...@." fname; + if run_test_instance options test_file then ( + pp "ILDC04 | teste \"%s\" OK@." fname; + loop dir (ok + 1) ko test_files + ) else ( + pp "ILDC05 | teste \"%s\" KO@." fname; + loop dir ok (ko + 1) test_files + ) + ) + ) + in + loop "" 0 0 options.files -and run_tests ~options = function - | [] -> true - | test_file :: files -> - run_test ~options test_file && (Gc.minor (); run_tests ~options files) +let aide oc = + let pr fmt = Format.fprintf oc fmt in + pr "@[Syntaxe :@\n"; + pr "%s@\n" Sys.argv.(0); + pr "-mode [primitif|correctif] (-m [p|c])@\n"; + pr "-annee [annee] (-a [annee])@\n"; + pr "-recursif (-r)@\n"; + pr "-- [fichiers IRJ] ([fichiers IRJ ne commencant pas par '-'])@]@." -let read_args () = - let rec loop acc = function +let lis_args () = + let rec loop fin acc = function | [] -> {acc with files = List.rev acc.files} (* Année *) - | "--annee" :: ann :: tl -> ( - match int_of_string ann with - | year -> loop {acc with year} tl - | exception (Failure _) -> - Printf.eprintf "--annee accepte un entier comme argument (%s)\n" ann; - exit 31 + | ("-annee" | "-a") :: ann :: tl -> ( + match int_of_string ann with + | year -> loop fin {acc with year} tl + | exception (Failure _) -> + ppe "ALDC01 | argument incorrect pour -annee (%s)@." ann; + exit 1 ) - | ["--annee"] -> - Printf.eprintf "argument manquant pour --annee\n"; - exit 31 + | ["-annee" | "-a"] -> + ppe "ALDC02 | argument manquant pour -annee@."; + exit 1 (* Recursive *) - | "--rec" :: tl -> loop {acc with recursive = true} tl - | file :: tl -> loop {acc with files = file :: acc.files} tl + | ("-recursif" | "-r") :: tl -> loop fin {acc with recursive = true} tl + (* Mode *) + | ("-mode" | "-m") :: mode :: tl -> ( + match mode with + | "primitif" | "p" -> loop fin {acc with mode = Primitif} tl + | "correctif" | "c" -> loop fin {acc with mode = Correctif} tl + | m -> + ppe "ALDC03 | argument incorrect pour -mode (%s)@." m; + exit 1 + ) + | ["-mode" | "-m"] -> + ppe "ALDC04 | argument manquant pour -mode@."; + exit 1 + | ("-aide" | "-?") :: _ -> + aide Format.std_formatter; + exit 0 + | "--" :: tl -> loop true acc tl + | file :: tl -> + if not fin && String.length file > 0 && file.[0] = '-' then ( + ppe "ALDC05 | argument incorrect (%s)@." file; + aide Format.err_formatter; + exit 1 + ) else ( + loop fin {acc with files = file :: acc.files} tl + ) in - loop - {files = []; year = M.annee_calc () + 1; recursive = false} - (List.tl (Array.to_list Sys.argv)) - + let options = { + files = []; + recursive = false; + year = M.annee_calc () + 1; + mode = Primitif; + } in + loop false options (List.tl (Array.to_list Sys.argv)) let main () = - if Array.length Sys.argv < 2 then ( - Printf.printf "Syntaxe :\n%s fichier_test\n" Sys.argv.(0); - exit 31 - ); - let options = read_args () in - let rec loop = function - | [] -> true - | test_file :: files -> - run_test ~options test_file && (Gc.minor (); loop files) - in - match loop options.files with - | true -> exit 0 - | false -> exit 1 + let options = lis_args () in + let ok, ko = run_tests options in + pp "ILDC06 | bilan: %d/%d tests reussis@." ok (ok + ko); + if ko = 0 then 0 else 1 -let _ = +let () = Printexc.record_backtrace true; - try main () + try + let res = main () in + exit res with e -> - Printf.eprintf "%s\n" (Printexc.to_string e); + ppe "%s@." (Printexc.to_string e); Printexc.print_backtrace stderr; - exit 30 + exit 1 diff --git a/examples/dgfip_c/ml_primitif/ml_driver/read_test.ml b/examples/dgfip_c/ml_primitif/ml_driver/read_test.ml index c5b9f57f1..767db3c39 100644 --- a/examples/dgfip_c/ml_primitif/ml_driver/read_test.ml +++ b/examples/dgfip_c/ml_primitif/ml_driver/read_test.ml @@ -1,4 +1,3 @@ -open Common type file = { c: in_channel; @@ -9,7 +8,8 @@ let open_file filename = let c = open_in filename in { c; lines = [] } -let close_file file = close_in file.c +let close_file file = + close_in file.c let read_line file = match file.lines with @@ -19,10 +19,9 @@ let read_line file = let put_back_line file line = file.lines <- line :: file.lines -let convert_int s = try int_of_string s with _ -> 0 - let convert_float s = try Float.of_string s + (* with _ -> 0.0 *) with _ -> (* to cope with badly formatted tests *) try Float.of_string (String.sub s 0 @@ -30,9 +29,17 @@ let convert_float s = ((String.index s '.') + 1) '.')) with _ -> 0.0 -let convert_float_opt s = - let rec isSpc i = i < 0 || (s.[i] = ' ' && isSpc (i - 1)) in - if isSpc (String.length s - 1) then None else Some (convert_float s) +let convert_sens s = + if String.length s = 0 then ( + failwith "Sens invalide" + ) else ( + match s.[0] with + | 'R' | 'r' -> 0.0 + | 'M' | 'm' -> 1.0 + | 'P' | 'p' -> 2.0 + | 'C' | 'c' -> 3.0 + | _ -> failwith "Sens invalide" + ) let parse_generic s = let sl = String.split_on_char '/' s in @@ -44,61 +51,48 @@ let parse_generic s = let parse_controle s = let sl = String.split_on_char '/' s in match sl with - | [ err ] -> (String.trim err) + | [ err ] -> (err) | _ -> failwith (Printf.sprintf "Ligne controle invalide: '%s'" s) let parse_entree_corr s = let sl = String.split_on_char '/' s in match sl with - | [ code; montant; code_2042; sens; montant_rappel; - date_evt; penalite; base_tl; _cle_oc1; _cle_oc2 ] -> - let date_evt = convert_int date_evt in - (convert_int code, convert_float montant, convert_int code_2042, - sens.[0], convert_float montant_rappel, - (date_evt mod 10000, date_evt / 10000), - convert_int penalite, convert_float base_tl) + | [ + code; montant; code_2042; sens; montant_rappel; + date; penalite; base_tl; _cle_oc1; _cle_oc2 + ] -> ( + convert_float code, convert_float montant, convert_float code_2042, + convert_sens sens, convert_float montant_rappel, convert_float date, + convert_float penalite, convert_float base_tl + ) | _ -> failwith (Printf.sprintf "Ligne entree correctif invalide: '%s'" s) let parse_entree_rap s = - let err () = failwith (Printf.sprintf "Ligne entree rappel invalide: '%s'" s) in let sl = String.split_on_char '/' s in match sl with - | [ num_evt; num_rappel; code; montant; sens; - penalite; base_tl; date_evt; ind20 ] -> - if String.length code = 0 then err (); - let sens_float = - if String.length sens = 0 then err (); - match sens.[0] with - | 'R' -> 0.0 - | 'C' -> 1.0 - | 'M' -> 2.0 - | 'P' -> 3.0 - | _ -> err () - in - ( - convert_float num_evt, - convert_float num_rappel, - code, - convert_float montant, - sens_float, - convert_float_opt penalite, - convert_float_opt base_tl, - convert_float date_evt, - convert_float_opt ind20 - ) (* TODO: improve *) - | _ -> err () + | [ + numero; rappel; code; montant; sens; + penalite; base_tl; date; _2042_rect + ] -> ( + convert_float numero, convert_float rappel, code, convert_float montant, + convert_sens sens, convert_float penalite, convert_float base_tl, + convert_float date, convert_float _2042_rect + ) + | _ -> failwith (Printf.sprintf "Ligne entree rappel invalide: '%s'" s) let read_section_contents f parsefun = let rec aux contents = let s = read_line f in - if String.length s < 1 then + if String.length s < 1 then ( aux contents - (* else if s.[0] = '#' then *) - else if s.[0] = '#' || - s = "CONTROLES-PRIMITIF" then (* to cope with badly formatted tests *) - (put_back_line f s; List.rev contents) - else + ) else if + s.[0] = '#' + || s = "CONTROLES-PRIMITIF" (* to cope with badly formatted tests *) + then ( + put_back_line f s; List.rev contents + ) else ( aux (parsefun s :: contents) + ) in aux [] @@ -160,3 +154,4 @@ let is_empty filename = false with | End_of_file -> close_in c; true + diff --git a/examples/dgfip_c/ml_primitif/ml_driver/stubs.c b/examples/dgfip_c/ml_primitif/ml_driver/stubs.c index 80005f35f..2bb486345 100644 --- a/examples/dgfip_c/ml_primitif/ml_driver/stubs.c +++ b/examples/dgfip_c/ml_primitif/ml_driver/stubs.c @@ -29,9 +29,9 @@ CAMLexport value caml_alloc_some(value v) { #endif -#define Tgv_val(v) (*((T_irdata **)Data_custom_val(v))) +#define Tgv_val(v) (*((T_irdata **) Data_custom_val(v))) -static void finalize_tgv(value tgv_block){ +static void finalize_tgv(value tgv_block) { CAMLparam1(tgv_block); T_irdata *tgv = Tgv_val(tgv_block); detruis_irdata(tgv); @@ -58,7 +58,26 @@ CAMLprim value ml_tgv_alloc(void){ CAMLreturn(mlTgv); } -CAMLprim value ml_init_errs(value mlTgv) { +#define Varinfo_val(v) (*((T_varinfo **) Data_custom_val(v))) + +static struct custom_operations varinfo_block_ops = { + "varinfo.custom.block.ops", + custom_finalize_default, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default, + custom_compare_ext_default, + custom_fixed_length_default +}; + +static value alloc_varinfo(T_varinfo *info) { + value v = caml_alloc_custom(&varinfo_block_ops, sizeof(T_varinfo *), 0, 1); + Varinfo_val(v) = info; + return v; +} + +CAMLprim value ml_init_erreurs(value mlTgv) { CAMLparam1(mlTgv); T_irdata *tgv = Tgv_val(mlTgv); for (int i = 0; i < tgv->sz_err_finalise; i++) { @@ -76,25 +95,52 @@ CAMLprim value ml_init_errs(value mlTgv) { CAMLreturn(Val_unit); } -CAMLprim value ml_export_errs(value mlTgv) { +CAMLprim value ml_get_discords(value mlTgv) { + CAMLparam1(mlTgv); + CAMLlocal2(mlErrListTemp, mlErrListOut); + + T_irdata *tgv = Tgv_val(mlTgv); + + struct S_discord * erreurs = tgv->discords; + + mlErrListOut = Val_emptylist; + while (erreurs != NULL) { + if (erreurs->erreur != NULL) { + mlErrListTemp = caml_alloc_small(2, Tag_cons); // add code ? + Field(mlErrListTemp, 0) = caml_copy_string(erreurs->erreur->nom); + Field(mlErrListTemp, 1) = mlErrListOut; + mlErrListOut = mlErrListTemp; + } + erreurs = erreurs->suivant; + } + + CAMLreturn(mlErrListOut); +} + +CAMLprim value ml_exporte_erreurs(value mlTgv) { CAMLparam1(mlTgv); T_irdata *tgv = Tgv_val(mlTgv); exporte_erreur(tgv); CAMLreturn(Val_unit); } -CAMLprim value ml_get_err_list(value mlTgv) { +CAMLprim value ml_get_erreurs(value mlTgv) { CAMLparam1(mlTgv); - CAMLlocal2(res, cons); - res = Val_emptylist; + CAMLlocal2(mlErrListTemp, mlErrListOut); + T_irdata *tgv = Tgv_val(mlTgv); - for (int i = 0; i < tgv->nb_err_sortie; ++i) { - cons = caml_alloc_small(2, Tag_cons); - Field(cons, 0) = caml_copy_string(tgv->err_sortie[i]); - Field(cons, 1) = res; - res = cons; + + char **errs = tgv->err_sortie; + + mlErrListOut = Val_emptylist; + for (int i = 0; i < tgv->nb_err_sortie; i++) { + mlErrListTemp = caml_alloc_small(2, Tag_cons); // add code ? + Field(mlErrListTemp, 0) = caml_copy_string(errs[i]); + Field(mlErrListTemp, 1) = mlErrListOut; + mlErrListOut = mlErrListTemp; } - CAMLreturn(res); + + CAMLreturn(mlErrListOut); } static T_varinfo *cherche_var(T_irdata *tgv, const char *code) { @@ -106,125 +152,96 @@ static T_varinfo *cherche_var(T_irdata *tgv, const char *code) { return varinfo; } -CAMLprim value ml_unalias(value mlTgv, value mlCode) { - CAMLparam2(mlTgv, mlCode); - - T_irdata *tgv = Tgv_val(mlTgv); - const char *code = String_val(mlCode); - T_varinfo *varinfo = cherche_var(tgv, code); - CAMLreturn(caml_copy_string(varinfo->name)); -} - -CAMLprim value ml_tgv_defined(value mlTgv, value mlCode) { +CAMLprim value ml_cherche_var_opt(value mlTgv, value mlCode) { CAMLparam2(mlTgv, mlCode); - + CAMLlocal1(mlRes); T_irdata *tgv = Tgv_val(mlTgv); const char *code = String_val(mlCode); - int def = 0; - char res_def = 0; - double res_val = 0.0; - T_varinfo *varinfo = cherche_var(tgv, code); - lis_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, &res_def, &res_val); - def = (int)res_def; - CAMLreturn(Val_int(def != 0)); + T_varinfo *info = cherche_varinfo(tgv, code); + if (info == NULL) { + mlRes = Val_none; + } else { + mlRes = caml_alloc_some(alloc_varinfo(info)); + } + CAMLreturn(mlRes); } -CAMLprim value ml_tgv_reset(value mlTgv, value mlCode) { - CAMLparam2(mlTgv, mlCode); - - T_irdata *tgv = Tgv_val(mlTgv); - const char *code = String_val(mlCode); - T_varinfo *varinfo = cherche_var(tgv, code); - ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, 0, 0.0); - CAMLreturn(Val_unit); +CAMLprim value ml_nom_var(value mlInfo) { + CAMLparam1(mlInfo); + CAMLlocal1(mlNom); + T_varinfo *info = Varinfo_val(mlInfo); + if (info == NULL) { + fprintf(stderr, "La structure T_varinfo est absente\n"); + exit(1); + } + mlNom = caml_copy_string(info->name); + CAMLreturn(mlNom); } -CAMLprim value ml_tgv_get(value mlTgv, value mlCode) { - CAMLparam2(mlTgv, mlCode); - CAMLlocal1(optOut); - - T_irdata *tgv = Tgv_val(mlTgv); - const char *code = String_val(mlCode); - T_varinfo *varinfo = cherche_var(tgv, code); - char res_def = 0; - double res_val = 0.0; - lis_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, &res_def, &res_val); - if (res_def) { - optOut = caml_alloc_some(caml_copy_double(res_val)); +CAMLprim value ml_alias_var(value mlInfo) { + CAMLparam1(mlInfo); + CAMLlocal1(mlAlias); + T_varinfo *info = Varinfo_val(mlInfo); + if (info == NULL) { + fprintf(stderr, "La structure T_varinfo est absente\n"); + exit(1); + } + if (info->alias[0] == 0) { + mlAlias = Val_none; } else { - optOut = Val_none; + mlAlias = caml_alloc_some(caml_copy_string(info->alias)); } - CAMLreturn(optOut); + CAMLreturn(mlAlias); } -CAMLprim value ml_tgv_get_array(value mlTgv, value mlCode, value mlIdx) { - CAMLparam3(mlTgv,mlCode, mlIdx); +CAMLprim value ml_get_var_opt(value mlTgv, value mlInfo) { + CAMLparam2(mlTgv, mlInfo); CAMLlocal1(optOut); T_irdata *tgv = Tgv_val(mlTgv); - const char *code = String_val(mlCode); - int idx = Int_val(mlIdx); - T_varinfo *varinfo = cherche_var(tgv, code); - char res_def; - double res_val; - if (varinfo != NULL && varinfo->tab_idx >= 0) { - lis_tabaccess(tgv, ESPACE_PAR_DEFAUT, varinfo->tab_idx, 1, (double)idx, &res_def, &res_val); - if (res_def > 0) { - optOut = caml_alloc_some(caml_copy_double(res_val)); - } else { - optOut = Val_none; - } + T_varinfo *info = Varinfo_val(mlInfo); + char def; + double val; + lis_varinfo(tgv, ESPACE_PAR_DEFAUT, info, &def, &val); + if (def == 0) { + optOut = Val_none; } else { - optOut = Val_none; + optOut = caml_alloc_some(caml_copy_double(val)); } + CAMLreturn(optOut); } -CAMLprim value ml_tgv_set(value mlTgv, value mlCode, value mlMontant) { - CAMLparam3(mlTgv, mlCode, mlMontant); +CAMLprim value ml_set_var_opt(value mlTgv, value mlInfo, value mlVal) { + CAMLparam3(mlTgv, mlInfo, mlVal); T_irdata *tgv = Tgv_val(mlTgv); - const char *code = String_val(mlCode); - double montant = Double_val(mlMontant); - T_varinfo *varinfo = cherche_var(tgv, code); - ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, varinfo, 1, montant); - CAMLreturn(Val_unit); -} - -CAMLprim value ml_tgv_copy(value mlSTgv, value mlDTgv) { - CAMLparam2(mlSTgv, mlDTgv); + T_varinfo *info = Varinfo_val(mlInfo); + if (mlVal == Val_none) { + ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, info, 0, 0.0); + } else { + ecris_varinfo(tgv, ESPACE_PAR_DEFAUT, info, 1, Double_val(Field(mlVal, 0))); + } - T_irdata *stgv = Tgv_val(mlSTgv); - T_irdata *dtgv = Tgv_val(mlDTgv); - recopie_saisie(stgv, dtgv); - recopie_calculee(stgv, dtgv); - recopie_base(stgv, dtgv); CAMLreturn(Val_unit); } -CAMLprim value ml_annee_calc(value unit) { - CAMLparam1(unit); +CAMLprim value ml_annee_calc(value mlUnit) { + CAMLparam1(mlUnit); CAMLreturn(Val_int(ANNEE_REVENU)); } -CAMLprim value ml_enchainement_primitif(value mlTgv) { - CAMLparam1(mlTgv); - CAMLlocal2(mlErrListTemp, mlErrListOut); - - T_irdata *tgv = Tgv_val(mlTgv); - T_discord *erreurs = enchainement_primitif_interpreteur(tgv); - mlErrListOut = Val_emptylist; - while (erreurs != NULL) { - if (erreurs->erreur != NULL) { - mlErrListTemp = caml_alloc_small(2, Tag_cons); // add code ? - Field(mlErrListTemp, 0) = caml_copy_string(erreurs->erreur->nom); - Field(mlErrListTemp, 1) = mlErrListOut; - mlErrListOut = mlErrListTemp; - } - erreurs = erreurs->suivant; +#define DECL_ENCH(ench) \ + CAMLprim value ml_##ench(value mlTgv) { \ + CAMLparam1(mlTgv); \ + T_irdata *tgv = Tgv_val(mlTgv); \ + ench(tgv); \ + CAMLreturn(Val_unit); \ } - CAMLreturn(mlErrListOut); -} + +DECL_ENCH(enchainement_primitif_interpreteur) +DECL_ENCH(enchaineur_primitif) +DECL_ENCH(enchaineur_correctif) CAMLprim value ml_set_evt_list(value mlTgv, value mlEvtList) { CAMLparam2(mlTgv, mlEvtList); @@ -265,35 +282,26 @@ CAMLprim value ml_set_evt_list(value mlTgv, value mlEvtList) { evt->field_sens_def = 1; evt->field_sens_val = Double_val(Field(mlEvt, 4)); - mlField = Field(mlEvt, 5); - if (mlField == Val_none) { - evt->field_penalite_def = 0; - evt->field_penalite_val = 0.0; - } else { - evt->field_penalite_def = 1; - evt->field_penalite_val = Double_val(Some_val(mlField)); - } - - mlField = Field(mlEvt, 6); - if (mlField == Val_none) { - evt->field_base_tl_def = 0; - evt->field_base_tl_val = 0.0; - } else { - evt->field_base_tl_def = 1; - evt->field_base_tl_val = Double_val(Some_val(mlField)); - } + evt->field_penalite_def = 1; + evt->field_penalite_val = Double_val(Field(mlEvt, 5)); + + evt->field_base_tl_def = 1; + evt->field_base_tl_val = Double_val(Field(mlEvt, 6)); evt->field_date_def = 1; evt->field_date_val = Double_val(Field(mlEvt, 7)); - mlField = Field(mlEvt, 8); - if (mlField == Val_none) { - evt->field_2042_rect_def = 0; - evt->field_2042_rect_val = 0.0; - } else { - evt->field_2042_rect_def = 1; - evt->field_2042_rect_val = Double_val(Some_val(mlField)); - } + evt->field_2042_rect_def = 1; + evt->field_2042_rect_val = Double_val(Field(mlEvt, 8)); + + evt->field_anc_penalite_def = 0; + evt->field_anc_penalite_val = 0.0; + + evt->field_id_evt_def = 0; + evt->field_id_evt_val = 0.0; + + evt->field_strate_def = 0; + evt->field_strate_val = 0.0; i++; mlList = Field(mlList, 1); @@ -301,4 +309,3 @@ CAMLprim value ml_set_evt_list(value mlTgv, value mlEvtList) { CAMLreturn(Val_unit); } - diff --git a/irj_checker.opam b/irj_checker.opam index a5f3c43f2..f65093f54 100644 --- a/irj_checker.opam +++ b/irj_checker.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "1.1.0" +version: "186-15-ga4a1d1ff" synopsis: "IRJ test validation tool" description: "This standalone module performs a syntactic validation of the DGFiP IRJ test format" @@ -10,7 +10,7 @@ license: "GPL-3.0-or-later" homepage: "https://github.com/MLanguage/mlang" bug-reports: "https://github.com/MLanguage/mlang/issues" depends: [ - "ocaml" {>= "4.13.0"} + "ocaml" {>= "4.11.2"} "dune" {build} "odoc" {>= "1.5.3"} "ocamlformat" {= "0.24.1"} diff --git a/m_ext/0/cibles.m b/m_ext/0/cibles.m index 3f783a6a1..819810d27 100644 --- a/m_ext/0/cibles.m +++ b/m_ext/0/cibles.m @@ -18,6 +18,14 @@ alias IND_TRAIT : "indicateur de nature de traitement primitif ou correctif"; +V_FLAG : saisie contexte + classe = 0 priorite = 10 categorie_TL = 20 modcat = 1 primrest = 0 + restituee + alias FLAG + : "Drapeau bidon" type BOOLEEN; + +V_TAB_FLAG : tableau[5] calculee base primrest = 0 : "tableau de drapeaux" type BOOLEEN; + V_ARG : saisie contexte classe = 0 priorite = 10 categorie_TL = 20 modcat = 1 primrest = 0 restituee @@ -53,6 +61,35 @@ espace_variables ESP : categorie saisie, base; +cible test_dans_domaine: +application: iliad; +variables_temporaires: TMP; +afficher_erreur "entree test_dans_domaine\n" indenter(2); +afficher_erreur "dans_domaine(" nom(BOBO1) ", calculee) = " (dans_domaine(BOBO1, calculee)) "\n"; +afficher_erreur "dans_domaine(" nom(BOBO1) ", calculee base) = " (dans_domaine(BOBO1, calculee base)) "\n"; +iterer : variable V : BOBO1, TOTO01, V_BLA, TMP : dans ( + afficher_erreur "dans_domaine(" nom(V) ", saisie *) = " (dans_domaine(V, saisie *)) "\n"; +) +afficher_erreur indenter(-2) "sortie test_dans_domaine\n"; + +cible test_sp_ref: +application: iliad; +afficher_erreur "entree test_sp_ref\n" indenter(2); +GLOBAL.BOBO1 = 1; +ESP.BOBO1 = 2; +GLOBAL.TOTO01 = 3; +afficher_erreur "0 " nom(GLOBAL.BOBO1) " = " (GLOBAL.BOBO1) "\n"; +afficher_erreur "0 " nom(ESP.BOBO1) " = " (ESP.BOBO1) "\n"; +afficher_erreur "0 " nom(GLOBAL.TOTO01) " = " (GLOBAL.TOTO01) "\n"; +iterer : variable V : BOBO1 : dans ( + ESP.V = V; + V = 10 + ESP.V; +) +afficher_erreur "1 " nom(GLOBAL.BOBO1) " = " (GLOBAL.BOBO1) "\n"; +afficher_erreur "1 " nom(ESP.BOBO1) " = " (ESP.BOBO1) "\n"; +afficher_erreur "1 " nom(GLOBAL.TOTO01) " = " (GLOBAL.TOTO01) "\n"; +afficher_erreur indenter(-2) "sortie test_sp_ref\n"; + regle primitive 10: application : iliad; BOBO1 = V_IND_TRAIT; @@ -99,16 +136,16 @@ cible cible_sp_args: application : iliad; -arguments: ARG_TMP, ARG; +arguments: ATMP, A; afficher_erreur "entree cible_sp_args\n" indenter(2); afficher_erreur "0: " - nom(ARG_TMP) " = " (ARG_TMP) ", " - nom(ARG) " = " (ARG) "\n"; -ARG_TMP = ARG_TMP + 1; -ARG = 42; + nom(ATMP) " = " (ATMP) ", " + nom(A) " = " (A) "\n"; +ATMP = ATMP + 1; +A = 42; afficher_erreur "1: " - nom(ARG_TMP) " = " (ARG_TMP) ", " - nom(ARG) " = " (ARG) "\n"; + nom(ATMP) " = " (ATMP) ", " + nom(A) " = " (A) "\n"; afficher_erreur indenter(-2) "sortie cible_sp_args\n"; cible test_cible_avec_args: @@ -298,6 +335,16 @@ afficher_erreur "resultat RES <" nom(RES) "> <" alias(RES) ">\n"; afficher_erreur indenter(-2) "sortie test_aff_fonction\n"; +fonction fun_test_stop_fonction: +application: iliad; +arguments: ARG0, ARG1; +resultat: RES; +variables_temporaires: PROUT0, PROUT1, PROUT2; +afficher_erreur "entree fun_test_stop_fonction\n" indenter(2); +RES = ARG0 + ARG1; +stop fonction; +RES = -1; + cible test_aff_cible: application: iliad; arguments: ARG0, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6; @@ -347,60 +394,123 @@ afficher_erreur nom(TUTU) "[7] = " (TUTU[7]) "\n"; afficher_erreur indenter(-2) "sortie test_tab\n"; -cible test_est_variable: +cible test_meme_variable: application: iliad; -variables_temporaires: A0, AA tableau[25], AKK3, X; -afficher_erreur "entree test_est_variable\n" indenter(2); +variables_temporaires: PROUT, A0, AA tableau[25], AKK3, X; +afficher_erreur "entree test_meme_variable\n" indenter(2); X = 3; afficher_erreur - nom(V_ANREV) ": V_ANREV " (est_variable(V_ANREV, V_ANREV)) - ", ANREV " (est_variable(V_ANREV, ANREV)) - ", PROUT " (est_variable(V_ANREV, PROUT)) "\n"; + nom(V_ANREV) ": V_ANREV " (meme_variable(V_ANREV, V_ANREV)) + ", ANREV " (meme_variable(V_ANREV, ANREV)) + ", PROUT " (meme_variable(V_ANREV, PROUT)) "\n"; afficher_erreur - nom(TUTU) ": TUTU " (est_variable(TUTU, TUTU)) - ", PROUT " (est_variable(TUTU, PROUT)) "\n"; + nom(TUTU) ": TUTU " (meme_variable(TUTU, TUTU)) + ", PROUT " (meme_variable(TUTU, PROUT)) "\n"; afficher_erreur - nom(TUTU) "[" (X) "]: TUTU3 " (est_variable(TUTU[X], TUTU3)) - ", PROUT " (est_variable(TUTU[X], PROUT)) "\n"; + nom(TUTU) "[" (X) "]: TUTU3 " (meme_variable(TUTU[X], TUTU3)) + ", PROUT " (meme_variable(TUTU[X], PROUT)) "\n"; afficher_erreur - nom(A0) ": A0 " (est_variable(A0, A0)) - ", PROUT " (est_variable(A0, PROUT)) "\n"; + nom(A0) ": A0 " (meme_variable(A0, A0)) + ", PROUT " (meme_variable(A0, PROUT)) "\n"; afficher_erreur - nom(AA) ": AA " (est_variable(AA, AA)) - ", PROUT " (est_variable(AA, PROUT)) "\n"; + nom(AA) ": AA " (meme_variable(AA, AA)) + ", PROUT " (meme_variable(AA, PROUT)) "\n"; afficher_erreur - nom(AA) "[" (X) "]: AA03 " (est_variable(AA[X], AA03)) - ", PROUT " (est_variable(AA[X], PROUT)) "\n"; + nom(AA) "[" (X) "]: AA03 " (meme_variable(AA[X], AA03)) + ", PROUT " (meme_variable(AA[X], PROUT)) "\n"; iterer : variable VAR : V_ANREV, A0, AA03, AKK3 : dans ( afficher_erreur nom(VAR) ": " - "V_ANREV " (est_variable(VAR, V_ANREV)) - ", ANREV " (est_variable(VAR, ANREV)) - ", TUTU " (est_variable(VAR, TUTU)) - ", A0 " (est_variable(VAR, A0)) - ", AA03 " (est_variable(VAR, AA03)) - ", AKK3 " (est_variable(VAR, AKK3)) - ", PROUT " (est_variable(VAR, PROUT)) "\n"; + "V_ANREV " (meme_variable(VAR, V_ANREV)) + ", ANREV " (meme_variable(VAR, ANREV)) + ", TUTU " (meme_variable(VAR, TUTU)) + ", A0 " (meme_variable(VAR, A0)) + ", AA03 " (meme_variable(VAR, AA03)) + ", AKK3 " (meme_variable(VAR, AKK3)) + ", PROUT " (meme_variable(VAR, PROUT)) "\n"; ) afficher_erreur nom(champ_evenement(0, code)) ": " - "RESULTAT " (est_variable(champ_evenement(0, code), RESULTAT)) - ", PROUT " (est_variable(champ_evenement(0, code), PROUT)) "\n"; -afficher_erreur indenter(-2) "sortie test_est_variable\n"; + "RESULTAT " (meme_variable(champ_evenement(0, code), RESULTAT)) + ", PROUT " (meme_variable(champ_evenement(0, code), PROUT)) "\n"; +afficher_erreur indenter(-2) "sortie test_meme_variable\n"; + +cible test_arranger: +application: iliad; +variables_temporaires: PREM_EVT; +afficher_erreur "entree test_arranger\n" indenter(2); +afficher_erreur "0 " (PREM_EVT) "\n"; +PREM_EVT = champ_evenement(0, numero); +afficher_erreur "1 " (PREM_EVT) "\n"; +arranger_evenements +#: trier R1, R2 : avec champ_evenement(R1, numero) <= champ_evenement(R2, numero) +: filtrer R : avec 1 +: dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + afficher_erreur "2 " (R) " " (PREM_EVT) "\n"; + ) +) +afficher_erreur "3 " (PREM_EVT) "\n"; +afficher_erreur indenter(-2) "sortie test_arranger\n"; + +cible test_boucle: +application: iliad; +variables_temporaires: DEB, FIN; +afficher_erreur "entree test_boucle\n" indenter(2); +DEB = 0; +FIN = 10; +afficher_erreur "deb DEB = " (DEB) " FIN = " (FIN) "\n" indenter(2); +iterer +: variable I +: entre DEB..FIN increment 1 +: dans ( + afficher_erreur "I = " (I) "\n"; + afficher_erreur "0 DEB = " (DEB) " FIN = " (FIN) " I = " (I) "\n"; + I = 0; + DEB = 0; + FIN = 0; + afficher_erreur "1 DEB = " (DEB) " FIN = " (FIN) " I = " (I) "\n"; +) +afficher_erreur indenter(-2) "fin DEB = " (DEB) " FIN = " (FIN) "\n"; +afficher_erreur indenter(-2) "sortie test_boucle\n"; + +cible test_type: +application: iliad; +variables_temporaires: VAR, VARTAB tableau[5]; +afficher_erreur "entree test_type\n" indenter(2); +afficher_erreur "type(" nom(FLAG) ", BOOLEEN) = " (type(FLAG, BOOLEEN)) "\n"; +afficher_erreur "type(" nom(V_ANREV) ", BOOLEEN) = " (type(V_ANREV, BOOLEEN)) "\n"; +afficher_erreur "type(" nom(V_TAB_FLAG) ", BOOLEEN) = " (type(V_TAB_FLAG, BOOLEEN)) "\n"; +afficher_erreur "type(" nom(V_TAB_FLAG[0]) ", BOOLEEN) = " (type(V_TAB_FLAG[0], BOOLEEN)) "\n"; +afficher_erreur "type(" nom(VAR) ", BOOLEEN) = " (type(VAR, BOOLEEN)) "\n"; +afficher_erreur "type(" nom(VARTAB) ", BOOLEEN) = " (type(VARTAB, BOOLEEN)) "\n"; +afficher_erreur "type(" nom(VARTAB[0]) ", BOOLEEN) = " (type(VARTAB[0], BOOLEEN)) "\n"; +iterer : variable V : FLAG, VAR : dans ( + afficher_erreur "type(" nom(V) ", BOOLEEN) = " (type(V, BOOLEEN)) "\n"; +) +afficher_erreur indenter(-2) "sortie test_type\n"; cible tests: application: iliad; variables_temporaires: U0, UUU tableau[5], U1; -calculer cible test_esp; -calculer cible test_cible_avec_args; +#calculer cible test_dans_domaine; +#calculer cible test_sp_ref; +#calculer cible test_esp; +#calculer cible test_cible_avec_args; #calculer cible test_varcons; #calculer cible test_args; #calculer cible test_tmpref; #calculer cible test_aff; #calculer cible test_tab; -#calculer cible test_est_variable; +#calculer cible test_meme_variable; +#calculer cible test_arranger; +calculer cible test_boucle; +#calculer cible test_type; cible enchainement_primitif: application: iliad; @@ -414,9 +524,159 @@ afficher_erreur nom(VAR) ": " calculer cible tests; RESULTAT = 0; +# Test stop +X : saisie restituee revenu acompte = 1 avfisc = 0 categorie_TL = 20 classe = 2 cotsoc = 5 ind_abat = 0 modcat = 1 nat_code = 0 primrest = 0 priorite = 17 rapcat = 8 sanction = 2 alias X2 : "x"; +Y : calculee restituee primrest = 1 : "y"; +Z : calculee restituee primrest = 1 : "z"; +A : calculee restituee primrest = 1 : "a"; +COMPTEUR : calculee restituee primrest = 0 : "compteur"; + +cible compter_calculee : +application : iliad; +afficher "DEBUT test compter_calculee\n"; +iterer +: variable B +: categorie calculee base +: dans ( +# afficher "Je m'affiche en début de boucle B\n"; + iterer + : variable C + : categorie calculee base + : dans ( + COMPTEUR = COMPTEUR + 1; + # afficher "Compteur = "; + # afficher(COMPTEUR); + # afficher "\n"; + si (COMPTEUR % 3 = 0) alors + # afficher "On arrete la boucle C une fois\n"; + stop; + finsi + si COMPTEUR > 6 alors + # afficher "On stoppe tout!\n"; + stop B; + finsi + ) +# afficher "Fin de la boucle B!\n"; +) +afficher "Compteur = 7 ? "; +afficher(COMPTEUR); +afficher "\n"; +afficher "FIN test compter_calculee\n"; + +# Test stop & restore +cible compter_calculee_restaurer : +application : iliad; + +afficher "DEBUT Test compter_calculee_restaurer\n"; +COMPTEUR = 0; +Y = 0; +Z = 0; +iterer +: variable B +: categorie calculee base +: dans ( +# afficher "Je m'affiche en début de boucle B\n"; + restaurer + : variable REV_AC + : categorie calculee + : avec attribut(REV_AC, primrest) = 0 + : apres ( + iterer + : variable C + : categorie calculee base + : dans ( +# afficher "Compteur = "; +# afficher(COMPTEUR); +# afficher "\n"; + COMPTEUR = COMPTEUR + 1; + Y = Y + 2; + Z = Z + 3; + si (COMPTEUR % 3 = 0) alors +# afficher "On arrete la boucle C une fois\n"; + stop; + finsi + si Y > 50 alors +# afficher "On stoppe tout!\n"; + stop B; + finsi + ) + ) +# afficher "Fin de la boucle B!\n"; + ) +afficher "Compteur = 0 ? "; +afficher(COMPTEUR); +afficher "\n"; +afficher "Y = 52 ? "; +afficher(Y); +afficher "\n"; +afficher "FIN test compter_calculee_restauree\n"; + +# Test aiguillage +cible test_aiguillage : +application : iliad; +afficher "DEBUT test aiguillage\n"; +Y = 1; +aiguillage (Y) : ( + cas 0: + afficher "Y = 0, echec\n"; + cas 1: cas 2: + afficher "Y = 1 ou 2, OK!\n"; + cas indefini: + afficher "Y = --indefini--, echec\n"; + par_defaut: + afficher "Y = ?, echec\n"; +) +afficher "FIN test aiguillage\n"; + +# Test stop fonction +cible test_stop_fonction : +application : iliad; +afficher "DEBUT test stop_fonction\n"; +Y = fun_test_stop_fonction(1, 2); +afficher "Y = 3 ? "; +afficher (Y); +afficher "\n FIN test stop_fonction\n"; + +# Test stop cible +cible test_stop_cible : +application : iliad; +afficher "DEBUT test stop_cible\n"; +afficher "FIN test stop_cible\n"; +stop cible; +afficher "[ERREUR stop_cible] Ce message ne devrait pas pouvoir s'afficher!\n"; + +# Test stop application +cible test_stop_application : +application : iliad; +afficher "DEBUT test stop_app\n"; +afficher "FIN test stop_app\n"; +stop application; +afficher "[ERREUR stop_application] Ce message ne devrait pas pouvoir s'afficher!\n"; + +cible apres_stop_application_code_mort: +application : iliad; +afficher "[ERREUR] Cette cible ne doit pas s'exécuter!\n"; + cible enchainement_primitif_interpreteur: application: iliad; calculer cible enchainement_primitif; +calculer cible compter_calculee; +calculer cible compter_calculee_restaurer; +calculer cible test_aiguillage; +calculer cible test_stop_fonction; +calculer cible test_stop_cible; +calculer cible test_stop_application; +calculer cible apres_stop_application_code_mort; + afficher_erreur "FIN\n"; +# cibles bidonnes pour correctif + +cible enchaineur_primitif: +application: iliad; +neant; + +cible enchaineur_correctif: +application: iliad; +neant; diff --git a/m_ext/2019/cibles.m b/m_ext/2019/cibles.m index 7c8829f48..32838ba72 100644 --- a/m_ext/2019/cibles.m +++ b/m_ext/2019/cibles.m @@ -524,5 +524,15 @@ si present(IAD11) alors application: iliad; V_IND_TRAIT = 4; calculer cible enchainement_primitif; +exporte_erreurs; +# cibles bidonnes pour correctif + +cible enchaineur_primitif: +application: iliad; +neant; + +cible enchaineur_correctif: +application: iliad; +neant; diff --git a/m_ext/2020/cibles.m b/m_ext/2020/cibles.m index 20809843a..b5fc8a4f3 100644 --- a/m_ext/2020/cibles.m +++ b/m_ext/2020/cibles.m @@ -571,4 +571,15 @@ si present(IAD11) alors application: iliad; V_IND_TRAIT = 4; calculer cible enchainement_primitif; +exporte_erreurs; + +# cibles bidonnes pour correctif + +cible enchaineur_primitif: +application: iliad; +neant; + +cible enchaineur_correctif: +application: iliad; +neant; diff --git a/m_ext/2021/cibles.m b/m_ext/2021/cibles.m index 4f7cc1292..53b3c8d1f 100644 --- a/m_ext/2021/cibles.m +++ b/m_ext/2021/cibles.m @@ -582,26 +582,15 @@ si present(IAD11) alors application: iliad; V_IND_TRAIT = 4; calculer cible enchainement_primitif; +exporte_erreurs; +# cibles bidonnes pour correctif -# obsolète +cible enchaineur_primitif: +application: iliad; +neant; -cible dgfip_calculation: +cible enchaineur_correctif: application: iliad; -APPLI_OCEANS = 0; -V_IND_TRAIT = 4; # 4 = PRIMITIF, 5 = CORRECTIF -FLAG_PVRO = 0; -FLAG_EXIT = 0; -FLAG_BAREM = 0; -FLAG_ACO = 0; -V_NEGACO = 0; -V_AVFISCOPBIS = 0; -V_DIFTEOREEL = 0; -PREM8_11 = 0; -ART1731BIS = 0; -V_ACO_MTAP = 0; -V_NEGACO = 0; -calculer cible calcul_primitif_isf; -calculer cible calcul_primitif; -calculer cible calcul_primitif_taux; +neant; diff --git a/m_ext/2022/cibles.m b/m_ext/2022/cibles.m index 0ccfbf801..3f0219c1a 100644 --- a/m_ext/2022/cibles.m +++ b/m_ext/2022/cibles.m @@ -1,5 +1,268 @@ # compir +espace_variables CORR : categorie saisie, calculee, base; +espace_variables D2042 : categorie saisie; +espace_variables D2042_ABAT : categorie saisie; +espace_variables D2042_RECT : categorie saisie; +espace_variables D2042_CTXT : categorie saisie; +espace_variables TL_D2042 : categorie saisie; +espace_variables TL_D2042_INIT : categorie saisie; +espace_variables TL_D2042_RECT : categorie saisie; +espace_variables TL_D2042_ABAT : categorie saisie; +espace_variables TL_D2042_ABAT_INIT : categorie saisie; +espace_variables TL_D2042_ABAT_RECT : categorie saisie; +espace_variables INR_D2042 : categorie saisie; +espace_variables INR_D2042_PROV_ANT : categorie saisie; +espace_variables INR_D2042_REFR99R_ANT : categorie saisie; +espace_variables INR_D2042_R9901_ANT : categorie saisie; +espace_variables MAJO_D2042_STRATE : categorie saisie; +espace_variables MAJO_D2042_REF_ABAT : categorie saisie; +espace_variables MAJO_D2042_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_STRATE : categorie saisie; + +ANNEE_REVENU : calculee primrest = 0 : "" ; +NB_STRATES : calculee primrest = 0 : "" ; +MODE_CORR : saisie environnement toto = 0 alias EST_CORR : "" ; + +# Données globales +PRESENT_8VV : calculee primrest = 0 : "" ; +PRESENT_8VW : calculee primrest = 0 : "" ; +PRESENT_9YT : calculee primrest = 0 : "" ; +MONTANT_9YT : calculee primrest = 0 : "" ; +PENALITE_9YT : calculee primrest = 0 : "" ; +SENS_9YT : calculee primrest = 0 : "" ; +NUM_EVT_9YT : calculee primrest = 0 : "" ; +IND_20_9YT : calculee primrest = 0 : "" ; +BASE_TL_9YT : calculee primrest = 0 : "" ; +PRESENT_9YU : calculee primrest = 0 : "" ; +MONTANT_9YU : calculee primrest = 0 : "" ; +PENALITE_9YU : calculee primrest = 0 : "" ; +SENS_9YU : calculee primrest = 0 : "" ; +NUM_EVT_9YU : calculee primrest = 0 : "" ; +DATE_9YU : calculee primrest = 0 : "" ; +PRESENT_9XT : calculee primrest = 0 : "" ; +MONTANT_9XT : calculee primrest = 0 : "" ; +PENALITE_9XT : calculee primrest = 0 : "" ; +SENS_9XT : calculee primrest = 0 : "" ; +NUM_EVT_9XT : calculee primrest = 0 : "" ; +IND_20_9XT : calculee primrest = 0 : "" ; +BASE_TL_9XT : calculee primrest = 0 : "" ; +PRESENT_9XU : calculee primrest = 0 : "" ; +MONTANT_9XU : calculee primrest = 0 : "" ; +PENALITE_9XU : calculee primrest = 0 : "" ; +SENS_9XU : calculee primrest = 0 : "" ; +NUM_EVT_9XU : calculee primrest = 0 : "" ; +DATE_9XU : calculee primrest = 0 : "" ; +PRESENT_REGCO : calculee primrest = 0 : "" ; +PENALITE_REGCO : calculee primrest = 0 : "" ; +NUM_EVT_REGCO : calculee primrest = 0 : "" ; +NUM_RAP_REGCO : calculee primrest = 0 : "" ; +IND_20_REGCO : calculee primrest = 0 : "" ; +PREMIER_EVT : calculee primrest = 0 : "" ; +CODE_9ZA : calculee primrest = 0 : "" ; +SAUVE_INR_R99 : calculee primrest = 0 : "" ; +ANNEE_DECES_CONJOINT : calculee primrest = 0 : "" ; +NB_RAPPELS_RES : calculee primrest = 0 : "" ; + +# sommes inr 2 +INR_SOMMEBAND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBA_2 : calculee primrest = 0 : "" ; +INR_SOMMEBICND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBIC_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNCND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNC_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBAL_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBND_2 : calculee primrest = 0 : "" ; +INR_SOMMELOC_2 : calculee primrest = 0 : "" ; +INR_SOMMEMOND_2 : calculee primrest = 0 : "" ; +INR_SOMMERCM_2 : calculee primrest = 0 : "" ; +INR_SOMMERF_2 : calculee primrest = 0 : "" ; +INR_SOMMERI_2 : calculee primrest = 0 : "" ; + +# Données de Reference +D2042_NB : calculee primrest = 0 : "" ; +DEFAUT : calculee primrest = 0 : "" ; +DEFAUT10 : calculee primrest = 0 : "" ; +DEFAUT11 : calculee primrest = 0 : "" ; +DEFAUT1011 : calculee primrest = 0 : "" ; +RETARD : calculee primrest = 0 : "" ; +RETARD07 : calculee primrest = 0 : "" ; +RETARD08 : calculee primrest = 0 : "" ; +RETARD0718 : calculee primrest = 0 : "" ; +RETARD101718 : calculee primrest = 0 : "" ; +RETARD22 : calculee primrest = 0 : "" ; +RETARD99 : calculee primrest = 0 : "" ; +RECTIF : calculee primrest = 0 : "" ; +RECTIF_MAJO : calculee primrest = 0 : "" ; +MENTION_EXP : calculee primrest = 0 : "" ; +CORR_RJLJ : calculee primrest = 0 : "" ; +CODE_PENA : calculee primrest = 0 : "" ; +CODE_PENA_ISF : calculee primrest = 0 : "" ; +DATE : calculee primrest = 0 : "" ; +SF_INITIALE : calculee primrest = 0 : "" ; +SF_COURANTE : calculee primrest = 0 : "" ; +SF_PRIMITIF : calculee primrest = 0 : "" ; +R_TARDIF : calculee primrest = 0 : "" ; +LIMELIGHT : calculee primrest = 0 : "" ; +ISF_PRIM : calculee primrest = 0 : "" ; +PRESENT_R10 : calculee primrest = 0 : "" ; +PRESENT_R30 : calculee primrest = 0 : "" ; +PRESENT_R32 : calculee primrest = 0 : "" ; +PREM_8_11 : calculee primrest = 0 : "" ; +PENA_994 : calculee primrest = 0 : "" ; +FLAGMENC : calculee primrest = 0 : "" ; + +# tl +TL_D2042_NB : calculee primrest = 0 : "" ; +TL_D2042_INIT_NB : calculee primrest = 0 : "" ; +TL_D2042_RECT_NB : calculee primrest = 0 : "" ; +TL_BASE_TL : calculee primrest = 0 : "" ; +TL_BASE_TL_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_RECT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_RECT : calculee primrest = 0 : "" ; +TL_NON_ACQUISE : calculee primrest = 0 : "" ; + +# tl mauvaise foi +TL_MF_MFCDIS : calculee primrest = 0 : "" ; +TL_MF_MFCHR : calculee primrest = 0 : "" ; +TL_MF_MFCHR7 : calculee primrest = 0 : "" ; +TL_MF_MFCS : calculee primrest = 0 : "" ; +TL_MF_MFCSAL : calculee primrest = 0 : "" ; +TL_MF_MFCVN : calculee primrest = 0 : "" ; +TL_MF_MFGAIN : calculee primrest = 0 : "" ; +TL_MF_MFGLO : calculee primrest = 0 : "" ; +TL_MF_MFIFI : calculee primrest = 0 : "" ; +TL_MF_MFIR : calculee primrest = 0 : "" ; +TL_MF_MFLOY : calculee primrest = 0 : "" ; +TL_MF_MFMCSG820 : calculee primrest = 0 : "" ; +TL_MF_MFPCAP : calculee primrest = 0 : "" ; +TL_MF_MFPS : calculee primrest = 0 : "" ; +TL_MF_MFPSOL : calculee primrest = 0 : "" ; +TL_MF_MFRD : calculee primrest = 0 : "" ; +TL_MF_MFREGV : calculee primrest = 0 : "" ; +TL_MF_MFRSE1 : calculee primrest = 0 : "" ; +TL_MF_MFRSE2 : calculee primrest = 0 : "" ; +TL_MF_MFRSE3 : calculee primrest = 0 : "" ; +TL_MF_MFRSE4 : calculee primrest = 0 : "" ; +TL_MF_MFRSE5 : calculee primrest = 0 : "" ; +TL_MF_MFRSE6 : calculee primrest = 0 : "" ; +TL_MF_MFRSE7 : calculee primrest = 0 : "" ; +TL_MF_MFTAXAGA : calculee primrest = 0 : "" ; + +# inr +INR_NB_MOIS : calculee primrest = 0 : "" ; +INR_NB_MOIS2 : calculee primrest = 0 : "" ; +INR_NB_MOIS_ISF : calculee primrest = 0 : "" ; +INR_ANNEE_COR : calculee primrest = 0 : "" ; +INR_PASDINR : calculee primrest = 0 : "" ; + +# majo +MAJO_D2042_STRATE_NB : calculee primrest = 0 : "" ; +MAJO_D2042_P_NB : calculee primrest = 0 : "" ; +MAJO_TAUX_STRATE : calculee primrest = 0 : "" ; +MAJO_CODE_STRATE : calculee primrest = 0 : "" ; +MAJO_TARDIF_EVT2 : calculee primrest = 0 : "" ; +MAJO_STR_TR_00 : calculee primrest = 0 : "" ; +MAJO_STR_TR_01 : calculee primrest = 0 : "" ; +MAJO_STR_TR_02 : calculee primrest = 0 : "" ; +MAJO_STR_TR_03 : calculee primrest = 0 : "" ; +MAJO_STR_TR_04 : calculee primrest = 0 : "" ; +MAJO_STR_TR_05 : calculee primrest = 0 : "" ; +MAJO_STR_TR_06 : calculee primrest = 0 : "" ; +MAJO_STR_TR_07 : calculee primrest = 0 : "" ; +MAJO_STR_TR_08 : calculee primrest = 0 : "" ; +MAJO_STR_TR_09 : calculee primrest = 0 : "" ; +MAJO_STR_TR_10 : calculee primrest = 0 : "" ; +MAJO_STR_TR_11 : calculee primrest = 0 : "" ; +MAJO_STR_TR_12 : calculee primrest = 0 : "" ; +MAJO_STR_TR_13 : calculee primrest = 0 : "" ; +MAJO_STR_TR_14 : calculee primrest = 0 : "" ; +MAJO_STR_TR_15 : calculee primrest = 0 : "" ; +MAJO_STR_TR_16 : calculee primrest = 0 : "" ; +MAJO_STR_TR_17 : calculee primrest = 0 : "" ; +MAJO_STR_TR_18 : calculee primrest = 0 : "" ; +MAJO_STR_TR_19 : calculee primrest = 0 : "" ; +MAJO_STR_TR_20 : calculee primrest = 0 : "" ; +MAJO_STR_TR_21 : calculee primrest = 0 : "" ; +MAJO_STR_TR_22 : calculee primrest = 0 : "" ; +MAJO_STR_TR_23 : calculee primrest = 0 : "" ; +MAJO_STR_TR_24 : calculee primrest = 0 : "" ; +MAJO_STR_TR_25 : calculee primrest = 0 : "" ; +MAJO_PREM_STR : calculee primrest = 0 : "" ; +MAJO_NB_STR_TR : calculee primrest = 0 : "" ; +MAJO_DERN_STR_TR : calculee primrest = 0 : "" ; +MAJO_NUM_STRATE : calculee primrest = 0 : "" ; + +# prorata +MAJO_T_RABP : calculee primrest = 0 : "" ; +MAJO_T_RABP07 : calculee primrest = 0 : "" ; +MAJO_T_RABP08 : calculee primrest = 0 : "" ; +MAJO_T_RABP09 : calculee primrest = 0 : "" ; +MAJO_T_RABP10 : calculee primrest = 0 : "" ; +MAJO_T_RABP11 : calculee primrest = 0 : "" ; +MAJO_T_RABP12 : calculee primrest = 0 : "" ; +MAJO_T_RABP17 : calculee primrest = 0 : "" ; +MAJO_T_RABP31 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS : calculee primrest = 0 : "" ; +MAJO_T_RABPPS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS : calculee primrest = 0 : "" ; +MAJO_T_RABPCS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD : calculee primrest = 0 : "" ; +MAJO_T_RABPRD07 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD08 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD09 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD10 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD11 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD12 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD17 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH : calculee primrest = 0 : "" ; +MAJO_T_RABPCH07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH31 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO : calculee primrest = 0 : "" ; +MAJO_T_RABPLO07 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO08 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO09 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO10 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO11 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO12 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO17 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO31 : calculee primrest = 0 : "" ; + +# art1731 +ART1731_SOMME_R3032 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R10 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R30 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R32 : calculee primrest = 0 : "" ; + +# rappels +NB_RAPPELS : calculee primrest = 0 : "" ; +NB_NOUVEAUX_RAPPELS : calculee primrest = 0 : "" ; +NOUVEAU_RAPPEL : calculee primrest = 0 : "" ; + cible regle_1: application: iliad; BIDON = 1; @@ -811,10 +1074,166 @@ puis_quand nb_anomalies() = 0 faire calculer cible trace_out; #afficher_erreur "]traite_double_liquidation2\n"; -# primitif iterpréteur +# ??? + +cible traite_double_liquidation_2_prim: +application: iliad; +calculer cible traite_double_liquidation_2 : espace GLOBAL; + +cible traite_double_liquidation_2_corr: +application: iliad; +nettoie_erreurs; +calculer cible traite_double_liquidation_2 : espace CORR; + +cible sauve_base_initial_prim: +application: iliad; +calculer cible sauve_base_initial : espace GLOBAL; + +cible sauve_base_initial_corr: +application: iliad; +calculer cible sauve_base_initial : espace CORR; + +cible sauve_base_1728_prim: +application: iliad; +calculer cible sauve_base_1728 : espace GLOBAL; + +cible sauve_base_1728_corr: +application: iliad; +calculer cible sauve_base_1728 : espace CORR; + +cible sauve_base_anterieure_prim: +application: iliad; +calculer cible sauve_base_anterieure : espace GLOBAL; + +cible sauve_base_anterieure_corr: +application: iliad; +calculer cible sauve_base_anterieure : espace CORR; + +cible sauve_base_anterieure_cor_prim: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace GLOBAL; + +cible sauve_base_anterieure_cor_corr: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace CORR; + +cible sauve_base_inr_inter22_prim: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace GLOBAL; + +cible sauve_base_inr_inter22_corr: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace CORR; + +cible verif_saisie_cohe_primitive_prim: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace GLOBAL; + +cible verif_saisie_cohe_primitive_corr: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace CORR; + +cible verif_saisie_cohe_corrective_prim: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace GLOBAL; + +cible verif_saisie_cohe_corrective_corr: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace CORR; + +cible verif_cohe_horizontale_corr: +application: iliad; +calculer cible verif_cohe_horizontale : espace CORR; + +cible calcul_primitif_isf_prim: +application: iliad; +calculer cible calcul_primitif_isf : espace GLOBAL; + +cible verif_calcul_primitive_isf_prim: +application: iliad; +calculer cible verif_calcul_primitive_isf : espace GLOBAL; + +cible ench_tl_corr : +application: iliad; +calculer cible ENCH_TL : espace CORR; + +cible sauve_base_inr_r9901_corr : +application: iliad; +calculer cible sauve_base_inr_r9901 : espace CORR; + +cible sauve_base_HR_corr : +application: iliad; +calculer cible sauve_base_HR : espace CORR; + +cible sauve_base_inr_ref_corr : +application: iliad; +calculer cible sauve_base_inr_ref : espace CORR; + +cible sauve_base_inr_ntl_corr : +application: iliad; +calculer cible sauve_base_inr_ntl : espace CORR; + +cible sauve_base_abat98_corr : +application: iliad; +calculer cible sauve_base_abat98 : espace CORR; + +cible sauve_base_abat99_corr : +application: iliad; +calculer cible sauve_base_abat99 : espace CORR; + +cible sauve_base_inr_corr : +application: iliad; +calculer cible sauve_base_inr : espace CORR; + +cible sauve_base_inr_intertl_corr : +application: iliad; +calculer cible sauve_base_inr_intertl : espace CORR; + +cible sauve_base_inr_ntl22_corr : +application: iliad; +calculer cible sauve_base_inr_ntl22 : espace CORR; + +cible sauve_base_inr_ntl24_corr : +application: iliad; +calculer cible sauve_base_inr_ntl24 : espace CORR; + +cible sauve_base_inr_tl22_corr : +application: iliad; +calculer cible sauve_base_inr_tl22 : espace CORR; + +cible sauve_base_inr_tl24_corr : +application: iliad; +calculer cible sauve_base_inr_tl24 : espace CORR; + +cible sauve_base_inr_tl_corr : +application: iliad; +calculer cible sauve_base_inr_tl : espace CORR; + +cible sauve_base_majo_corr : +application: iliad; +calculer cible sauve_base_majo : espace CORR; + +cible sauve_base_premier_corr : +application: iliad; +calculer cible sauve_base_premier : espace CORR; + +cible sauve_base_stratemajo_corr : +application: iliad; +calculer cible sauve_base_stratemajo : espace CORR; + +cible sauve_base_tl_corr : +application: iliad; +calculer cible sauve_base_tl : espace CORR; + +cible sauve_base_tl_init_corr : +application: iliad; +calculer cible sauve_base_tl_init : espace CORR; + +cible sauve_base_tl_rect_corr : +application: iliad; +calculer cible sauve_base_tl_rect : espace CORR; -cible enchainement_primitif_interpreteur: +cible verif_calcul_corrective_corr : application: iliad; -V_IND_TRAIT = 4; # primitif -calculer cible enchainement_primitif; +calculer cible verif_calcul_corrective : espace CORR; diff --git a/m_ext/2022/codes_1731.m b/m_ext/2022/codes_1731.m new file mode 100644 index 000000000..a228aef95 --- /dev/null +++ b/m_ext/2022/codes_1731.m @@ -0,0 +1,1051 @@ +cible range_base_corr_corrige: +application: iliad; +si present(GLOBAL.SHBA) alors CORR.SHBA1731 = GLOBAL.SHBA; finsi +si present(GLOBAL.BANOR) alors CORR.BANOR1731 = GLOBAL.BANOR; finsi +si present(GLOBAL.INDSEUILBA) alors CORR.INDSEUILBA1731 = GLOBAL.INDSEUILBA; finsi +si present(GLOBAL.REB) alors CORR.REB1731 = GLOBAL.REB; finsi +si present(GLOBAL.R1649) alors CORR.R16491731 = GLOBAL.R1649; finsi +si present(GLOBAL.BAEV) alors CORR.BAEV1731 = GLOBAL.BAEV; finsi +si present(GLOBAL.BAEMV) alors CORR.BAEMV1731 = GLOBAL.BAEMV; finsi +si present(GLOBAL.BAEP) alors CORR.BAEP1731 = GLOBAL.BAEP; finsi +si present(GLOBAL.REVTP) alors CORR.REVTP1731 = GLOBAL.REVTP; finsi +si present(GLOBAL.BA1) alors CORR.BA11731 = GLOBAL.BA1; finsi +si present(GLOBAL.REVQTOTQHT) alors CORR.REVQTOTQHT1731 = GLOBAL.REVQTOTQHT; finsi +si present(GLOBAL.PREREV) alors CORR.PREREV1731 = GLOBAL.PREREV; finsi +si present(GLOBAL.REPRCMB) alors CORR.REPRCMB1731 = GLOBAL.REPRCMB; finsi +si present(GLOBAL.REPRCMB) alors CORR.REPRCMB1731 = GLOBAL.REPRCMB; finsi +si present(GLOBAL.RFREVENU) alors CORR.RFREVENU1731 = GLOBAL.RFREVENU; finsi +si present(GLOBAL.TSHBA) alors CORR.TSHBA1731 = GLOBAL.TSHBA; finsi +si present(GLOBAL.DABNCNP1) alors CORR.DABNCNP11731 = GLOBAL.DABNCNP1; finsi +si present(GLOBAL.DABNCNP2) alors CORR.DABNCNP21731 = GLOBAL.DABNCNP2; finsi +si present(GLOBAL.DABNCNP3) alors CORR.DABNCNP31731 = GLOBAL.DABNCNP3; finsi +si present(GLOBAL.DABNCNP4) alors CORR.DABNCNP41731 = GLOBAL.DABNCNP4; finsi +si present(GLOBAL.DABNCNP5) alors CORR.DABNCNP51731 = GLOBAL.DABNCNP5; finsi +si present(GLOBAL.DABNCNP6) alors CORR.DABNCNP61731 = GLOBAL.DABNCNP6; finsi +si present(GLOBAL.DABNCNP) alors CORR.DABNCNP1731 = GLOBAL.DABNCNP; finsi +si present(GLOBAL.DAGRI1) alors CORR.DAGRI11731 = GLOBAL.DAGRI1; finsi +si present(GLOBAL.DAGRI2) alors CORR.DAGRI21731 = GLOBAL.DAGRI2; finsi +si present(GLOBAL.DAGRI3) alors CORR.DAGRI31731 = GLOBAL.DAGRI3; finsi +si present(GLOBAL.DAGRI4) alors CORR.DAGRI41731 = GLOBAL.DAGRI4; finsi +si present(GLOBAL.DAGRI5) alors CORR.DAGRI51731 = GLOBAL.DAGRI5; finsi +si present(GLOBAL.DAGRI6) alors CORR.DAGRI61731 = GLOBAL.DAGRI6; finsi +si present(GLOBAL.DAGRIIMP) alors CORR.DAGRIIMP1731 = GLOBAL.DAGRIIMP; finsi +si present(GLOBAL.DAGRI) alors CORR.DAGRI1731 = GLOBAL.DAGRI; finsi +si present(GLOBAL.DEFAA0) alors CORR.DEFAA01731 = GLOBAL.DEFAA0; finsi +si present(GLOBAL.DEFAA1) alors CORR.DEFAA11731 = GLOBAL.DEFAA1; finsi +si present(GLOBAL.DEFAA2) alors CORR.DEFAA21731 = GLOBAL.DEFAA2; finsi +si present(GLOBAL.DEFAA3) alors CORR.DEFAA31731 = GLOBAL.DEFAA3; finsi +si present(GLOBAL.DEFAA4) alors CORR.DEFAA41731 = GLOBAL.DEFAA4; finsi +si present(GLOBAL.DEFAA5) alors CORR.DEFAA51731 = GLOBAL.DEFAA5; finsi +si present(GLOBAL.DEFBIC1) alors CORR.DEFBIC11731 = GLOBAL.DEFBIC1; finsi +si present(GLOBAL.DEFBIC2) alors CORR.DEFBIC21731 = GLOBAL.DEFBIC2; finsi +si present(GLOBAL.DEFBIC3) alors CORR.DEFBIC31731 = GLOBAL.DEFBIC3; finsi +si present(GLOBAL.DEFBIC4) alors CORR.DEFBIC41731 = GLOBAL.DEFBIC4; finsi +si present(GLOBAL.DEFBIC5) alors CORR.DEFBIC51731 = GLOBAL.DEFBIC5; finsi +si present(GLOBAL.DEFBIC6) alors CORR.DEFBIC61731 = GLOBAL.DEFBIC6; finsi +si present(GLOBAL.DEFRCM) alors CORR.DEFRCM1731 = GLOBAL.DEFRCM; finsi +si present(GLOBAL.DEFRCM2) alors CORR.DEFRCM21731 = GLOBAL.DEFRCM2; finsi +si present(GLOBAL.DEFRCM3) alors CORR.DEFRCM31731 = GLOBAL.DEFRCM3; finsi +si present(GLOBAL.DEFRCM4) alors CORR.DEFRCM41731 = GLOBAL.DEFRCM4; finsi +si present(GLOBAL.DEFRCM5) alors CORR.DEFRCM51731 = GLOBAL.DEFRCM5; finsi +si present(GLOBAL.DEFRCM6) alors CORR.DEFRCM61731 = GLOBAL.DEFRCM6; finsi +si present(GLOBAL.DEFRCMI) alors CORR.DEFRCMI1731 = GLOBAL.DEFRCMI; finsi +si present(GLOBAL.DEFRFNONIBIS) alors CORR.DEFRFNONI1731 = GLOBAL.DEFRFNONIBIS; finsi +si present(GLOBAL.DEFZU) alors CORR.DEFZU1731 = GLOBAL.DEFZU; finsi +si present(GLOBAL.DMOND) alors CORR.DMOND1731 = GLOBAL.DMOND; finsi +si present(GLOBAL.IPTEFN) alors CORR.IPTEFN1731 = GLOBAL.IPTEFN; finsi +si present(GLOBAL.RFDORD) alors CORR.RFDORD1731 = GLOBAL.RFDORD; finsi +si present(GLOBAL.DEFNPI) alors CORR.DEFNPI1731 = GLOBAL.DEFNPI; finsi +si present(GLOBAL.TDEFNPI) alors CORR.TDEFNPI1731 = GLOBAL.TDEFNPI; finsi +si present(GLOBAL.DFRCMN) alors CORR.DFRCMN1731 = GLOBAL.DFRCMN; finsi +si present(GLOBAL.DFRCM1) alors CORR.DFRCM11731 = GLOBAL.DFRCM1; finsi +si present(GLOBAL.DFRCM2) alors CORR.DFRCM21731 = GLOBAL.DFRCM2; finsi +si present(GLOBAL.DFRCM3) alors CORR.DFRCM31731 = GLOBAL.DFRCM3; finsi +si present(GLOBAL.DFRCM4) alors CORR.DFRCM41731 = GLOBAL.DFRCM4; finsi +si present(GLOBAL.DFRCM5) alors CORR.DFRCM51731 = GLOBAL.DFRCM5; finsi +si present(GLOBAL.DEFBA) alors CORR.DEFBA1731 = GLOBAL.DEFBA; finsi +si present(GLOBAL.DLMRNT) alors CORR.DLMRN1731 = GLOBAL.DLMRNT; finsi +si present(GLOBAL.DLMRN7) alors CORR.DLMRN71731 = GLOBAL.DLMRN7; finsi +si present(GLOBAL.DEFBA7) alors CORR.DEFBA71731 = GLOBAL.DEFBA7; finsi +si present(GLOBAL.DEFLOC11) alors CORR.DEFLOC111731 = GLOBAL.DEFLOC11; finsi +si present(GLOBAL.BNCDF7) alors CORR.BNCDF71731 = GLOBAL.BNCDF7; finsi +si present(GLOBAL.DEFLOC) alors CORR.DEFLOC1731 = GLOBAL.DEFLOC; finsi +si present(GLOBAL.BNCDF) alors CORR.BNCDF1731 = GLOBAL.BNCDF; finsi +si present(GLOBAL.FRDV) alors CORR.FRDV1731 = GLOBAL.FRDV; finsi +si present(GLOBAL.FRDC) alors CORR.FRDC1731 = GLOBAL.FRDC; finsi +si present(GLOBAL.FRD1) alors CORR.FRD11731 = GLOBAL.FRD1; finsi +si present(GLOBAL.FRD2) alors CORR.FRD21731 = GLOBAL.FRD2; finsi +si present(GLOBAL.FRD3) alors CORR.FRD31731 = GLOBAL.FRD3; finsi +si present(GLOBAL.FRD4) alors CORR.FRD41731 = GLOBAL.FRD4; finsi +si present(GLOBAL.RCMFRNET) alors CORR.RCMFRNET1731 = GLOBAL.RCMFRNET; finsi +si present(GLOBAL.RCMFR) alors CORR.RCMFR1731 = GLOBAL.RCMFR; finsi +si present(GLOBAL.BICNPF) alors CORR.BICNPF1731 = GLOBAL.BICNPF; finsi +si present(GLOBAL.RFDANT) alors CORR.RFDANT1731 = GLOBAL.RFDANT; finsi +si present(GLOBAL.TFRDV) alors CORR.TFRDV1731 = GLOBAL.TFRDV; finsi +si present(GLOBAL.TFRDC) alors CORR.TFRDC1731 = GLOBAL.TFRDC; finsi +si present(GLOBAL.TFRD1) alors CORR.TFRD11731 = GLOBAL.TFRD1; finsi +si present(GLOBAL.TFRD2) alors CORR.TFRD21731 = GLOBAL.TFRD2; finsi +si present(GLOBAL.TFRD3) alors CORR.TFRD31731 = GLOBAL.TFRD3; finsi +si present(GLOBAL.TFRD4) alors CORR.TFRD41731 = GLOBAL.TFRD4; finsi +si present(GLOBAL.RNIDF) alors CORR.RNIDF1731 = GLOBAL.RNIDF; finsi +si present(GLOBAL.DFBICNPF) alors CORR.DFBICNPF1731 = GLOBAL.DFBICNPF; finsi +si present(GLOBAL.TDFBICNPF) alors CORR.TDFBICNPF1731 = GLOBAL.TDFBICNPF; finsi +si present(GLOBAL.DNPLOCIMPU) alors CORR.DNPLOCIMPU1731 = GLOBAL.DNPLOCIMPU; finsi +si present(GLOBAL.DEFBNCNP) alors CORR.DEFBNCNP1731 = GLOBAL.DEFBNCNP; finsi +si present(GLOBAL.TDEFBNCNP) alors CORR.TDEFBNCNP1731 = GLOBAL.TDEFBNCNP; finsi +si present(GLOBAL.DIDABNCNP1) alors CORR.DIDABNCNP11731 = GLOBAL.DIDABNCNP1; finsi +si present(GLOBAL.TDIDABNCNP1) alors CORR.TDIDABNCNP11731 = GLOBAL.TDIDABNCNP1; finsi +si present(GLOBAL.DEFBANI) alors CORR.DEFBANI1731 = GLOBAL.DEFBANI; finsi +si present(GLOBAL.DEFBANI470) alors CORR.DEFBANI4701731 = GLOBAL.DEFBANI470; finsi +si present(GLOBAL.DEFBANI470BIS) alors CORR.DEFBANI470BIS1731 = GLOBAL.DEFBANI470BIS; finsi +si present(GLOBAL.DEFBANIH470) alors CORR.DEFBANIH4701731 = GLOBAL.DEFBANIH470; finsi +si present(GLOBAL.DEFBNCNP470) alors CORR.DEFBNCNP4701731 = GLOBAL.DEFBNCNP470; finsi +si present(GLOBAL.DEFBNCNPH470) alors CORR.DEFBNCNPH4701731 = GLOBAL.DEFBNCNPH470; finsi +si present(GLOBAL.DEFBICNP470) alors CORR.DEFBICNP4701731 = GLOBAL.DEFBICNP470; finsi +si present(GLOBAL.DEFBICNPH470) alors CORR.DEFBICNPH4701731 = GLOBAL.DEFBICNPH470; finsi +si present(GLOBAL.TDEFBANI) alors CORR.TDEFBANI1731 = GLOBAL.TDEFBANI; finsi +si present(GLOBAL.SFDEFBANI) alors CORR.SFDEFBANI1731 = GLOBAL.SFDEFBANI; finsi +si present(GLOBAL.SFDEFBANI470) alors CORR.SFDEFBANI4701731 = GLOBAL.SFDEFBANI470; finsi +si present(GLOBAL.SFDEFBANIH470) alors CORR.SFDEFBANIH4701731 = GLOBAL.SFDEFBANIH470; finsi +si present(GLOBAL.DEFLOCNP) alors CORR.DEFLOCNP1731 = GLOBAL.DEFLOCNP; finsi +si present(GLOBAL.DEFLOCNPBIS) alors CORR.BIDON1731 = GLOBAL.DEFLOCNPBIS; finsi +si present(GLOBAL.BRCMBISB) alors CORR.BRCMBISB1731 = GLOBAL.BRCMBISB; finsi +si present(GLOBAL.BRCMBISQ) alors CORR.BRCMBISQ1731 = GLOBAL.BRCMBISQ; finsi +si present(GLOBAL.BRCMBIS) alors CORR.BRCM1731 = GLOBAL.BRCMBIS; finsi +si present(GLOBAL.BRCMQ) alors CORR.BRCMQ1731 = GLOBAL.BRCMQ; finsi +si present(GLOBAL.DEF4BB) alors CORR.DEF4BB1731 = GLOBAL.DEF4BB; finsi +si present(GLOBAL.DEF4BD) alors CORR.DEF4BD1731 = GLOBAL.DEF4BD; finsi +si present(GLOBAL.DEF4BC) alors CORR.DEF4BC1731 = GLOBAL.DEF4BC; finsi +si present(GLOBAL.TOTALQUO) alors CORR.TOTALQUO1731 = GLOBAL.TOTALQUO; finsi +si present(GLOBAL.SPENETPV) alors CORR.SPENETPV1731 = GLOBAL.SPENETPV; finsi +si present(GLOBAL.SPENETPC) alors CORR.SPENETPC1731 = GLOBAL.SPENETPC; finsi +si present(GLOBAL.SPENETPP) alors CORR.SPENETPP1731 = GLOBAL.SPENETPP; finsi +si present(GLOBAL.BNCPROPVV) alors CORR.BNCPROPVV1731 = GLOBAL.BNCPROPVV; finsi +si present(GLOBAL.BNCPROPVC) alors CORR.BNCPROPVC1731 = GLOBAL.BNCPROPVC; finsi +si present(GLOBAL.BNCPROPVP) alors CORR.BNCPROPVP1731 = GLOBAL.BNCPROPVP; finsi +si present(GLOBAL.MIBRNETV) alors CORR.MIBRNETV1731 = GLOBAL.MIBRNETV; finsi +si present(GLOBAL.MIBRNETC) alors CORR.MIBRNETC1731 = GLOBAL.MIBRNETC; finsi +si present(GLOBAL.MIBRNETP) alors CORR.MIBRNETP1731 = GLOBAL.MIBRNETP; finsi +si present(GLOBAL.MIBPVV) alors CORR.MIBPVV1731 = GLOBAL.MIBPVV; finsi +si present(GLOBAL.MIBPVC) alors CORR.MIBPVC1731 = GLOBAL.MIBPVC; finsi +si present(GLOBAL.MIBPVP) alors CORR.MIBPVP1731 = GLOBAL.MIBPVP; finsi +si present(GLOBAL.DFANTPROV) alors CORR.DFANTPROV1731 = GLOBAL.DFANTPROV; finsi +si present(GLOBAL.SFDFANTPROV) alors CORR.SFDFANTPROV1731 = GLOBAL.SFDFANTPROV; finsi +si present(GLOBAL.TDFANTPROV) alors CORR.TDFANTPROV1731 = GLOBAL.TDFANTPROV; finsi +si present(GLOBAL.TTSPRT) alors CORR.TTSPRT1731 = GLOBAL.TTSPRT; finsi +si present(GLOBAL.TSPRT) alors CORR.TSPRT1731 = GLOBAL.TSPRT; finsi +si present(GLOBAL.TSPRV) alors CORR.TSPRV1731 = GLOBAL.TSPRV; finsi +si present(GLOBAL.TSPRC) alors CORR.TSPRC1731 = GLOBAL.TSPRC; finsi +si present(GLOBAL.TSPRP) alors CORR.TSPRP1731 = GLOBAL.TSPRP; finsi +si present(GLOBAL.TTSPRV) alors CORR.TTSPRV1731 = GLOBAL.TTSPRV; finsi +si present(GLOBAL.TTSPRC) alors CORR.TTSPRC1731 = GLOBAL.TTSPRC; finsi +si present(GLOBAL.TTSPRP) alors CORR.TTSPRP1731 = GLOBAL.TTSPRP; finsi +si present(GLOBAL.SOMMEBA) alors CORR.SOMMEBA1731 = GLOBAL.SOMMEBA; finsi +si present(GLOBAL.SOMMEBIC) alors CORR.SOMMEBIC1731 = GLOBAL.SOMMEBIC; finsi +si present(GLOBAL.SOMMELOC) alors CORR.SOMMELOC1731 = GLOBAL.SOMMELOC; finsi +si present(GLOBAL.SOMMEBNC) alors CORR.SOMMEBNC1731 = GLOBAL.SOMMEBNC; finsi +si present(GLOBAL.SOMMERF) alors CORR.SOMMERF1731 = GLOBAL.SOMMERF; finsi +si present(GLOBAL.SOMMERCM) alors CORR.SOMMERCM1731 = GLOBAL.SOMMERCM; finsi +si present(GLOBAL.TSBV) alors CORR.TSBV1731 = GLOBAL.TSBV; finsi +si present(GLOBAL.TSBC) alors CORR.TSBC1731 = GLOBAL.TSBC; finsi +si present(GLOBAL.TSB1) alors CORR.TSB11731 = GLOBAL.TSB1; finsi +si present(GLOBAL.TSB2) alors CORR.TSB21731 = GLOBAL.TSB2; finsi +si present(GLOBAL.TSB3) alors CORR.TSB31731 = GLOBAL.TSB3; finsi +si present(GLOBAL.TSB4) alors CORR.TSB41731 = GLOBAL.TSB4; finsi +si present(GLOBAL.TSBP) alors CORR.TSBP1731 = GLOBAL.TSBP; finsi +si present(GLOBAL.SOMDEFLOC) alors CORR.DEFLOC1731 = GLOBAL.SOMDEFLOC; finsi +si present(GLOBAL.SOMBICDF) alors CORR.SOMBICDF1731 = GLOBAL.SOMBICDF; finsi +si present(GLOBAL.SOMLOCDF) alors CORR.SOMLOCDF1731 = GLOBAL.SOMLOCDF; finsi +si present(GLOBAL.SOMBADF) alors CORR.SOMBADF1731 = GLOBAL.SOMBADF; finsi +si present(GLOBAL.SOMBNCDF) alors CORR.SOMBNCDF1731 = GLOBAL.SOMBNCDF; finsi +si present(GLOBAL.RIDEFRI) alors CORR.RIDEFRI1731 = GLOBAL.RIDEFRI; finsi +si present(GLOBAL.RRESIVIEU) alors CORR.RRESIVIEU1731 = GLOBAL.RRESIVIEU; finsi +si present(GLOBAL.RRESINEUV) alors CORR.RRESINEUV1731 = GLOBAL.RRESINEUV; finsi +si present(GLOBAL.ALOCIDEFG) alors CORR.ALOCIDEFG1731 = GLOBAL.ALOCIDEFG; finsi +si present(GLOBAL.RPATNAT) alors CORR.RPATNAT1731 = GLOBAL.RPATNAT; finsi +si present(GLOBAL.RDOMSOC1) alors CORR.RDOMSOC11731 = GLOBAL.RDOMSOC1; finsi +si present(GLOBAL.RLOGSOC) alors CORR.RLOGSOC1731 = GLOBAL.RLOGSOC; finsi +si present(GLOBAL.RCOLENT) alors CORR.RCOLENT1731 = GLOBAL.RCOLENT; finsi +si present(GLOBAL.RLOCENT_1) alors CORR.RLOCENT1731 = GLOBAL.RLOCENT_1; finsi +si present(GLOBAL.COD2TT) alors CORR.COD2TT1731 = GLOBAL.COD2TT; finsi +si present(GLOBAL.RCM1) alors CORR.RCM1731 = GLOBAL.RCM1; finsi +si present(GLOBAL.RRIREP_1) alors CORR.RRIREP1731 = GLOBAL.RRIREP_1; finsi +si present(GLOBAL.BSURV) alors CORR.BSURV1731 = GLOBAL.BSURV; finsi +si present(GLOBAL.DEFIBA) alors CORR.DEFIBA1731 = GLOBAL.DEFIBA; finsi +si present(GLOBAL.DBAIP) alors CORR.DBAIP1731 = GLOBAL.DBAIP; finsi +si present(GLOBAL.LOCNPCF) alors CORR.LOCNPCF1731 = GLOBAL.LOCNPCF; finsi +si present(GLOBAL.NPLOCNETBIS) alors CORR.NPLOCNETBIS1731 = GLOBAL.NPLOCNETBIS; finsi +si present(GLOBAL.SOMDLOC) alors CORR.SOMDLOC1731 = GLOBAL.SOMDLOC; finsi +si present(GLOBAL.BICIFBIS) alors CORR.BICIFBIS1731 = GLOBAL.BICIFBIS; finsi +si present(GLOBAL.SOMDBIC) alors CORR.SOMDBIC1731 = GLOBAL.SOMDBIC; finsi +si present(GLOBAL.BICPROOF) alors CORR.BICPROOF1731 = GLOBAL.BICPROOF; finsi +si present(GLOBAL.BICPROQF) alors CORR.BICPROQF1731 = GLOBAL.BICPROQF; finsi +si present(GLOBAL.BICNPOCF) alors CORR.BICNPOCF1731 = GLOBAL.BICNPOCF; finsi +si present(GLOBAL.BICNPQCF) alors CORR.BICNPQCF1731 = GLOBAL.BICNPQCF; finsi +si present(GLOBAL.BACIFBIS) alors CORR.BACIFBIS1731 = GLOBAL.BACIFBIS; finsi +si present(GLOBAL.BAHQNODEFF) alors CORR.BAHQNODEFF1731 = GLOBAL.BAHQNODEFF; finsi +si present(GLOBAL.BAQNODEFF) alors CORR.BAQNODEFF1731 = GLOBAL.BAQNODEFF; finsi +si present(GLOBAL.BNCNPHQCF) alors CORR.BNCNPHQCF1731 = GLOBAL.BNCNPHQCF; finsi +si present(GLOBAL.BNCNPQCF) alors CORR.BNCNPQCF1731 = GLOBAL.BNCNPQCF; finsi +si present(GLOBAL.BNCPHQCF) alors CORR.BNCPHQCF1731 = GLOBAL.BNCPHQCF; finsi +si present(GLOBAL.BNCPQCF) alors CORR.BNCPQCF1731 = GLOBAL.BNCPQCF; finsi +si present(GLOBAL.RRBGPROV) alors CORR.RRBGPROV1731 = GLOBAL.RRBGPROV; finsi +si present(GLOBAL.DRCF) alors CORR.DRCF1731 = GLOBAL.DRCF; finsi +si present(GLOBAL.RFCE) alors CORR.RFCE1731 = GLOBAL.RFCE; finsi +si present(GLOBAL.RFCF) alors CORR.RFCF1731 = GLOBAL.RFCF; finsi +si present(GLOBAL.RFCD) alors CORR.RFCD1731 = GLOBAL.RFCD; finsi +si present(GLOBAL.DFCG) alors CORR.DFCG1731 = GLOBAL.DFCG; finsi +si present(GLOBAL.DFCE) alors CORR.DFCE1731 = GLOBAL.DFCE; finsi +si present(GLOBAL.RFCG) alors CORR.RFCG1731 = GLOBAL.RFCG; finsi +si present(GLOBAL.RFON) alors CORR.RFON1731 = GLOBAL.RFON; finsi +si present(GLOBAL.RMF) alors CORR.RMF1731 = GLOBAL.RMF; finsi +si present(GLOBAL.SOMDBNC) alors CORR.SOMDBNC1731 = GLOBAL.SOMDBNC; finsi +si present(GLOBAL.BNCIFBIS) alors CORR.BNCIFBIS1731 = GLOBAL.BNCIFBIS; finsi +si present(GLOBAL.RED_1) alors CORR.RED1731 = GLOBAL.RED_1; finsi +si present(GLOBAL.MLOCNET) alors CORR.MLOCNET1731 = GLOBAL.MLOCNET; finsi +si present(GLOBAL.NPLOCNETV) alors CORR.NPLOCNETV1731 = GLOBAL.NPLOCNETV; finsi +si present(GLOBAL.NPLOCNETC) alors CORR.NPLOCNETC1731 = GLOBAL.NPLOCNETC; finsi +si present(GLOBAL.NPLOCNETPAC) alors CORR.NPLOCNETPAC1731 = GLOBAL.NPLOCNETPAC; finsi +si present(GLOBAL.RGPROV) alors CORR.RGPROV1731 = GLOBAL.RGPROV; finsi +si present(GLOBAL.REVDON) alors CORR.REVDON1731 = GLOBAL.REVDON; finsi +si present(GLOBAL.DRFRP) alors CORR.DRFRP1731 = GLOBAL.DRFRP; finsi +si present(GLOBAL.RDONIFI_1) alors CORR.RDONIFI11731 = GLOBAL.RDONIFI_1; finsi +si present(GLOBAL.RDONIFI2_1) alors CORR.RDONIFI21731 = GLOBAL.RDONIFI2_1; finsi +si present(GLOBAL.IFIACT) alors CORR.IFIACT1731 = GLOBAL.IFIACT; finsi +si present(GLOBAL.AREHAB_1) alors CORR.AREHAB1731 = GLOBAL.AREHAB_1; finsi +si present(GLOBAL.APRESSE_1) alors CORR.APRESSE1731 = GLOBAL.APRESSE_1; finsi +si present(GLOBAL.AFORET_1) alors CORR.AFORET1731 = GLOBAL.AFORET_1; finsi +si present(GLOBAL.AFIPDOM_1) alors CORR.AFIPDOM1731 = GLOBAL.AFIPDOM_1; finsi +si present(GLOBAL.AFIPC_1) alors CORR.AFIPC1731 = GLOBAL.AFIPC_1; finsi +si present(GLOBAL.ACINE_1) alors CORR.ACINE1731 = GLOBAL.ACINE_1; finsi +si present(GLOBAL.ASOUFIP_1) alors CORR.ASOUFIP1731 = GLOBAL.ASOUFIP_1; finsi +si present(GLOBAL.BRENOV) alors CORR.BRENOV1731 = GLOBAL.BRENOV; finsi +si present(GLOBAL.ACOMP_1) alors CORR.ACOMP1731 = GLOBAL.ACOMP_1; finsi +si present(GLOBAL.ADUFREPFK_1) alors CORR.ADUFREPFK1731 = GLOBAL.ADUFREPFK_1; finsi +si present(GLOBAL.ADUFREPFR_1) alors CORR.ADUFREPFR1731 = GLOBAL.ADUFREPFR_1; finsi +si present(GLOBAL.ADUFREPFV_1) alors CORR.ADUFREPFV1731 = GLOBAL.ADUFREPFV_1; finsi +si present(GLOBAL.ADUFREPFW_1) alors CORR.ADUFREPFW1731 = GLOBAL.ADUFREPFW_1; finsi +si present(GLOBAL.ADUFREPFX_1) alors CORR.ADUFREPFX1731 = GLOBAL.ADUFREPFX_1; finsi +si present(GLOBAL.ADUFREPFU_1) alors CORR.ADUFREPFU1731 = GLOBAL.ADUFREPFU_1; finsi +si present(GLOBAL.APIREPBI_1) alors CORR.APIREPBI1731 = GLOBAL.APIREPBI_1; finsi +si present(GLOBAL.APIREPDI_1) alors CORR.APIREPDI1731 = GLOBAL.APIREPDI_1; finsi +si present(GLOBAL.APIREPCZ_1) alors CORR.APIREPCZ1731 = GLOBAL.APIREPCZ_1; finsi +si present(GLOBAL.APIREPEZ_1) alors CORR.APIREPEZ1731 = GLOBAL.APIREPEZ_1; finsi +si present(GLOBAL.APIREPRZ_1) alors CORR.APIREPRZ1731 = GLOBAL.APIREPRZ_1; finsi +si present(GLOBAL.APIREPTZ_1) alors CORR.APIREPTZ1731 = GLOBAL.APIREPTZ_1; finsi +si present(GLOBAL.APIREPRA_1) alors CORR.APIREPRA1731 = GLOBAL.APIREPRA_1; finsi +si present(GLOBAL.APIREPRB_1) alors CORR.APIREPRB1731 = GLOBAL.APIREPRB_1; finsi +si present(GLOBAL.APIREPRC_1) alors CORR.APIREPRC1731 = GLOBAL.APIREPRC_1; finsi +si present(GLOBAL.APIREPRD_1) alors CORR.APIREPRD1731 = GLOBAL.APIREPRD_1; finsi +si present(GLOBAL.APIREPRE_1) alors CORR.APIREPRE1731 = GLOBAL.APIREPRE_1; finsi +si present(GLOBAL.APIREPRF_1) alors CORR.APIREPRF1731 = GLOBAL.APIREPRF_1; finsi +si present(GLOBAL.APIREPRG_1) alors CORR.APIREPRG1731 = GLOBAL.APIREPRG_1; finsi +si present(GLOBAL.APIREPRH_1) alors CORR.APIREPRH1731 = GLOBAL.APIREPRH_1; finsi +si present(GLOBAL.APIREPJM_1) alors CORR.APIREPJM1731 = GLOBAL.APIREPJM_1; finsi +si present(GLOBAL.APIREPKM_1) alors CORR.APIREPKM1731 = GLOBAL.APIREPKM_1; finsi +si present(GLOBAL.APIREPLM_1) alors CORR.APIREPLM1731 = GLOBAL.APIREPLM_1; finsi +si present(GLOBAL.APIREPMM_1) alors CORR.APIREPMM1731 = GLOBAL.APIREPMM_1; finsi +si present(GLOBAL.ANORMJA_1) alors CORR.ANORMJA1731 = GLOBAL.ANORMJA_1; finsi +si present(GLOBAL.ANORMJB_1) alors CORR.ANORMJB1731 = GLOBAL.ANORMJB_1; finsi +si present(GLOBAL.ANORMJC_1) alors CORR.ANORMJC1731 = GLOBAL.ANORMJC_1; finsi +si present(GLOBAL.ANORMJD_1) alors CORR.ANORMJD1731 = GLOBAL.ANORMJD_1; finsi +si present(GLOBAL.ACELREPYP_1) alors CORR.ACELREPYP1731 = GLOBAL.ACELREPYP_1; finsi +si present(GLOBAL.ACELREPYO_1) alors CORR.ACELREPYO1731 = GLOBAL.ACELREPYO_1; finsi +si present(GLOBAL.ACELREPYN_1) alors CORR.ACELREPYN1731 = GLOBAL.ACELREPYN_1; finsi +si present(GLOBAL.ACELREPYM_1) alors CORR.ACELREPYM1731 = GLOBAL.ACELREPYM_1; finsi +si present(GLOBAL.ACELREPYW_1) alors CORR.ACELREPYW1731 = GLOBAL.ACELREPYW_1; finsi +si present(GLOBAL.ACELREPYV_1) alors CORR.ACELREPYV1731 = GLOBAL.ACELREPYV_1; finsi +si present(GLOBAL.ACELREPYU_1) alors CORR.ACELREPYU1731 = GLOBAL.ACELREPYU_1; finsi +si present(GLOBAL.ACELREPYT_1) alors CORR.ACELREPYT1731 = GLOBAL.ACELREPYT_1; finsi +si present(GLOBAL.ACELREPWW_1) alors CORR.ACELREPWW1731 = GLOBAL.ACELREPWW_1; finsi +si present(GLOBAL.ACELREPWV_1) alors CORR.ACELREPWV1731 = GLOBAL.ACELREPWV_1; finsi +si present(GLOBAL.ACELREPWU_1) alors CORR.ACELREPWU1731 = GLOBAL.ACELREPWU_1; finsi +si present(GLOBAL.ACELREPWT_1) alors CORR.ACELREPWT1731 = GLOBAL.ACELREPWT_1; finsi +si present(GLOBAL.ACELRU_1) alors CORR.ACELRU1731 = GLOBAL.ACELRU_1; finsi +si present(GLOBAL.ACELRT_1) alors CORR.ACELRT1731 = GLOBAL.ACELRT_1; finsi +si present(GLOBAL.ATOURREP_1) alors CORR.ATOURREP1731 = GLOBAL.ATOURREP_1; finsi +si present(GLOBAL.ATOUREPA_1) alors CORR.ATOUREPA1731 = GLOBAL.ATOUREPA_1; finsi +si present(GLOBAL.BAH) alors CORR.BAH1731 = GLOBAL.BAH; finsi +si present(GLOBAL.BAALIM) alors CORR.BAALIM1731 = GLOBAL.BAALIM; finsi +si present(GLOBAL.BSN1) alors CORR.BSN11731 = GLOBAL.BSN1; finsi +si present(GLOBAL.BSN2) alors CORR.BSN21731 = GLOBAL.BSN2; finsi +si present(GLOBAL.APENTCY_1) alors CORR.APENTCY1731 = GLOBAL.APENTCY_1; finsi +si present(GLOBAL.APENTDY_1) alors CORR.APENTDY1731 = GLOBAL.APENTDY_1; finsi +si present(GLOBAL.APENTEY_1) alors CORR.APENTEY1731 = GLOBAL.APENTEY_1; finsi +si present(GLOBAL.APENTFY_1) alors CORR.APENTFY1731 = GLOBAL.APENTFY_1; finsi +si present(GLOBAL.APENTGY_1) alors CORR.APENTGY1731 = GLOBAL.APENTGY_1; finsi +si present(GLOBAL.APENTEK_1) alors CORR.APENTEK1731 = GLOBAL.APENTEK_1; finsi +si present(GLOBAL.ASOFON_1) alors CORR.ASOFON1731 = GLOBAL.ASOFON_1; finsi +si present(GLOBAL.AILMPF_1) alors CORR.AILMPF1731 = GLOBAL.AILMPF_1; finsi +si present(GLOBAL.AILMPP_1) alors CORR.AILMPP1731 = GLOBAL.AILMPP_1; finsi +si present(GLOBAL.AILMPU_1) alors CORR.AILMPU1731 = GLOBAL.AILMPU_1; finsi +si present(GLOBAL.AILMHO_1) alors CORR.AILMHO1731 = GLOBAL.AILMHO_1; finsi +si present(GLOBAL.AILMHT_1) alors CORR.AILMHT1731 = GLOBAL.AILMHT_1; finsi +si present(GLOBAL.AILMPG_1) alors CORR.AILMPG1731 = GLOBAL.AILMPG_1; finsi +si present(GLOBAL.AILMPQ_1) alors CORR.AILMPQ1731 = GLOBAL.AILMPQ_1; finsi +si present(GLOBAL.AILMPV_1) alors CORR.AILMPV1731 = GLOBAL.AILMPV_1; finsi +si present(GLOBAL.AILMHP_1) alors CORR.AILMHP1731 = GLOBAL.AILMHP_1; finsi +si present(GLOBAL.AILMHU_1) alors CORR.AILMHU1731 = GLOBAL.AILMHU_1; finsi +si present(GLOBAL.AILMPH_1) alors CORR.AILMPH1731 = GLOBAL.AILMPH_1; finsi +si present(GLOBAL.AILMPR_1) alors CORR.AILMPR1731 = GLOBAL.AILMPR_1; finsi +si present(GLOBAL.AILMPW_1) alors CORR.AILMPW1731 = GLOBAL.AILMPW_1; finsi +si present(GLOBAL.AILMHQ_1) alors CORR.AILMHQ1731 = GLOBAL.AILMHQ_1; finsi +si present(GLOBAL.AILMHV_1) alors CORR.AILMHV1731 = GLOBAL.AILMHV_1; finsi +si present(GLOBAL.AILMPI_1) alors CORR.AILMPI1731 = GLOBAL.AILMPI_1; finsi +si present(GLOBAL.AILMPS_1) alors CORR.AILMPS1731 = GLOBAL.AILMPS_1; finsi +si present(GLOBAL.AILMPX_1) alors CORR.AILMPX1731 = GLOBAL.AILMPX_1; finsi +si present(GLOBAL.AILMHR_1) alors CORR.AILMHR1731 = GLOBAL.AILMHR_1; finsi +si present(GLOBAL.AILMHW_1) alors CORR.AILMHW1731 = GLOBAL.AILMHW_1; finsi +si present(GLOBAL.AILMPJ_1) alors CORR.AILMPJ1731 = GLOBAL.AILMPJ_1; finsi +si present(GLOBAL.AILMPT_1) alors CORR.AILMPT1731 = GLOBAL.AILMPT_1; finsi +si present(GLOBAL.AILMPY_1) alors CORR.AILMPY1731 = GLOBAL.AILMPY_1; finsi +si present(GLOBAL.AILMHS_1) alors CORR.AILMHS1731 = GLOBAL.AILMHS_1; finsi +si present(GLOBAL.AILMHX_1) alors CORR.AILMHX1731 = GLOBAL.AILMHX_1; finsi +si present(GLOBAL.AILMJY_1) alors CORR.AILMJY1731 = GLOBAL.AILMJY_1; finsi +si present(GLOBAL.AILMJX_1) alors CORR.AILMJX1731 = GLOBAL.AILMJX_1; finsi +si present(GLOBAL.AILMJW_1) alors CORR.AILMJW1731 = GLOBAL.AILMJW_1; finsi +si present(GLOBAL.AILMJV_1) alors CORR.AILMJV1731 = GLOBAL.AILMJV_1; finsi +si present(GLOBAL.AILMOJ_1) alors CORR.AILMOJ1731 = GLOBAL.AILMOJ_1; finsi +si present(GLOBAL.AILMOI_1) alors CORR.AILMOI1731 = GLOBAL.AILMOI_1; finsi +si present(GLOBAL.AILMOH_1) alors CORR.AILMOH1731 = GLOBAL.AILMOH_1; finsi +si present(GLOBAL.AILMOG_1) alors CORR.AILMOG1731 = GLOBAL.AILMOG_1; finsi +si present(GLOBAL.AILMOF_1) alors CORR.AILMOF1731 = GLOBAL.AILMOF_1; finsi +si present(GLOBAL.AILMOO_1) alors CORR.AILMOO1731 = GLOBAL.AILMOO_1; finsi +si present(GLOBAL.AILMON_1) alors CORR.AILMON1731 = GLOBAL.AILMON_1; finsi +si present(GLOBAL.AILMOM_1) alors CORR.AILMOM1731 = GLOBAL.AILMOM_1; finsi +si present(GLOBAL.AILMOL_1) alors CORR.AILMOL1731 = GLOBAL.AILMOL_1; finsi +si present(GLOBAL.AILMOK_1) alors CORR.AILMOK1731 = GLOBAL.AILMOK_1; finsi +si present(GLOBAL.AILMOT_1) alors CORR.AILMOT1731 = GLOBAL.AILMOT_1; finsi +si present(GLOBAL.AILMOS_1) alors CORR.AILMOS1731 = GLOBAL.AILMOS_1; finsi +si present(GLOBAL.AILMOR_1) alors CORR.AILMOR1731 = GLOBAL.AILMOR_1; finsi +si present(GLOBAL.AILMOQ_1) alors CORR.AILMOQ1731 = GLOBAL.AILMOQ_1; finsi +si present(GLOBAL.AILMOP_1) alors CORR.AILMOP1731 = GLOBAL.AILMOP_1; finsi +si present(GLOBAL.AILMSA_1) alors CORR.AILMSA1731 = GLOBAL.AILMSA_1; finsi +si present(GLOBAL.AILMSB_1) alors CORR.AILMSB1731 = GLOBAL.AILMSB_1; finsi +si present(GLOBAL.AILMSC_1) alors CORR.AILMSC1731 = GLOBAL.AILMSC_1; finsi +si present(GLOBAL.AILMSN_1) alors CORR.AILMSN1731 = GLOBAL.AILMSN_1; finsi +si present(GLOBAL.AILMSO_1) alors CORR.AILMSO1731 = GLOBAL.AILMSO_1; finsi +si present(GLOBAL.AILMSP_1) alors CORR.AILMSP1731 = GLOBAL.AILMSP_1; finsi +si present(GLOBAL.ACODMZ_1) alors CORR.ACODMZ1731 = GLOBAL.ACODMZ_1; finsi +si present(GLOBAL.ACODPZ_1) alors CORR.ACODPZ1731 = GLOBAL.ACODPZ_1; finsi +si present(GLOBAL.ACODOY_1) alors CORR.ACODOY1731 = GLOBAL.ACODOY_1; finsi +si present(GLOBAL.ACODOX_1) alors CORR.ACODOX1731 = GLOBAL.ACODOX_1; finsi +si present(GLOBAL.ACODOW_1) alors CORR.ACODOW1731 = GLOBAL.ACODOW_1; finsi +si present(GLOBAL.ACODOU_1) alors CORR.ACODOU1731 = GLOBAL.ACODOU_1; finsi +si present(GLOBAL.ACODJTJU_1) alors CORR.ACODJTJU1731 = GLOBAL.ACODJTJU_1; finsi +si present(GLOBAL.ALOCIDEFG_1) alors CORR.ALOCIDEFG1731 = GLOBAL.ALOCIDEFG_1; finsi +si present(GLOBAL.ARESINEUV_1) alors CORR.ARESINEUV1731 = GLOBAL.ARESINEUV_1; finsi +si present(GLOBAL.ARESIVIEU_1) alors CORR.ARESIVIEU1731 = GLOBAL.ARESIVIEU_1; finsi +si present(GLOBAL.BSOCREP) alors CORR.BSOCREP1731 = GLOBAL.BSOCREP; finsi +si present(GLOBAL.ARESTIMO_1) alors CORR.ARESTIMO1731 = GLOBAL.ARESTIMO_1; finsi +si present(GLOBAL.ARESTIMO1_1) alors CORR.ARESTIMO11731 = GLOBAL.ARESTIMO1_1; finsi +si present(GLOBAL.ADONS_1) alors CORR.ADONS1731 = GLOBAL.ADONS_1; finsi +si present(GLOBAL.BPRESCOMP) alors CORR.BPRESCOMP1731 = GLOBAL.BPRESCOMP; finsi +si present(GLOBAL.ACOTFOR_R) alors CORR.ACOTFOR1731 = GLOBAL.ACOTFOR_R; finsi +si present(GLOBAL.AFOREST_1) alors CORR.AFOREST1731 = GLOBAL.AFOREST_1; finsi +si present(GLOBAL.BDIFAGRI) alors CORR.BDIFAGRI1731 = GLOBAL.BDIFAGRI; finsi +si present(GLOBAL.ALOGDOM_1) alors CORR.ALOGDOM1731 = GLOBAL.ALOGDOM_1; finsi +si present(GLOBAL.RLOGDOM) alors CORR.RLOGDOM1731 = GLOBAL.RLOGDOM; finsi +si present(GLOBAL.ALOGSOC_1) alors CORR.ALOGSOC1731 = GLOBAL.ALOGSOC_1; finsi +si present(GLOBAL.ADOMSOC1_1) alors CORR.ADOMSOC11731 = GLOBAL.ADOMSOC1_1; finsi +si present(GLOBAL.ALOCENT_1) alors CORR.ALOCENT1731 = GLOBAL.ALOCENT_1; finsi +si present(GLOBAL.ACOLENT_1) alors CORR.ACOLENT1731 = GLOBAL.ACOLENT_1; finsi +si present(GLOBAL.RPRESSE_1) alors CORR.RPRESSE1731 = GLOBAL.RPRESSE_1; finsi +si present(GLOBAL.RFORET_1) alors CORR.RFORET1731 = GLOBAL.RFORET_1; finsi +si present(GLOBAL.RFIPDOM_1) alors CORR.RFIPDOM1731 = GLOBAL.RFIPDOM_1; finsi +si present(GLOBAL.RFIPC_1) alors CORR.RFIPC1731 = GLOBAL.RFIPC_1; finsi +si present(GLOBAL.RSURV_1) alors CORR.RSURV1731 = GLOBAL.RSURV_1; finsi +si present(GLOBAL.RCINE_1) alors CORR.RCINE1731 = GLOBAL.RCINE_1; finsi +si present(GLOBAL.RSOUFIP_1) alors CORR.RSOUFIP1731 = GLOBAL.RSOUFIP_1; finsi +si present(GLOBAL.RRIRENOV_1) alors CORR.RRIRENOV1731 = GLOBAL.RRIRENOV_1; finsi +si present(GLOBAL.RCOMP_1) alors CORR.RCOMP1731 = GLOBAL.RCOMP_1; finsi +si present(GLOBAL.RDUFREP_1) alors CORR.RDUFREP1731 = GLOBAL.RDUFREP_1; finsi +si present(GLOBAL.RPIREPBI_1) alors CORR.RPIREPBI1731 = GLOBAL.RPIREPBI_1; finsi +si present(GLOBAL.RPIREPDI_1) alors CORR.RPIREPDI1731 = GLOBAL.RPIREPDI_1; finsi +si present(GLOBAL.RPIREPCZ_1) alors CORR.RPIREPCZ1731 = GLOBAL.RPIREPCZ_1; finsi +si present(GLOBAL.RPIREPEZ_1) alors CORR.RPIREPEZ1731 = GLOBAL.RPIREPEZ_1; finsi +si present(GLOBAL.RPIREPRZ_1) alors CORR.RPIREPRZ1731 = GLOBAL.RPIREPRZ_1; finsi +si present(GLOBAL.RPIREPTZ_1) alors CORR.RPIREPTZ1731 = GLOBAL.RPIREPTZ_1; finsi +si present(GLOBAL.RPIREPRA_1) alors CORR.RPIREPRA1731 = GLOBAL.RPIREPRA_1; finsi +si present(GLOBAL.RPIREPRB_1) alors CORR.RPIREPRB1731 = GLOBAL.RPIREPRB_1; finsi +si present(GLOBAL.RPIREPRC_1) alors CORR.RPIREPRC1731 = GLOBAL.RPIREPRC_1; finsi +si present(GLOBAL.RPIREPRD_1) alors CORR.RPIREPRD1731 = GLOBAL.RPIREPRD_1; finsi +si present(GLOBAL.RPIREPRE_1) alors CORR.RPIREPRE1731 = GLOBAL.RPIREPRE_1; finsi +si present(GLOBAL.RPIREPRF_1) alors CORR.RPIREPRF1731 = GLOBAL.RPIREPRF_1; finsi +si present(GLOBAL.RPIREPRG_1) alors CORR.RPIREPRG1731 = GLOBAL.RPIREPRG_1; finsi +si present(GLOBAL.RPIREPRH_1) alors CORR.RPIREPRH1731 = GLOBAL.RPIREPRH_1; finsi +si present(GLOBAL.RPIREPJM_1) alors CORR.RPIREPJM1731 = GLOBAL.RPIREPJM_1; finsi +si present(GLOBAL.RNORMJA_1) alors CORR.RNORMJA1731 = GLOBAL.RNORMJA_1; finsi +si present(GLOBAL.RPIREPKM_1) alors CORR.RPIREPKM1731 = GLOBAL.RPIREPKM_1; finsi +si present(GLOBAL.RNORMJB_1) alors CORR.RNORMJB1731 = GLOBAL.RNORMJB_1; finsi +si present(GLOBAL.RPIREPLM_1) alors CORR.RPIREPLM1731 = GLOBAL.RPIREPLM_1; finsi +si present(GLOBAL.RNORMJC_1) alors CORR.RNORMJC1731 = GLOBAL.RNORMJC_1; finsi +si present(GLOBAL.RPIREPMM_1) alors CORR.RPIREPMM1731 = GLOBAL.RPIREPMM_1; finsi +si present(GLOBAL.RNORMJD_1) alors CORR.RNORMJD1731 = GLOBAL.RNORMJD_1; finsi +si present(GLOBAL.RPIQA_1) alors CORR.RPIQA1731 = GLOBAL.RPIQA_1; finsi +si present(GLOBAL.RPIQB_1) alors CORR.RPIQB1731 = GLOBAL.RPIQB_1; finsi +si present(GLOBAL.RPIQC_1) alors CORR.RPIQC1731 = GLOBAL.RPIQC_1; finsi +si present(GLOBAL.RPIQD_1) alors CORR.RPIQD1731 = GLOBAL.RPIQD_1; finsi +si present(GLOBAL.RPIQQ_1) alors CORR.RPIQQ1731 = GLOBAL.RPIQQ_1; finsi +si present(GLOBAL.RPIQY_1) alors CORR.RPIQY1731 = GLOBAL.RPIQY_1; finsi +si present(GLOBAL.RPIQW_1) alors CORR.RPIQW1731 = GLOBAL.RPIQW_1; finsi +si present(GLOBAL.RPIQX_1) alors CORR.RPIQX1731 = GLOBAL.RPIQX_1; finsi +si present(GLOBAL.RNONG_1) alors CORR.RNONG1731 = GLOBAL.RNONG_1; finsi +si present(GLOBAL.RNONH_1) alors CORR.RNONH1731 = GLOBAL.RNONH_1; finsi +si present(GLOBAL.RNORMGH_1) alors CORR.RNORMGH1731 = GLOBAL.RNORMGH_1; finsi +si present(GLOBAL.RNONE_1) alors CORR.RNONE1731 = GLOBAL.RNONE_1; finsi +si present(GLOBAL.RNONF_1) alors CORR.RNONF1731 = GLOBAL.RNONF_1; finsi +si present(GLOBAL.RNORMEF_1) alors CORR.RNORMEF1731 = GLOBAL.RNORMEF_1; finsi +si present(GLOBAL.RNONC_1) alors CORR.RNONC1731 = GLOBAL.RNONC_1; finsi +si present(GLOBAL.RNOND_1) alors CORR.RNOND1731 = GLOBAL.RNOND_1; finsi +si present(GLOBAL.RNORMCD_1) alors CORR.RNORMCD1731 = GLOBAL.RNORMCD_1; finsi +si present(GLOBAL.RNONA_1) alors CORR.RNONA1731 = GLOBAL.RNONA_1; finsi +si present(GLOBAL.RNONB_1) alors CORR.RNONB1731 = GLOBAL.RNONB_1; finsi +si present(GLOBAL.RNORMAB_1) alors CORR.RNORMAB1731 = GLOBAL.RNORMAB_1; finsi +si present(GLOBAL.RCELRREDLQ_1) alors CORR.RCELRREDLQ1731 = GLOBAL.RCELRREDLQ_1; finsi +si present(GLOBAL.RCELLA_1) alors CORR.RCELLA1731 = GLOBAL.RCELLA_1; finsi +si present(GLOBAL.RCELMS_1) alors CORR.RCELMS1731 = GLOBAL.RCELMS_1; finsi +si present(GLOBAL.RCELMO_1) alors CORR.RCELMO1731 = GLOBAL.RCELMO_1; finsi +si present(GLOBAL.RCELRREDLR_1) alors CORR.RCELRREDLR1731 = GLOBAL.RCELRREDLR_1; finsi +si present(GLOBAL.RCELLB_1) alors CORR.RCELLB1731 = GLOBAL.RCELLB_1; finsi +si present(GLOBAL.RCELMT_1) alors CORR.RCELMT1731 = GLOBAL.RCELMT_1; finsi +si present(GLOBAL.RCELMP_1) alors CORR.RCELMP1731 = GLOBAL.RCELMP_1; finsi +si present(GLOBAL.RCELRREDLU_1) alors CORR.RCELRREDLU1731 = GLOBAL.RCELRREDLU_1; finsi +si present(GLOBAL.RCELLC_1) alors CORR.RCELLC1731 = GLOBAL.RCELLC_1; finsi +si present(GLOBAL.RCELMU_1) alors CORR.RCELMU1731 = GLOBAL.RCELMU_1; finsi +si present(GLOBAL.RCELMQ_1) alors CORR.RCELMQ1731 = GLOBAL.RCELMQ_1; finsi +si present(GLOBAL.RCELRREDLV_1) alors CORR.RCELRREDLV1731 = GLOBAL.RCELRREDLV_1; finsi +si present(GLOBAL.RCELLY_1) alors CORR.RCELLY1731 = GLOBAL.RCELLY_1; finsi +si present(GLOBAL.RCELMV_1) alors CORR.RCELMV1731 = GLOBAL.RCELMV_1; finsi +si present(GLOBAL.RCELMR_1) alors CORR.RCELMR1731 = GLOBAL.RCELMR_1; finsi +si present(GLOBAL.RCELZP_1) alors CORR.RCELZP1731 = GLOBAL.RCELZP_1; finsi +si present(GLOBAL.RCELZO_1) alors CORR.RCELZO1731 = GLOBAL.RCELZO_1; finsi +si present(GLOBAL.RCELXP_1) alors CORR.RCELXP1731 = GLOBAL.RCELXP_1; finsi +si present(GLOBAL.RCELXO_1) alors CORR.RCELXO1731 = GLOBAL.RCELXO_1; finsi +si present(GLOBAL.RCELXQ_1) alors CORR.RCELXQ1731 = GLOBAL.RCELXQ_1; finsi +si present(GLOBAL.RCELYI_1) alors CORR.RCELYI1731 = GLOBAL.RCELYI_1; finsi +si present(GLOBAL.RCELYJ_1) alors CORR.RCELYJ1731 = GLOBAL.RCELYJ_1; finsi +si present(GLOBAL.RCELYK_1) alors CORR.RCELYK1731 = GLOBAL.RCELYK_1; finsi +si present(GLOBAL.RCELYL_1) alors CORR.RCELYL1731 = GLOBAL.RCELYL_1; finsi +si present(GLOBAL.RCELZI_1) alors CORR.RCELZI1731 = GLOBAL.RCELZI_1; finsi +si present(GLOBAL.RCELZJ_1) alors CORR.RCELZJ1731 = GLOBAL.RCELZJ_1; finsi +si present(GLOBAL.RCELZK_1) alors CORR.RCELZK1731 = GLOBAL.RCELZK_1; finsi +si present(GLOBAL.RCELZL_1) alors CORR.RCELZL1731 = GLOBAL.RCELZL_1; finsi +si present(GLOBAL.RCELKC_1) alors CORR.RCELKC1731 = GLOBAL.RCELKC_1; finsi +si present(GLOBAL.RCELKD_1) alors CORR.RCELKD1731 = GLOBAL.RCELKD_1; finsi +si present(GLOBAL.RCELHZ_1) alors CORR.RCELHZ1731 = GLOBAL.RCELHZ_1; finsi +si present(GLOBAL.RCELKU_1) alors CORR.RCELKU1731 = GLOBAL.RCELKU_1; finsi +si present(GLOBAL.RCELKT_1) alors CORR.RCELKT1731 = GLOBAL.RCELKT_1; finsi +si present(GLOBAL.RCELKV_1) alors CORR.RCELKV1731 = GLOBAL.RCELKV_1; finsi +si present(GLOBAL.RCELREPYP_1) alors CORR.RCELREPYP1731 = GLOBAL.RCELREPYP_1; finsi +si present(GLOBAL.RCELREPYO_1) alors CORR.RCELREPYO1731 = GLOBAL.RCELREPYO_1; finsi +si present(GLOBAL.RCELREPYN_1) alors CORR.RCELREPYN1731 = GLOBAL.RCELREPYN_1; finsi +si present(GLOBAL.RCELREPYM_1) alors CORR.RCELREPYM1731 = GLOBAL.RCELREPYM_1; finsi +si present(GLOBAL.RCELREPYW_1) alors CORR.RCELREPYW1731 = GLOBAL.RCELREPYW_1; finsi +si present(GLOBAL.RCELREPYV_1) alors CORR.RCELREPYV1731 = GLOBAL.RCELREPYV_1; finsi +si present(GLOBAL.RCELREPYU_1) alors CORR.RCELREPYU1731 = GLOBAL.RCELREPYU_1; finsi +si present(GLOBAL.RCELREPYT_1) alors CORR.RCELREPYT1731 = GLOBAL.RCELREPYT_1; finsi +si present(GLOBAL.RCELREPWW_1) alors CORR.RCELREPWW1731 = GLOBAL.RCELREPWW_1; finsi +si present(GLOBAL.RCELREPWV_1) alors CORR.RCELREPWV1731 = GLOBAL.RCELREPWV_1; finsi +si present(GLOBAL.RCELREPWU_1) alors CORR.RCELREPWU1731 = GLOBAL.RCELREPWU_1; finsi +si present(GLOBAL.RCELREPWT_1) alors CORR.RCELREPWT1731 = GLOBAL.RCELREPWT_1; finsi +si present(GLOBAL.RCELRU_1) alors CORR.RCELRU1731 = GLOBAL.RCELRU_1; finsi +si present(GLOBAL.RCELRT_1) alors CORR.RCELRT1731 = GLOBAL.RCELRT_1; finsi +si present(GLOBAL.RTOURREP_1) alors CORR.RTOURREP1731 = GLOBAL.RTOURREP_1; finsi +si present(GLOBAL.RTOUREPA_1) alors CORR.RTOUREPA1731 = GLOBAL.RTOUREPA_1; finsi +si present(GLOBAL.RHEBE_1) alors CORR.RHEBE1731 = GLOBAL.RHEBE_1; finsi +si present(GLOBAL.RREPA_1) alors CORR.RREPA1731 = GLOBAL.RREPA_1; finsi +si present(GLOBAL.RLOCANAH_1) alors CORR.RLOCANAH1731 = GLOBAL.RLOCANAH_1; finsi +si present(GLOBAL.RSNCR_1) alors CORR.RSNCR1731 = GLOBAL.RSNCR_1; finsi +si present(GLOBAL.RSNCV_1) alors CORR.RSNCV1731 = GLOBAL.RSNCV_1; finsi +si present(GLOBAL.RSNCS_1) alors CORR.RSNCS1731 = GLOBAL.RSNCS_1; finsi +si present(GLOBAL.RSNCX_1) alors CORR.RSNCX1731 = GLOBAL.RSNCX_1; finsi +si present(GLOBAL.RSNCA_1) alors CORR.RSNCA1731 = GLOBAL.RSNCA_1; finsi +si present(GLOBAL.RSNDC_1) alors CORR.RSNDC1731 = GLOBAL.RSNDC_1; finsi +si present(GLOBAL.RSNCT_1) alors CORR.RSNCT1731 = GLOBAL.RSNCT_1; finsi +si present(GLOBAL.RSNCH_1) alors CORR.RSNCH1731 = GLOBAL.RSNCH_1; finsi +si present(GLOBAL.RSNCI_1) alors CORR.RSNCI1731 = GLOBAL.RSNCI_1; finsi +si present(GLOBAL.RSNBS_1) alors CORR.RSNBS1731 = GLOBAL.RSNBS_1; finsi +si present(GLOBAL.RSNBT_1) alors CORR.RSNBT1731 = GLOBAL.RSNBT_1; finsi +si present(GLOBAL.RSNGW_1) alors CORR.RSNGW1731 = GLOBAL.RSNGW_1; finsi +si present(GLOBAL.RNOUV_1) alors CORR.RNOUV1731 = GLOBAL.RNOUV_1; finsi +si present(GLOBAL.RPENTCY_1) alors CORR.RPENTCY1731 = GLOBAL.RPENTCY_1; finsi +si present(GLOBAL.RPENTDY_1) alors CORR.RPENTDY1731 = GLOBAL.RPENTDY_1; finsi +si present(GLOBAL.RPENTEY_1) alors CORR.RPENTEY1731 = GLOBAL.RPENTEY_1; finsi +si present(GLOBAL.RPENTFY_1) alors CORR.RPENTFY1731 = GLOBAL.RPENTFY_1; finsi +si present(GLOBAL.RPENTGY_1) alors CORR.RPENTGY1731 = GLOBAL.RPENTGY_1; finsi +si present(GLOBAL.RPENTEK_1) alors CORR.RPENTEK1731 = GLOBAL.RPENTEK_1; finsi +si present(GLOBAL.RRSOFON_1) alors CORR.RRSOFON1731 = GLOBAL.RRSOFON_1; finsi +si present(GLOBAL.RILMPF_1) alors CORR.RILMPF1731 = GLOBAL.RILMPF_1; finsi +si present(GLOBAL.RILMPP_1) alors CORR.RILMPP1731 = GLOBAL.RILMPP_1; finsi +si present(GLOBAL.RILMPU_1) alors CORR.RILMPU1731 = GLOBAL.RILMPU_1; finsi +si present(GLOBAL.RILMHO_1) alors CORR.RILMHO1731 = GLOBAL.RILMHO_1; finsi +si present(GLOBAL.RILMHT_1) alors CORR.RILMHT1731 = GLOBAL.RILMHT_1; finsi +si present(GLOBAL.RILMPG_1) alors CORR.RILMPG1731 = GLOBAL.RILMPG_1; finsi +si present(GLOBAL.RILMPQ_1) alors CORR.RILMPQ1731 = GLOBAL.RILMPQ_1; finsi +si present(GLOBAL.RILMPV_1) alors CORR.RILMPV1731 = GLOBAL.RILMPV_1; finsi +si present(GLOBAL.RILMHP_1) alors CORR.RILMHP1731 = GLOBAL.RILMHP_1; finsi +si present(GLOBAL.RILMHU_1) alors CORR.RILMHU1731 = GLOBAL.RILMHU_1; finsi +si present(GLOBAL.RILMPH_1) alors CORR.RILMPH1731 = GLOBAL.RILMPH_1; finsi +si present(GLOBAL.RILMPR_1) alors CORR.RILMPR1731 = GLOBAL.RILMPR_1; finsi +si present(GLOBAL.RILMPW_1) alors CORR.RILMPW1731 = GLOBAL.RILMPW_1; finsi +si present(GLOBAL.RILMHQ_1) alors CORR.RILMHQ1731 = GLOBAL.RILMHQ_1; finsi +si present(GLOBAL.RILMHV_1) alors CORR.RILMHV1731 = GLOBAL.RILMHV_1; finsi +si present(GLOBAL.RILMPI_1) alors CORR.RILMPI1731 = GLOBAL.RILMPI_1; finsi +si present(GLOBAL.RILMPS_1) alors CORR.RILMPS1731 = GLOBAL.RILMPS_1; finsi +si present(GLOBAL.RILMPX_1) alors CORR.RILMPX1731 = GLOBAL.RILMPX_1; finsi +si present(GLOBAL.RILMHR_1) alors CORR.RILMHR1731 = GLOBAL.RILMHR_1; finsi +si present(GLOBAL.RILMHW_1) alors CORR.RILMHW1731 = GLOBAL.RILMHW_1; finsi +si present(GLOBAL.RILMPJ_1) alors CORR.RILMPJ1731 = GLOBAL.RILMPJ_1; finsi +si present(GLOBAL.RILMPT_1) alors CORR.RILMPT1731 = GLOBAL.RILMPT_1; finsi +si present(GLOBAL.RILMPY_1) alors CORR.RILMPY1731 = GLOBAL.RILMPY_1; finsi +si present(GLOBAL.RILMHS_1) alors CORR.RILMHS1731 = GLOBAL.RILMHS_1; finsi +si present(GLOBAL.RILMHX_1) alors CORR.RILMHX1731 = GLOBAL.RILMHX_1; finsi +si present(GLOBAL.RILMJY_1) alors CORR.RILMJY1731 = GLOBAL.RILMJY_1; finsi +si present(GLOBAL.RILMJX_1) alors CORR.RILMJX1731 = GLOBAL.RILMJX_1; finsi +si present(GLOBAL.RILMJW_1) alors CORR.RILMJW1731 = GLOBAL.RILMJW_1; finsi +si present(GLOBAL.RILMJV_1) alors CORR.RILMJV1731 = GLOBAL.RILMJV_1; finsi +si present(GLOBAL.RILMOJ_1) alors CORR.RILMOJ1731 = GLOBAL.RILMOJ_1; finsi +si present(GLOBAL.RILMOI_1) alors CORR.RILMOI1731 = GLOBAL.RILMOI_1; finsi +si present(GLOBAL.RILMOH_1) alors CORR.RILMOH1731 = GLOBAL.RILMOH_1; finsi +si present(GLOBAL.RILMOG_1) alors CORR.RILMOG1731 = GLOBAL.RILMOG_1; finsi +si present(GLOBAL.RILMOF_1) alors CORR.RILMOF1731 = GLOBAL.RILMOF_1; finsi +si present(GLOBAL.RILMOO_1) alors CORR.RILMOO1731 = GLOBAL.RILMOO_1; finsi +si present(GLOBAL.RILMON_1) alors CORR.RILMON1731 = GLOBAL.RILMON_1; finsi +si present(GLOBAL.RILMOM_1) alors CORR.RILMOM1731 = GLOBAL.RILMOM_1; finsi +si present(GLOBAL.RILMOL_1) alors CORR.RILMOL1731 = GLOBAL.RILMOL_1; finsi +si present(GLOBAL.RILMOK_1) alors CORR.RILMOK1731 = GLOBAL.RILMOK_1; finsi +si present(GLOBAL.RILMOT_1) alors CORR.RILMOT1731 = GLOBAL.RILMOT_1; finsi +si present(GLOBAL.RILMOS_1) alors CORR.RILMOS1731 = GLOBAL.RILMOS_1; finsi +si present(GLOBAL.RILMOR_1) alors CORR.RILMOR1731 = GLOBAL.RILMOR_1; finsi +si present(GLOBAL.RILMOQ_1) alors CORR.RILMOQ1731 = GLOBAL.RILMOQ_1; finsi +si present(GLOBAL.RILMOP_1) alors CORR.RILMOP1731 = GLOBAL.RILMOP_1; finsi +si present(GLOBAL.RILMSC_1) alors CORR.RILMSC1731 = GLOBAL.RILMSC_1; finsi +si present(GLOBAL.RILMSB_1) alors CORR.RILMSB1731 = GLOBAL.RILMSB_1; finsi +si present(GLOBAL.RILMSA_1) alors CORR.RILMSA1731 = GLOBAL.RILMSA_1; finsi +si present(GLOBAL.RILMSO_1) alors CORR.RILMSO1731 = GLOBAL.RILMSO_1; finsi +si present(GLOBAL.RILMSN_1) alors CORR.RILMSN1731 = GLOBAL.RILMSN_1; finsi +si present(GLOBAL.RILMSP_1) alors CORR.RILMSP1731 = GLOBAL.RILMSP_1; finsi +si present(GLOBAL.RCODIM_1) alors CORR.RCODIM1731 = GLOBAL.RCODIM_1; finsi +si present(GLOBAL.RCODIN_1) alors CORR.RCODIN1731 = GLOBAL.RCODIN_1; finsi +si present(GLOBAL.RCODIJ_1) alors CORR.RCODIJ1731 = GLOBAL.RCODIJ_1; finsi +si present(GLOBAL.RCODID_1) alors CORR.RCODID1731 = GLOBAL.RCODID_1; finsi +si present(GLOBAL.RCODJT_1) alors CORR.RCODJT1731 = GLOBAL.RCODJT_1; finsi +si present(GLOBAL.RCODOU_1) alors CORR.RCODOU1731 = GLOBAL.RCODOU_1; finsi +si present(GLOBAL.RCODOW_1) alors CORR.RCODOW1731 = GLOBAL.RCODOW_1; finsi +si present(GLOBAL.RCODOX_1) alors CORR.RCODOX1731 = GLOBAL.RCODOX_1; finsi +si present(GLOBAL.RCODOY_1) alors CORR.RCODOY1731 = GLOBAL.RCODOY_1; finsi +si present(GLOBAL.RCODPZ_1) alors CORR.RCODPZ1731 = GLOBAL.RCODPZ_1; finsi +si present(GLOBAL.RCODMZ_1) alors CORR.RCODMZ1731 = GLOBAL.RCODMZ_1; finsi +si present(GLOBAL.RSOCREPR_1) alors CORR.RSOCREPR1731 = GLOBAL.RSOCREPR_1; finsi +si present(GLOBAL.RCOD7KZ_1) alors CORR.RCOD7KZ1731 = GLOBAL.RCOD7KZ_1; finsi +si present(GLOBAL.RCOD7KY_1) alors CORR.RCOD7KY1731 = GLOBAL.RCOD7KY_1; finsi +si present(GLOBAL.RCOD7KX_1) alors CORR.RCOD7KX1731 = GLOBAL.RCOD7KX_1; finsi +si present(GLOBAL.RRESTIMONX_1) alors CORR.RRESTIMONX1731 = GLOBAL.RRESTIMONX_1; finsi +si present(GLOBAL.RRESTIMONY_1) alors CORR.RRESTIMONY1731 = GLOBAL.RRESTIMONY_1; finsi +si present(GLOBAL.RRESTIMO_1) alors CORR.RRESTIMO1731 = GLOBAL.RRESTIMO_1; finsi +si present(GLOBAL.RRESTIMO1_1) alors CORR.RRESTIMO11731 = GLOBAL.RRESTIMO1_1; finsi +si present(GLOBAL.RDONS_1) alors CORR.RDONS1731 = GLOBAL.RDONS_1; finsi +si present(GLOBAL.RDONDJ_1) alors CORR.RDONDJ1731 = GLOBAL.RDONDJ_1; finsi +si present(GLOBAL.BADONJ) alors CORR.BADONJ1731 = GLOBAL.BADONJ; finsi +si present(GLOBAL.RRETU_1) alors CORR.RRETU1731 = GLOBAL.RRETU_1; finsi +si present(GLOBAL.RINNO_1) alors CORR.RINNO1731 = GLOBAL.RINNO_1; finsi +si present(GLOBAL.RRPRESCOMP_1) alors CORR.RRPRESCOMP1731 = GLOBAL.RRPRESCOMP_1; finsi +si present(GLOBAL.RCOTFOR_1) alors CORR.RCOTFOR1731 = GLOBAL.RCOTFOR_1; finsi +si present(GLOBAL.RFOR_1) alors CORR.RFOR1731 = GLOBAL.RFOR_1; finsi +si present(GLOBAL.RDIFAGRI_1) alors CORR.RDIFAGRI1731 = GLOBAL.RDIFAGRI_1; finsi +si present(GLOBAL.RREHAB_1) alors CORR.RREHAB1731 = GLOBAL.RREHAB_1; finsi +si present(GLOBAL.A13RFOR_1) alors CORR.A13RFOR1731 = GLOBAL.A13RFOR_1; finsi +si present(GLOBAL.A10RFOR_1) alors CORR.A10RFOR1731 = GLOBAL.A10RFOR_1; finsi +si present(GLOBAL.RLOG01_1) alors CORR.RLOG011731 = GLOBAL.RLOG01_1; finsi +si present(GLOBAL.RLOG02_1) alors CORR.RLOG021731 = GLOBAL.RLOG02_1; finsi +si present(GLOBAL.RLOG01_1) alors CORR.RLOG031731 = GLOBAL.RLOG01_1; finsi +si present(GLOBAL.RLOG04_1) alors CORR.RLOG041731 = GLOBAL.RLOG04_1; finsi +si present(GLOBAL.RLOG05_1) alors CORR.RLOG051731 = GLOBAL.RLOG05_1; finsi +si present(GLOBAL.RLOG06_1) alors CORR.RLOG061731 = GLOBAL.RLOG06_1; finsi +si present(GLOBAL.RLOG07_1) alors CORR.RLOG071731 = GLOBAL.RLOG07_1; finsi +si present(GLOBAL.RLOG08_1) alors CORR.RLOG081731 = GLOBAL.RLOG08_1; finsi +si present(GLOBAL.RLOG09_1) alors CORR.RLOG091731 = GLOBAL.RLOG09_1; finsi +si present(GLOBAL.RLOG10_1) alors CORR.RLOG101731 = GLOBAL.RLOG10_1; finsi +si present(GLOBAL.RLOG11_1) alors CORR.RLOG111731 = GLOBAL.RLOG11_1; finsi +si present(GLOBAL.RLOG12_1) alors CORR.RLOG121731 = GLOBAL.RLOG12_1; finsi +si present(GLOBAL.RLOG13_1) alors CORR.RLOG131731 = GLOBAL.RLOG13_1; finsi +si present(GLOBAL.RLOG14_1) alors CORR.RLOG141731 = GLOBAL.RLOG14_1; finsi +si present(GLOBAL.RLOG15_1) alors CORR.RLOG151731 = GLOBAL.RLOG15_1; finsi +si present(GLOBAL.RLOG16_1) alors CORR.RLOG161731 = GLOBAL.RLOG16_1; finsi +si present(GLOBAL.RLOG17_1) alors CORR.RLOG171731 = GLOBAL.RLOG17_1; finsi +si present(GLOBAL.RLOG18_1) alors CORR.RLOG181731 = GLOBAL.RLOG18_1; finsi +si present(GLOBAL.RLOG19_1) alors CORR.RLOG191731 = GLOBAL.RLOG19_1; finsi +si present(GLOBAL.RLOG20_1) alors CORR.RLOG201731 = GLOBAL.RLOG20_1; finsi +si present(GLOBAL.RLOG21_1) alors CORR.RLOG211731 = GLOBAL.RLOG21_1; finsi +si present(GLOBAL.RLOG22_1) alors CORR.RLOG221731 = GLOBAL.RLOG22_1; finsi +si present(GLOBAL.RLOG23_1) alors CORR.RLOG231731 = GLOBAL.RLOG23_1; finsi +si present(GLOBAL.RLOG24_1) alors CORR.RLOG241731 = GLOBAL.RLOG24_1; finsi +si present(GLOBAL.RLOG25_1) alors CORR.RLOG251731 = GLOBAL.RLOG25_1; finsi +si present(GLOBAL.RLOG26_1) alors CORR.RLOG261731 = GLOBAL.RLOG26_1; finsi +si present(GLOBAL.RLOG27_1) alors CORR.RLOG271731 = GLOBAL.RLOG27_1; finsi +si present(GLOBAL.RLOG28_1) alors CORR.RLOG281731 = GLOBAL.RLOG28_1; finsi +si present(GLOBAL.RLOG29_1) alors CORR.RLOG291731 = GLOBAL.RLOG29_1; finsi +si present(GLOBAL.RLOG30_1) alors CORR.RLOG301731 = GLOBAL.RLOG30_1; finsi +si present(GLOBAL.RLOG31_1) alors CORR.RLOG311731 = GLOBAL.RLOG31_1; finsi +si present(GLOBAL.RLOG32_1) alors CORR.RLOG321731 = GLOBAL.RLOG32_1; finsi +si present(GLOBAL.RLOG33_1) alors CORR.RLOG331731 = GLOBAL.RLOG33_1; finsi +si present(GLOBAL.RLOG34_1) alors CORR.RLOG341731 = GLOBAL.RLOG34_1; finsi +si present(GLOBAL.RLOG35_1) alors CORR.RLOG351731 = GLOBAL.RLOG35_1; finsi +si present(GLOBAL.RLOG36_1) alors CORR.RLOG361731 = GLOBAL.RLOG36_1; finsi +si present(GLOBAL.RLOG37_1) alors CORR.RLOG371731 = GLOBAL.RLOG37_1; finsi +si present(GLOBAL.RLOG38_1) alors CORR.RLOG381731 = GLOBAL.RLOG38_1; finsi +si present(GLOBAL.RLOG39_1) alors CORR.RLOG391731 = GLOBAL.RLOG39_1; finsi +si present(GLOBAL.RLOG40_1) alors CORR.RLOG401731 = GLOBAL.RLOG40_1; finsi +si present(GLOBAL.RLOG41_1) alors CORR.RLOG411731 = GLOBAL.RLOG41_1; finsi +si present(GLOBAL.RLOG42_1) alors CORR.RLOG421731 = GLOBAL.RLOG42_1; finsi +si present(GLOBAL.RLOG43_1) alors CORR.RLOG431731 = GLOBAL.RLOG43_1; finsi +si present(GLOBAL.RLOG44_1) alors CORR.RLOG441731 = GLOBAL.RLOG44_1; finsi +si present(GLOBAL.RLOG45_1) alors CORR.RLOG451731 = GLOBAL.RLOG45_1; finsi +si present(GLOBAL.RLOG46_1) alors CORR.RLOG461731 = GLOBAL.RLOG46_1; finsi +si present(GLOBAL.RLOG47_1) alors CORR.RLOG471731 = GLOBAL.RLOG47_1; finsi +si present(GLOBAL.RLOG48_1) alors CORR.RLOG481731 = GLOBAL.RLOG48_1; finsi +si present(GLOBAL.RLOG49_1) alors CORR.RLOG491731 = GLOBAL.RLOG49_1; finsi +si present(GLOBAL.RLOG50_1) alors CORR.RLOG501731 = GLOBAL.RLOG50_1; finsi +si present(GLOBAL.RLOG51_1) alors CORR.RLOG511731 = GLOBAL.RLOG51_1; finsi +si present(GLOBAL.RLOG52_1) alors CORR.RLOG521731 = GLOBAL.RLOG52_1; finsi +si present(GLOBAL.RLOG53_1) alors CORR.RLOG531731 = GLOBAL.RLOG53_1; finsi +si present(GLOBAL.RLOG54_1) alors CORR.RLOG541731 = GLOBAL.RLOG54_1; finsi +si present(GLOBAL.RLOG55_1) alors CORR.RLOG551731 = GLOBAL.RLOG55_1; finsi +si present(GLOBAL.RLOG56_1) alors CORR.RLOG561731 = GLOBAL.RLOG56_1; finsi +si present(GLOBAL.RLOG57_1) alors CORR.RLOG571731 = GLOBAL.RLOG57_1; finsi +si present(GLOBAL.RLOG58_1) alors CORR.RLOG581731 = GLOBAL.RLOG58_1; finsi +si present(GLOBAL.RLOG59_1) alors CORR.RLOG591731 = GLOBAL.RLOG59_1; finsi +si present(GLOBAL.RLOG60_1) alors CORR.RLOG601731 = GLOBAL.RLOG60_1; finsi +si present(GLOBAL.RLOGHVH_1) alors CORR.RLOGHVH1731 = GLOBAL.RLOGHVH_1; finsi +si present(GLOBAL.RLOGHVI_1) alors CORR.RLOGHVI1731 = GLOBAL.RLOGHVI_1; finsi +si present(GLOBAL.RLOGHVJ_1) alors CORR.RLOGHVJ1731 = GLOBAL.RLOGHVJ_1; finsi +si present(GLOBAL.RLOGHVK_1) alors CORR.RLOGHVK1731 = GLOBAL.RLOGHVK_1; finsi +si present(GLOBAL.RLOGHVL_1) alors CORR.RLOGHVL1731 = GLOBAL.RLOGHVL_1; finsi +si present(GLOBAL.RSOC35_1) alors CORR.RSOC351731 = GLOBAL.RSOC35_1; finsi +si present(GLOBAL.RSOC36_1) alors CORR.RSOC361731 = GLOBAL.RSOC36_1; finsi +si present(GLOBAL.RSOC37_1) alors CORR.RSOC371731 = GLOBAL.RSOC37_1; finsi +si present(GLOBAL.RSOC38_1) alors CORR.RSOC381731 = GLOBAL.RSOC38_1; finsi +si present(GLOBAL.RSOC39_1) alors CORR.RSOC391731 = GLOBAL.RSOC39_1; finsi +si present(GLOBAL.RSOC40_1) alors CORR.RSOC401731 = GLOBAL.RSOC40_1; finsi +si present(GLOBAL.RSOC41_1) alors CORR.RSOC411731 = GLOBAL.RSOC41_1; finsi +si present(GLOBAL.RSOC42_1) alors CORR.RSOC421731 = GLOBAL.RSOC42_1; finsi +si present(GLOBAL.RSOC43_1) alors CORR.RSOC431731 = GLOBAL.RSOC43_1; finsi +si present(GLOBAL.RSOC44_1) alors CORR.RSOC441731 = GLOBAL.RSOC44_1; finsi +si present(GLOBAL.RSOC45_1) alors CORR.RSOC451731 = GLOBAL.RSOC45_1; finsi +si present(GLOBAL.RSOC46_1) alors CORR.RSOC461731 = GLOBAL.RSOC46_1; finsi +si present(GLOBAL.RSOC47_1) alors CORR.RSOC471731 = GLOBAL.RSOC47_1; finsi +si present(GLOBAL.RSOC48_1) alors CORR.RSOC481731 = GLOBAL.RSOC48_1; finsi +si present(GLOBAL.RSOC49_1) alors CORR.RSOC491731 = GLOBAL.RSOC49_1; finsi +si present(GLOBAL.RSOC50_1) alors CORR.RSOC501731 = GLOBAL.RSOC50_1; finsi +si present(GLOBAL.RSOC51_1) alors CORR.RSOC511731 = GLOBAL.RSOC51_1; finsi +si present(GLOBAL.RSOC52_1) alors CORR.RSOC521731 = GLOBAL.RSOC52_1; finsi +si present(GLOBAL.RSOC53_1) alors CORR.RSOC531731 = GLOBAL.RSOC53_1; finsi +si present(GLOBAL.RSOC54_1) alors CORR.RSOC541731 = GLOBAL.RSOC54_1; finsi +si present(GLOBAL.RSOCHYB_1) alors CORR.RSOCHYB1731 = GLOBAL.RSOCHYB_1; finsi +si present(GLOBAL.RSOCHYA_1) alors CORR.RSOCHYA1731 = GLOBAL.RSOCHYA_1; finsi +si present(GLOBAL.RSOCHYBR_1) alors CORR.RSOCHYBR1731 = GLOBAL.RSOCHYBR_1; finsi +si present(GLOBAL.RSOCHYAR_1) alors CORR.RSOCHYAR1731 = GLOBAL.RSOCHYAR_1; finsi +si present(GLOBAL.RSOCHYD_1) alors CORR.RSOCHYD1731 = GLOBAL.RSOCHYD_1; finsi +si present(GLOBAL.RSOCHYC_1) alors CORR.RSOCHYC1731 = GLOBAL.RSOCHYC_1; finsi +si present(GLOBAL.RSOCHYDR_1) alors CORR.RSOCHYDR1731 = GLOBAL.RSOCHYDR_1; finsi +si present(GLOBAL.RSOCHYCR_1) alors CORR.RSOCHYCR1731 = GLOBAL.RSOCHYCR_1; finsi +si present(GLOBAL.RSOCHYE_1) alors CORR.RSOCHYE1731 = GLOBAL.RSOCHYE_1; finsi +si present(GLOBAL.RSOCHYER_1) alors CORR.RSOCHYER1731 = GLOBAL.RSOCHYER_1; finsi +si present(GLOBAL.RSOCHYF_1) alors CORR.RSOCHYF1731 = GLOBAL.RSOCHYF_1; finsi +si present(GLOBAL.RSOCHYFR_1) alors CORR.RSOCHYFR1731 = GLOBAL.RSOCHYFR_1; finsi +si present(GLOBAL.RSOCHYG_1) alors CORR.RSOCHYG1731 = GLOBAL.RSOCHYG_1; finsi +si present(GLOBAL.RSOCHYGR_1) alors CORR.RSOCHYGR1731 = GLOBAL.RSOCHYGR_1; finsi +si present(GLOBAL.RLOC117_1) alors CORR.RLOC1171731 = GLOBAL.RLOC117_1; finsi +si present(GLOBAL.RLOC118_1) alors CORR.RLOC1181731 = GLOBAL.RLOC118_1; finsi +si present(GLOBAL.RLOC119_1) alors CORR.RLOC1191731 = GLOBAL.RLOC119_1; finsi +si present(GLOBAL.RLOC120_1) alors CORR.RLOC1201731 = GLOBAL.RLOC120_1; finsi +si present(GLOBAL.RLOC121_1) alors CORR.RLOC1211731 = GLOBAL.RLOC121_1; finsi +si present(GLOBAL.RLOC122_1) alors CORR.RLOC1221731 = GLOBAL.RLOC122_1; finsi +si present(GLOBAL.RLOC123_1) alors CORR.RLOC1231731 = GLOBAL.RLOC123_1; finsi +si present(GLOBAL.RLOC124_1) alors CORR.RLOC1241731 = GLOBAL.RLOC124_1; finsi +si present(GLOBAL.RLOC125_1) alors CORR.RLOC1251731 = GLOBAL.RLOC125_1; finsi +si present(GLOBAL.RLOC126_1) alors CORR.RLOC1261731 = GLOBAL.RLOC126_1; finsi +si present(GLOBAL.RLOC127_1) alors CORR.RLOC1271731 = GLOBAL.RLOC127_1; finsi +si present(GLOBAL.RLOC128_1) alors CORR.RLOC1281731 = GLOBAL.RLOC128_1; finsi +si present(GLOBAL.RLOC129_1) alors CORR.RLOC1291731 = GLOBAL.RLOC129_1; finsi +si present(GLOBAL.RLOC130_1) alors CORR.RLOC1301731 = GLOBAL.RLOC130_1; finsi +si present(GLOBAL.RLOC131_1) alors CORR.RLOC1311731 = GLOBAL.RLOC131_1; finsi +si present(GLOBAL.RLOC132_1) alors CORR.RLOC1321731 = GLOBAL.RLOC132_1; finsi +si present(GLOBAL.RLOC133_1) alors CORR.RLOC1331731 = GLOBAL.RLOC133_1; finsi +si present(GLOBAL.RLOC134_1) alors CORR.RLOC1341731 = GLOBAL.RLOC134_1; finsi +si present(GLOBAL.RLOC135_1) alors CORR.RLOC1351731 = GLOBAL.RLOC135_1; finsi +si present(GLOBAL.RLOC136_1) alors CORR.RLOC1361731 = GLOBAL.RLOC136_1; finsi +si present(GLOBAL.RLOC137_1) alors CORR.RLOC1371731 = GLOBAL.RLOC137_1; finsi +si present(GLOBAL.RLOC138_1) alors CORR.RLOC1381731 = GLOBAL.RLOC138_1; finsi +si present(GLOBAL.RLOC139_1) alors CORR.RLOC1391731 = GLOBAL.RLOC139_1; finsi +si present(GLOBAL.RLOC140_1) alors CORR.RLOC1401731 = GLOBAL.RLOC140_1; finsi +si present(GLOBAL.RLOC141_1) alors CORR.RLOC1411731 = GLOBAL.RLOC141_1; finsi +si present(GLOBAL.RLOC142_1) alors CORR.RLOC1421731 = GLOBAL.RLOC142_1; finsi +si present(GLOBAL.RLOC143_1) alors CORR.RLOC1431731 = GLOBAL.RLOC143_1; finsi +si present(GLOBAL.RLOC144_1) alors CORR.RLOC1441731 = GLOBAL.RLOC144_1; finsi +si present(GLOBAL.RLOC145_1) alors CORR.RLOC1451731 = GLOBAL.RLOC145_1; finsi +si present(GLOBAL.RLOC146_1) alors CORR.RLOC1461731 = GLOBAL.RLOC146_1; finsi +si present(GLOBAL.RLOC147_1) alors CORR.RLOC1471731 = GLOBAL.RLOC147_1; finsi +si present(GLOBAL.RLOC148_1) alors CORR.RLOC1481731 = GLOBAL.RLOC148_1; finsi +si present(GLOBAL.RLOC149_1) alors CORR.RLOC1491731 = GLOBAL.RLOC149_1; finsi +si present(GLOBAL.RLOC150_1) alors CORR.RLOC1501731 = GLOBAL.RLOC150_1; finsi +si present(GLOBAL.RLOC151_1) alors CORR.RLOC1511731 = GLOBAL.RLOC151_1; finsi +si present(GLOBAL.RLOC152_1) alors CORR.RLOC1521731 = GLOBAL.RLOC152_1; finsi +si present(GLOBAL.RLOCHET_1) alors CORR.RLOCHET1731 = GLOBAL.RLOCHET_1; finsi +si present(GLOBAL.RLOCHEO_1) alors CORR.RLOCHEO1731 = GLOBAL.RLOCHEO_1; finsi +si present(GLOBAL.RLOCHES_1) alors CORR.RLOCHES1731 = GLOBAL.RLOCHES_1; finsi +si present(GLOBAL.RLOCHEN_1) alors CORR.RLOCHEN1731 = GLOBAL.RLOCHEN_1; finsi +si present(GLOBAL.RLOCHEP_1) alors CORR.RLOCHEP1731 = GLOBAL.RLOCHEP_1; finsi +si present(GLOBAL.RLOCHEU_1) alors CORR.RLOCHEU1731 = GLOBAL.RLOCHEU_1; finsi +si present(GLOBAL.RLOCHER_1) alors CORR.RLOCHER1731 = GLOBAL.RLOCHER_1; finsi +si present(GLOBAL.RLOCHEW_1) alors CORR.RLOCHEW1731 = GLOBAL.RLOCHEW_1; finsi +si present(GLOBAL.RLOCHFT_1) alors CORR.RLOCHFT1731 = GLOBAL.RLOCHFT_1; finsi +si present(GLOBAL.RLOCHFO_1) alors CORR.RLOCHFO1731 = GLOBAL.RLOCHFO_1; finsi +si present(GLOBAL.RLOCHFS_1) alors CORR.RLOCHFS1731 = GLOBAL.RLOCHFS_1; finsi +si present(GLOBAL.RLOCHFN_1) alors CORR.RLOCHFN1731 = GLOBAL.RLOCHFN_1; finsi +si present(GLOBAL.RLOCHFP_1) alors CORR.RLOCHFP1731 = GLOBAL.RLOCHFP_1; finsi +si present(GLOBAL.RLOCHFU_1) alors CORR.RLOCHFU1731 = GLOBAL.RLOCHFU_1; finsi +si present(GLOBAL.RLOCHFR_1) alors CORR.RLOCHFR1731 = GLOBAL.RLOCHFR_1; finsi +si present(GLOBAL.RLOCHFW_1) alors CORR.RLOCHFW1731 = GLOBAL.RLOCHFW_1; finsi +si present(GLOBAL.RLOCHETR_1) alors CORR.RLOCHETR1731 = GLOBAL.RLOCHETR_1; finsi +si present(GLOBAL.RLOCHEOR_1) alors CORR.RLOCHEOR1731 = GLOBAL.RLOCHEOR_1; finsi +si present(GLOBAL.RLOCHESR_1) alors CORR.RLOCHESR1731 = GLOBAL.RLOCHESR_1; finsi +si present(GLOBAL.RLOCHENR_1) alors CORR.RLOCHENR1731 = GLOBAL.RLOCHENR_1; finsi +si present(GLOBAL.RLOCHFTR_1) alors CORR.RLOCHFTR1731 = GLOBAL.RLOCHFTR_1; finsi +si present(GLOBAL.RLOCHFOR_1) alors CORR.RLOCHFOR1731 = GLOBAL.RLOCHFOR_1; finsi +si present(GLOBAL.RLOCHFSR_1) alors CORR.RLOCHFSR1731 = GLOBAL.RLOCHFSR_1; finsi +si present(GLOBAL.RLOCHFNR_1) alors CORR.RLOCHFNR1731 = GLOBAL.RLOCHFNR_1; finsi +si present(GLOBAL.RLOCHGT_1) alors CORR.RLOCHGT1731 = GLOBAL.RLOCHGT_1; finsi +si present(GLOBAL.RLOCHGS_1) alors CORR.RLOCHGS1731 = GLOBAL.RLOCHGS_1; finsi +si present(GLOBAL.RLOCHGU_1) alors CORR.RLOCHGU1731 = GLOBAL.RLOCHGU_1; finsi +si present(GLOBAL.RLOCHGW_1) alors CORR.RLOCHGW1731 = GLOBAL.RLOCHGW_1; finsi +si present(GLOBAL.RLOCHGTR_1) alors CORR.RLOCHGTR1731 = GLOBAL.RLOCHGTR_1; finsi +si present(GLOBAL.RLOCHGSR_1) alors CORR.RLOCHGSR1731 = GLOBAL.RLOCHGSR_1; finsi +si present(GLOBAL.RLOCHHT_1) alors CORR.RLOCHHT1731 = GLOBAL.RLOCHHT_1; finsi +si present(GLOBAL.RLOCHHS_1) alors CORR.RLOCHHS1731 = GLOBAL.RLOCHHS_1; finsi +si present(GLOBAL.RLOCHHU_1) alors CORR.RLOCHHU1731 = GLOBAL.RLOCHHU_1; finsi +si present(GLOBAL.RLOCHHW_1) alors CORR.RLOCHHW1731 = GLOBAL.RLOCHHW_1; finsi +si present(GLOBAL.RLOCHHTR_1) alors CORR.RLOCHHTR1731 = GLOBAL.RLOCHHTR_1; finsi +si present(GLOBAL.RLOCHHSR_1) alors CORR.RLOCHHSR1731 = GLOBAL.RLOCHHSR_1; finsi +si present(GLOBAL.RLOCHIT_1) alors CORR.RLOCHIT1731 = GLOBAL.RLOCHIT_1; finsi +si present(GLOBAL.RLOCHIS_1) alors CORR.RLOCHIS1731 = GLOBAL.RLOCHIS_1; finsi +si present(GLOBAL.RLOCHIU_1) alors CORR.RLOCHIU1731 = GLOBAL.RLOCHIU_1; finsi +si present(GLOBAL.RLOCHIW_1) alors CORR.RLOCHIW1731 = GLOBAL.RLOCHIW_1; finsi +si present(GLOBAL.RLOCHITR_1) alors CORR.RLOCHITR1731 = GLOBAL.RLOCHITR_1; finsi +si present(GLOBAL.RLOCHISR_1) alors CORR.RLOCHISR1731 = GLOBAL.RLOCHISR_1; finsi +si present(GLOBAL.ACELHA_1) alors CORR.ACELHA1731 = GLOBAL.ACELHA_1; finsi +si present(GLOBAL.RCELHA_1) alors CORR.RCELHA1731 = GLOBAL.RCELHA_1; finsi +si present(GLOBAL.ACELHJ_1) alors CORR.ACELHJ1731 = GLOBAL.ACELHJ_1; finsi +si present(GLOBAL.RCELHJ_1) alors CORR.RCELHJ1731 = GLOBAL.RCELHJ_1; finsi +si present(GLOBAL.ACELHK_1) alors CORR.ACELHK1731 = GLOBAL.ACELHK_1; finsi +si present(GLOBAL.RCELHK_1) alors CORR.RCELHK1731 = GLOBAL.RCELHK_1; finsi +si present(GLOBAL.ACELHN_1) alors CORR.ACELHN1731 = GLOBAL.ACELHN_1; finsi +si present(GLOBAL.RCELHN_1) alors CORR.RCELHN1731 = GLOBAL.RCELHN_1; finsi +si present(GLOBAL.ACELHY_1) alors CORR.ACELHY1731 = GLOBAL.ACELHY_1; finsi +si present(GLOBAL.RCELHY_1) alors CORR.RCELHY1731 = GLOBAL.RCELHY_1; finsi +si present(GLOBAL.ACELZM_1) alors CORR.ACELZM1731 = GLOBAL.ACELZM_1; finsi +si present(GLOBAL.RCELZM_1) alors CORR.RCELZM1731 = GLOBAL.RCELZM_1; finsi +si present(GLOBAL.ACELGS_1) alors CORR.ACELGS1731 = GLOBAL.ACELGS_1; finsi +si present(GLOBAL.RCELGS_1) alors CORR.RCELGS1731 = GLOBAL.RCELGS_1; finsi +si present(GLOBAL.ACELGU_1) alors CORR.ACELGU1731 = GLOBAL.ACELGU_1; finsi +si present(GLOBAL.RCELGU_1) alors CORR.RCELGU1731 = GLOBAL.RCELGU_1; finsi +si present(GLOBAL.ACELGX_1) alors CORR.ACELGX1731 = GLOBAL.ACELGX_1; finsi +si present(GLOBAL.RCELGX_1) alors CORR.RCELGX1731 = GLOBAL.RCELGX_1; finsi +si present(GLOBAL.ACELWX_1) alors CORR.ACELWX1731 = GLOBAL.ACELWX_1; finsi +si present(GLOBAL.RCELWX_1) alors CORR.RCELWX1731 = GLOBAL.RCELWX_1; finsi +si present(GLOBAL.ACELWY_1) alors CORR.ACELWY1731 = GLOBAL.ACELWY_1; finsi +si present(GLOBAL.RCELWY_1) alors CORR.RCELWY1731 = GLOBAL.RCELWY_1; finsi +si present(GLOBAL.ACELWZ_1) alors CORR.ACELWZ1731 = GLOBAL.ACELWZ_1; finsi +si present(GLOBAL.RCELWZ_1) alors CORR.RCELWZ1731 = GLOBAL.RCELWZ_1; finsi +si present(GLOBAL.AILMHD_1) alors CORR.AILMHD1731 = GLOBAL.AILMHD_1; finsi +si present(GLOBAL.RILMHD_1) alors CORR.RILMHD1731 = GLOBAL.RILMHD_1; finsi +si present(GLOBAL.AILMHE_1) alors CORR.AILMHE1731 = GLOBAL.AILMHE_1; finsi +si present(GLOBAL.RILMHE_1) alors CORR.RILMHE1731 = GLOBAL.RILMHE_1; finsi +si present(GLOBAL.AILMHF_1) alors CORR.AILMHF1731 = GLOBAL.AILMHF_1; finsi +si present(GLOBAL.RILMHF_1) alors CORR.RILMHF1731 = GLOBAL.RILMHF_1; finsi +si present(GLOBAL.AILMHG_1) alors CORR.AILMHG1731 = GLOBAL.AILMHG_1; finsi +si present(GLOBAL.RILMHG_1) alors CORR.RILMHG1731 = GLOBAL.RILMHG_1; finsi +si present(GLOBAL.AILMHH_1) alors CORR.AILMHH1731 = GLOBAL.AILMHH_1; finsi +si present(GLOBAL.RILMHH_1) alors CORR.RILMHH1731 = GLOBAL.RILMHH_1; finsi +si present(GLOBAL.AILMKE_1) alors CORR.AILMKE1731 = GLOBAL.AILMKE_1; finsi +si present(GLOBAL.RILMKE_1) alors CORR.RILMKE1731 = GLOBAL.RILMKE_1; finsi +si present(GLOBAL.AILMKF_1) alors CORR.AILMKF1731 = GLOBAL.AILMKF_1; finsi +si present(GLOBAL.RILMKF_1) alors CORR.RILMKF1731 = GLOBAL.RILMKF_1; finsi +si present(GLOBAL.AILMKG_1) alors CORR.AILMKG1731 = GLOBAL.AILMKG_1; finsi +si present(GLOBAL.RILMKG_1) alors CORR.RILMKG1731 = GLOBAL.RILMKG_1; finsi +si present(GLOBAL.AILMKH_1) alors CORR.AILMKH1731 = GLOBAL.AILMKH_1; finsi +si present(GLOBAL.RILMKH_1) alors CORR.RILMKH1731 = GLOBAL.RILMKH_1; finsi +si present(GLOBAL.AILMKI_1) alors CORR.AILMKI1731 = GLOBAL.AILMKI_1; finsi +si present(GLOBAL.RILMKI_1) alors CORR.RILMKI1731 = GLOBAL.RILMKI_1; finsi +si present(GLOBAL.ACELHJ_1) alors CORR.ACELHJ1731 = GLOBAL.ACELHJ_1; finsi +si present(GLOBAL.RCELHJ_1) alors CORR.RCELHJ1731 = GLOBAL.RCELHJ_1; finsi +si present(GLOBAL.ACELHK_1) alors CORR.ACELHK1731 = GLOBAL.ACELHK_1; finsi +si present(GLOBAL.RCELHK_1) alors CORR.RCELHK1731 = GLOBAL.RCELHK_1; finsi +si present(GLOBAL.ACELHK_1) alors CORR.ACELHK1731 = GLOBAL.ACELHK_1; finsi +si present(GLOBAL.RCELHK_1) alors CORR.RCELHK1731 = GLOBAL.RCELHK_1; finsi +si present(GLOBAL.ACELHN_1) alors CORR.ACELHN1731 = GLOBAL.ACELHN_1; finsi +si present(GLOBAL.RCELHN_1) alors CORR.RCELHN1731 = GLOBAL.RCELHN_1; finsi +si present(GLOBAL.ACELHY_1) alors CORR.ACELHY1731 = GLOBAL.ACELHY_1; finsi +si present(GLOBAL.RCELHY_1) alors CORR.RCELHY1731 = GLOBAL.RCELHY_1; finsi +si present(GLOBAL.ACELIQ_1) alors CORR.ACELIQ1731 = GLOBAL.ACELIQ_1; finsi +si present(GLOBAL.RCELIQ_1) alors CORR.RCELIQ1731 = GLOBAL.RCELIQ_1; finsi +si present(GLOBAL.APIREPJN_1) alors CORR.APIREPJN1731 = GLOBAL.APIREPJN_1; finsi +si present(GLOBAL.RPIJN_1) alors CORR.RPIJN1731 = GLOBAL.RPIJN_1; finsi +si present(GLOBAL.APIREPJO_1) alors CORR.APIREPJO1731 = GLOBAL.APIREPJO_1; finsi +si present(GLOBAL.RPIJO_1) alors CORR.RPIJO1731 = GLOBAL.RPIJO_1; finsi +si present(GLOBAL.APIREPJP_1) alors CORR.APIREPJP1731 = GLOBAL.APIREPJP_1; finsi +si present(GLOBAL.RPIJP_1) alors CORR.RPIJP1731 = GLOBAL.RPIJP_1; finsi +si present(GLOBAL.APIREPJQ_1) alors CORR.APIREPJQ1731 = GLOBAL.APIREPJQ_1; finsi +si present(GLOBAL.RPIJQ_1) alors CORR.RPIJQ1731 = GLOBAL.RPIJQ_1; finsi +si present(GLOBAL.APIJV_1) alors CORR.APIJV1731 = GLOBAL.APIJV_1; finsi +si present(GLOBAL.RPIJV_1) alors CORR.RPIJV1731 = GLOBAL.RPIJV_1; finsi +si present(GLOBAL.APIJW_1) alors CORR.APIJW1731 = GLOBAL.APIJW_1; finsi +si present(GLOBAL.RPIJW_1) alors CORR.RPIJW1731 = GLOBAL.RPIJW_1; finsi +si present(GLOBAL.APIJX_1) alors CORR.APIJX1731 = GLOBAL.APIJX_1; finsi +si present(GLOBAL.RPIJX_1) alors CORR.RPIJX1731 = GLOBAL.RPIJX_1; finsi +si present(GLOBAL.APIJY_1) alors CORR.APIJY1731 = GLOBAL.APIJY_1; finsi +si present(GLOBAL.RPIJY_1) alors CORR.RPIJY1731 = GLOBAL.RPIJY_1; finsi +si present(GLOBAL.ANORMJR_1) alors CORR.ANORMJR1731 = GLOBAL.ANORMJR_1; finsi +si present(GLOBAL.RNORMJR_1) alors CORR.RNORMJR1731 = GLOBAL.RNORMJR_1; finsi +si present(GLOBAL.ANORMJS_1) alors CORR.ANORMJS1731 = GLOBAL.ANORMJS_1; finsi +si present(GLOBAL.RNORMJS_1) alors CORR.RNORMJS1731 = GLOBAL.RNORMJS_1; finsi +si present(GLOBAL.ANORMJT_1) alors CORR.ANORMJT1731 = GLOBAL.ANORMJT_1; finsi +si present(GLOBAL.RNORMJT_1) alors CORR.RNORMJT1731 = GLOBAL.RNORMJT_1; finsi +si present(GLOBAL.ANORMJU_1) alors CORR.ANORMJU1731 = GLOBAL.ANORMJU_1; finsi +si present(GLOBAL.RNORMJU_1) alors CORR.RNORMJU1731 = GLOBAL.RNORMJU_1; finsi +si present(GLOBAL.ANORMLG_1) alors CORR.ANORMLG1731 = GLOBAL.ANORMLG_1; finsi +si present(GLOBAL.RNORMLG_1) alors CORR.RNORMLG1731 = GLOBAL.RNORMLG_1; finsi +si present(GLOBAL.ANORMLH_1) alors CORR.ANORMLH1731 = GLOBAL.ANORMLH_1; finsi +si present(GLOBAL.RNORMLH_1) alors CORR.RNORMLH1731 = GLOBAL.RNORMLH_1; finsi +si present(GLOBAL.ANORMLI_1) alors CORR.ANORMLI1731 = GLOBAL.ANORMLI_1; finsi +si present(GLOBAL.RNORMLI_1) alors CORR.RNORMLI1731 = GLOBAL.RNORMLI_1; finsi +si present(GLOBAL.ANORMLJ_1) alors CORR.ANORMLJ1731 = GLOBAL.ANORMLJ_1; finsi +si present(GLOBAL.RNORMLJ_1) alors CORR.RNORMLJ1731 = GLOBAL.RNORMLJ_1; finsi +si present(GLOBAL.ACODJZ_1) alors CORR.ACODJZ1731 = GLOBAL.ACODJZ_1; finsi +si present(GLOBAL.RCODJZ_1) alors CORR.RCODJZ1731 = GLOBAL.RCODJZ_1; finsi +si present(GLOBAL.RCOD7KW_1) alors CORR.RCOD7KW1731 = GLOBAL.RCOD7KW_1; finsi +si present(GLOBAL.ACELHL_1) alors CORR.ACELHL1731 = GLOBAL.ACELHL_1; finsi +si present(GLOBAL.RCELHL_1) alors CORR.RCELHL1731 = GLOBAL.RCELHL_1; finsi +si present(GLOBAL.ACELHM_1) alors CORR.ACELHM1731 = GLOBAL.ACELHM_1; finsi +si present(GLOBAL.RCELHM_1) alors CORR.RCELHM1731 = GLOBAL.RCELHM_1; finsi +si present(GLOBAL.ACELLD_1) alors CORR.ACELLD1731 = GLOBAL.ACELLD_1; finsi +si present(GLOBAL.RCELLD_1) alors CORR.RCELLD1731 = GLOBAL.RCELLD_1; finsi +si present(GLOBAL.ACELLE_1) alors CORR.ACELLE1731 = GLOBAL.ACELLE_1; finsi +si present(GLOBAL.RCELLE_1) alors CORR.RCELLE1731 = GLOBAL.RCELLE_1; finsi +si present(GLOBAL.ACELLF_1) alors CORR.ACELLF1731 = GLOBAL.ACELLF_1; finsi +si present(GLOBAL.RCELLF_1) alors CORR.RCELLF1731 = GLOBAL.RCELLF_1; finsi +si present(GLOBAL.ACELLN_1) alors CORR.ACELLN1731 = GLOBAL.ACELLN_1; finsi +si present(GLOBAL.RCELLN_1) alors CORR.RCELLN1731 = GLOBAL.RCELLN_1; finsi +si present(GLOBAL.ACELLT_1) alors CORR.ACELLT1731 = GLOBAL.ACELLT_1; finsi +si present(GLOBAL.RCELLT_1) alors CORR.RCELLT1731 = GLOBAL.RCELLT_1; finsi +si present(GLOBAL.ACELLX_1) alors CORR.ACELLX1731 = GLOBAL.ACELLX_1; finsi +si present(GLOBAL.RCELLX_1) alors CORR.RCELLX1731 = GLOBAL.RCELLX_1; finsi +si present(GLOBAL.ACELLZ_1) alors CORR.ACELLZ1731 = GLOBAL.ACELLZ_1; finsi +si present(GLOBAL.RCELLZ_1) alors CORR.RCELLZ1731 = GLOBAL.RCELLZ_1; finsi +si present(GLOBAL.ACELBA_1) alors CORR.ACELBA1731 = GLOBAL.ACELBA_1; finsi +si present(GLOBAL.RCELBA_1) alors CORR.RCELBA1731 = GLOBAL.RCELBA_1; finsi +si present(GLOBAL.ACELBB_1) alors CORR.ACELBB1731 = GLOBAL.ACELBB_1; finsi +si present(GLOBAL.RCELBB_1) alors CORR.RCELBB1731 = GLOBAL.RCELBB_1; finsi +si present(GLOBAL.ACELBC_1) alors CORR.ACELBC1731 = GLOBAL.ACELBC_1; finsi +si present(GLOBAL.RCELBC_1) alors CORR.RCELBC1731 = GLOBAL.RCELBC_1; finsi +si present(GLOBAL.ACELBD_1) alors CORR.ACELBD1731 = GLOBAL.ACELBD_1; finsi +si present(GLOBAL.RCELBD_1) alors CORR.RCELBD1731 = GLOBAL.RCELBD_1; finsi +si present(GLOBAL.ACELBE_1) alors CORR.ACELBE1731 = GLOBAL.ACELBE_1; finsi +si present(GLOBAL.RCELBE_1) alors CORR.RCELBE1731 = GLOBAL.RCELBE_1; finsi +si present(GLOBAL.ACELBF_1) alors CORR.ACELBF1731 = GLOBAL.ACELBF_1; finsi +si present(GLOBAL.RCELBF_1) alors CORR.RCELBF1731 = GLOBAL.RCELBF_1; finsi +si present(GLOBAL.ACELBG_1) alors CORR.ACELBG1731 = GLOBAL.ACELBG_1; finsi +si present(GLOBAL.RCELBG_1) alors CORR.RCELBG1731 = GLOBAL.RCELBG_1; finsi +si present(GLOBAL.ACELBH_1) alors CORR.ACELBH1731 = GLOBAL.ACELBH_1; finsi +si present(GLOBAL.RCELBH_1) alors CORR.RCELBH1731 = GLOBAL.RCELBH_1; finsi +si present(GLOBAL.ACELBJ_1) alors CORR.ACELBJ1731 = GLOBAL.ACELBJ_1; finsi +si present(GLOBAL.RCELBJ_1) alors CORR.RCELBJ1731 = GLOBAL.RCELBJ_1; finsi +si present(GLOBAL.RCELMA_1) alors CORR.RCELMA1731 = GLOBAL.RCELMA_1; finsi +si present(GLOBAL.RCELMB_1) alors CORR.RCELMB1731 = GLOBAL.RCELMB_1; finsi +si present(GLOBAL.RCELMC_1) alors CORR.RCELMC1731 = GLOBAL.RCELMC_1; finsi +si present(GLOBAL.RCELMD_1) alors CORR.RCELMD1731 = GLOBAL.RCELMD_1; finsi +si present(GLOBAL.RCELMI_1) alors CORR.RCELMI1731 = GLOBAL.RCELMI_1; finsi +si present(GLOBAL.RCELMJ_1) alors CORR.RCELMJ1731 = GLOBAL.RCELMJ_1; finsi +si present(GLOBAL.RCELMK_1) alors CORR.RCELMK1731 = GLOBAL.RCELMK_1; finsi +si present(GLOBAL.RCELML_1) alors CORR.RCELML1731 = GLOBAL.RCELML_1; finsi +si present(GLOBAL.ACELMG_1) alors CORR.ACELMG1731 = GLOBAL.ACELMG_1; finsi +si present(GLOBAL.RCELMG_1) alors CORR.RCELMG1731 = GLOBAL.RCELMG_1; finsi +si present(GLOBAL.ACELMH_1) alors CORR.ACELMH1731 = GLOBAL.ACELMH_1; finsi +si present(GLOBAL.RCELMH_1) alors CORR.RCELMH1731 = GLOBAL.RCELMH_1; finsi +si present(GLOBAL.ACODMW_1) alors CORR.ACODMW1731 = GLOBAL.ACODMW_1; finsi +si present(GLOBAL.RCODMW_1) alors CORR.RCODMW1731 = GLOBAL.RCODMW_1; finsi +si present(GLOBAL.RNONI_1) alors CORR.RNONI1731 = GLOBAL.RNONI_1; finsi +si present(GLOBAL.RNONJ_1) alors CORR.RNONJ1731 = GLOBAL.RNONJ_1; finsi +si present(GLOBAL.RNONK_1) alors CORR.RNONK1731 = GLOBAL.RNONK_1; finsi +si present(GLOBAL.RNONL_1) alors CORR.RNONL1731 = GLOBAL.RNONL_1; finsi +si present(GLOBAL.RNONM_1) alors CORR.RNONM1731 = GLOBAL.RNONM_1; finsi +si present(GLOBAL.RNONN_1) alors CORR.RNONN1731 = GLOBAL.RNONN_1; finsi +si present(GLOBAL.RNOPF_1) alors CORR.RNOPF1731 = GLOBAL.RNOPF_1; finsi +si present(GLOBAL.RNOPG_1) alors CORR.RNOPG1731 = GLOBAL.RNOPG_1; finsi +si present(GLOBAL.RCELPC_1) alors CORR.RCELPC1731 = GLOBAL.RCELPC_1; finsi +si present(GLOBAL.RCELPD_1) alors CORR.RCELPD1731 = GLOBAL.RCELPD_1; finsi +si present(GLOBAL.RCELPE_1) alors CORR.RCELPE1731 = GLOBAL.RCELPE_1; finsi +si present(GLOBAL.RPIQI_1) alors CORR.RPIQI1731 = GLOBAL.RPIQI_1; finsi +si present(GLOBAL.RPIQJ_1) alors CORR.RPIQJ1731 = GLOBAL.RPIQJ_1; finsi +si present(GLOBAL.RPIQK_1) alors CORR.RPIQK1731 = GLOBAL.RPIQK_1; finsi +si present(GLOBAL.RPIQL_1) alors CORR.RPIQL1731 = GLOBAL.RPIQL_1; finsi +si present(GLOBAL.RPIQM_1) alors CORR.RPIQM1731 = GLOBAL.RPIQM_1; finsi +si present(GLOBAL.RPIQN_1) alors CORR.RPIQN1731 = GLOBAL.RPIQN_1; finsi +si present(GLOBAL.RPIQO_1) alors CORR.RPIQO1731 = GLOBAL.RPIQO_1; finsi +si present(GLOBAL.RPIQP_1) alors CORR.RPIQP1731 = GLOBAL.RPIQP_1; finsi +si present(GLOBAL.RPIRX_1) alors CORR.RPIRX1731 = GLOBAL.RPIRX_1; finsi +si present(GLOBAL.RPIRY_1) alors CORR.RPIRY1731 = GLOBAL.RPIRY_1; finsi +si present(GLOBAL.RPIRP_1) alors CORR.RPIRP1731 = GLOBAL.RPIRP_1; finsi +si present(GLOBAL.RPIRQ_1) alors CORR.RPIRQ1731 = GLOBAL.RPIRQ_1; finsi +si present(GLOBAL.RCELSD_1) alors CORR.RCELSD1731 = GLOBAL.RCELSD_1; finsi +si present(GLOBAL.AILMSM_1) alors CORR.AILMSM1731 = GLOBAL.AILMSM_1; finsi +si present(GLOBAL.RILMSM_1) alors CORR.RILMSM1731 = GLOBAL.RILMSM_1; finsi +si present(GLOBAL.AILMSS_1) alors CORR.AILMSS1731 = GLOBAL.AILMSS_1; finsi +si present(GLOBAL.RILMSS_1) alors CORR.RILMSS1731 = GLOBAL.RILMSS_1; finsi +si present(GLOBAL.ACELSR_1) alors CORR.ACELSR1731 = GLOBAL.ACELSR_1; finsi +si present(GLOBAL.ACELYZ_1) alors CORR.ACELYZ1731 = GLOBAL.ACELYZ_1; finsi +si present(GLOBAL.ACELSL_1) alors CORR.ACELSL1731 = GLOBAL.ACELSL_1; finsi +si present(GLOBAL.ACELSQ_1) alors CORR.ACELSQ1731 = GLOBAL.ACELSQ_1; finsi +si present(GLOBAL.ACELYX_1) alors CORR.ACELYX1731 = GLOBAL.ACELYX_1; finsi +si present(GLOBAL.ACELYY_1) alors CORR.ACELYY1731 = GLOBAL.ACELYY_1; finsi +si present(GLOBAL.ACELSH_1) alors CORR.ACELSH1731 = GLOBAL.ACELSH_1; finsi +si present(GLOBAL.ACELSI_1) alors CORR.ACELSI1731 = GLOBAL.ACELSI_1; finsi +si present(GLOBAL.ACELSJ_1) alors CORR.ACELSJ1731 = GLOBAL.ACELSJ_1; finsi +si present(GLOBAL.ACELSK_1) alors CORR.ACELSK1731 = GLOBAL.ACELSK_1; finsi +si present(GLOBAL.ACELXH_1) alors CORR.ACELXH1731 = GLOBAL.ACELXH_1; finsi +si present(GLOBAL.ACELXI_1) alors CORR.ACELXI1731 = GLOBAL.ACELXI_1; finsi +si present(GLOBAL.ACELXJ_1) alors CORR.ACELXJ1731 = GLOBAL.ACELXJ_1; finsi +si present(GLOBAL.ACELXK_1) alors CORR.ACELXK1731 = GLOBAL.ACELXK_1; finsi +si present(GLOBAL.ACELIA_1) alors CORR.ACELIA1731 = GLOBAL.ACELIA_1; finsi +si present(GLOBAL.ACELIB_1) alors CORR.ACELIB1731 = GLOBAL.ACELIB_1; finsi +si present(GLOBAL.ACELIC_1) alors CORR.ACELIC1731 = GLOBAL.ACELIC_1; finsi +si present(GLOBAL.ACELIE_1) alors CORR.ACELIE1731 = GLOBAL.ACELIE_1; finsi +si present(GLOBAL.ACELKJ_1) alors CORR.ACELKJ1731 = GLOBAL.ACELKJ_1; finsi +si present(GLOBAL.ACELKL_1) alors CORR.ACELKL1731 = GLOBAL.ACELKL_1; finsi +si present(GLOBAL.ACELKN_1) alors CORR.ACELKN1731 = GLOBAL.ACELKN_1; finsi +si present(GLOBAL.ACELSD_1) alors CORR.ACELSD1731 = GLOBAL.ACELSD_1; finsi +si present(GLOBAL.ACELSE_1) alors CORR.ACELSE1731 = GLOBAL.ACELSE_1; finsi +si present(GLOBAL.ACELSF_1) alors CORR.ACELSF1731 = GLOBAL.ACELSF_1; finsi +si present(GLOBAL.ACELSG_1) alors CORR.ACELSG1731 = GLOBAL.ACELSG_1; finsi +si present(GLOBAL.ACELWD_1) alors CORR.ACELWD1731 = GLOBAL.ACELWD_1; finsi +si present(GLOBAL.ACELWE_1) alors CORR.ACELWE1731 = GLOBAL.ACELWE_1; finsi +si present(GLOBAL.ACELWF_1) alors CORR.ACELWF1731 = GLOBAL.ACELWF_1; finsi +si present(GLOBAL.ACELWG_1) alors CORR.ACELWG1731 = GLOBAL.ACELWG_1; finsi +si present(GLOBAL.ACELIF_1) alors CORR.ACELIF1731 = GLOBAL.ACELIF_1; finsi +si present(GLOBAL.ACELIG_1) alors CORR.ACELIG1731 = GLOBAL.ACELIG_1; finsi +si present(GLOBAL.ACELIH_1) alors CORR.ACELIH1731 = GLOBAL.ACELIH_1; finsi +si present(GLOBAL.ACELIO_1) alors CORR.ACELIO1731 = GLOBAL.ACELIO_1; finsi +si present(GLOBAL.ACELKO_1) alors CORR.ACELKO1731 = GLOBAL.ACELKO_1; finsi +si present(GLOBAL.ACELKQ_1) alors CORR.ACELKQ1731 = GLOBAL.ACELKQ_1; finsi +si present(GLOBAL.ACELKR_1) alors CORR.ACELKR1731 = GLOBAL.ACELKR_1; finsi +si present(GLOBAL.ACELIP_1) alors CORR.ACELIP1731 = GLOBAL.ACELIP_1; finsi +si present(GLOBAL.ACELWC_1) alors CORR.ACELWC1731 = GLOBAL.ACELWC_1; finsi +si present(GLOBAL.ACELKS_1) alors CORR.ACELKS1731 = GLOBAL.ACELKS_1; finsi +si present(GLOBAL.RCELSR_1) alors CORR.RCELSR1731 = GLOBAL.RCELSR_1; finsi +si present(GLOBAL.RCELYZ_1) alors CORR.RCELYZ1731 = GLOBAL.RCELYZ_1; finsi +si present(GLOBAL.RCELSL_1) alors CORR.RCELSL1731 = GLOBAL.RCELSL_1; finsi +si present(GLOBAL.RCELSQ_1) alors CORR.RCELSQ1731 = GLOBAL.RCELSQ_1; finsi +si present(GLOBAL.RCELYX_1) alors CORR.RCELYX1731 = GLOBAL.RCELYX_1; finsi +si present(GLOBAL.RCELYY_1) alors CORR.RCELYY1731 = GLOBAL.RCELYY_1; finsi +si present(GLOBAL.RCELSH_1) alors CORR.RCELSH1731 = GLOBAL.RCELSH_1; finsi +si present(GLOBAL.RCELSI_1) alors CORR.RCELSI1731 = GLOBAL.RCELSI_1; finsi +si present(GLOBAL.RCELSJ_1) alors CORR.RCELSJ1731 = GLOBAL.RCELSJ_1; finsi +si present(GLOBAL.RCELSK_1) alors CORR.RCELSK1731 = GLOBAL.RCELSK_1; finsi +si present(GLOBAL.RCELXH_1) alors CORR.RCELXH1731 = GLOBAL.RCELXH_1; finsi +si present(GLOBAL.RCELXI_1) alors CORR.RCELXI1731 = GLOBAL.RCELXI_1; finsi +si present(GLOBAL.RCELXJ_1) alors CORR.RCELXJ1731 = GLOBAL.RCELXJ_1; finsi +si present(GLOBAL.RCELXK_1) alors CORR.RCELXK1731 = GLOBAL.RCELXK_1; finsi +si present(GLOBAL.RCELIA_1) alors CORR.RCELIA1731 = GLOBAL.RCELIA_1; finsi +si present(GLOBAL.RCELIB_1) alors CORR.RCELIB1731 = GLOBAL.RCELIB_1; finsi +si present(GLOBAL.RCELIC_1) alors CORR.RCELIC1731 = GLOBAL.RCELIC_1; finsi +si present(GLOBAL.RCELIE_1) alors CORR.RCELIE1731 = GLOBAL.RCELIE_1; finsi +si present(GLOBAL.RCELKJ_1) alors CORR.RCELKJ1731 = GLOBAL.RCELKJ_1; finsi +si present(GLOBAL.RCELKL_1) alors CORR.RCELKL1731 = GLOBAL.RCELKL_1; finsi +si present(GLOBAL.RCELKN_1) alors CORR.RCELKN1731 = GLOBAL.RCELKN_1; finsi +si present(GLOBAL.RCELSD_1) alors CORR.RCELSD1731 = GLOBAL.RCELSD_1; finsi +si present(GLOBAL.RCELSE_1) alors CORR.RCELSE1731 = GLOBAL.RCELSE_1; finsi +si present(GLOBAL.RCELSF_1) alors CORR.RCELSF1731 = GLOBAL.RCELSF_1; finsi +si present(GLOBAL.RCELSG_1) alors CORR.RCELSG1731 = GLOBAL.RCELSG_1; finsi +si present(GLOBAL.RCELWD_1) alors CORR.RCELWD1731 = GLOBAL.RCELWD_1; finsi +si present(GLOBAL.RCELWE_1) alors CORR.RCELWE1731 = GLOBAL.RCELWE_1; finsi +si present(GLOBAL.RCELWF_1) alors CORR.RCELWF1731 = GLOBAL.RCELWF_1; finsi +si present(GLOBAL.RCELWG_1) alors CORR.RCELWG1731 = GLOBAL.RCELWG_1; finsi +si present(GLOBAL.RCELIF_1) alors CORR.RCELIF1731 = GLOBAL.RCELIF_1; finsi +si present(GLOBAL.RCELIG_1) alors CORR.RCELIG1731 = GLOBAL.RCELIG_1; finsi +si present(GLOBAL.RCELIH_1) alors CORR.RCELIH1731 = GLOBAL.RCELIH_1; finsi +si present(GLOBAL.RCELIO_1) alors CORR.RCELIO1731 = GLOBAL.RCELIO_1; finsi +si present(GLOBAL.RCELKO_1) alors CORR.RCELKO1731 = GLOBAL.RCELKO_1; finsi +si present(GLOBAL.RCELKQ_1) alors CORR.RCELKQ1731 = GLOBAL.RCELKQ_1; finsi +si present(GLOBAL.RCELKR_1) alors CORR.RCELKR1731 = GLOBAL.RCELKR_1; finsi +si present(GLOBAL.RCELIP_1) alors CORR.RCELIP1731 = GLOBAL.RCELIP_1; finsi +si present(GLOBAL.RCELWC_1) alors CORR.RCELWC1731 = GLOBAL.RCELWC_1; finsi +si present(GLOBAL.RCELKS_1) alors CORR.RCELKS1731 = GLOBAL.RCELKS_1; finsi +si present(GLOBAL.APIRI_1) alors CORR.APIRI1731 = GLOBAL.APIRI_1; finsi +si present(GLOBAL.RPIRI_1) alors CORR.RPIRI1731 = GLOBAL.RPIRI_1; finsi +si present(GLOBAL.APIRJ_1) alors CORR.APIRJ1731 = GLOBAL.APIRJ_1; finsi +si present(GLOBAL.RPIRJ_1) alors CORR.RPIRJ1731 = GLOBAL.RPIRJ_1; finsi +si present(GLOBAL.APISX_1) alors CORR.APISX1731 = GLOBAL.APISX_1; finsi +si present(GLOBAL.RPISX_1) alors CORR.RPISX1731 = GLOBAL.RPISX_1; finsi +si present(GLOBAL.APISY_1) alors CORR.APISY1731 = GLOBAL.APISY_1; finsi +si present(GLOBAL.RPISY_1) alors CORR.RPISY1731 = GLOBAL.RPISY_1; finsi +si present(GLOBAL.APIUY_1) alors CORR.APIUY1731 = GLOBAL.APIUY_1; finsi +si present(GLOBAL.RPIUY_1) alors CORR.RPIUY1731 = GLOBAL.RPIUY_1; finsi +si present(GLOBAL.APIUZ_1) alors CORR.APIUZ1731 = GLOBAL.APIUZ_1; finsi +si present(GLOBAL.RPIUZ_1) alors CORR.RPIUZ1731 = GLOBAL.RPIUZ_1; finsi +si present(GLOBAL.RCELUU_1) alors CORR.RCELUU1731 = GLOBAL.RCELUU_1; finsi +si present(GLOBAL.RCELUV_1) alors CORR.RCELUV1731 = GLOBAL.RCELUV_1; finsi +si present(GLOBAL.RCELUW_1) alors CORR.RCELUW1731 = GLOBAL.RCELUW_1; finsi +si present(GLOBAL.RCELUX_1) alors CORR.RCELUX1731 = GLOBAL.RCELUX_1; finsi +si present(GLOBAL.RCELRK_1) alors CORR.RCELRK1731 = GLOBAL.RCELRK_1; finsi +si present(GLOBAL.RCELRL_1) alors CORR.RCELRL1731 = GLOBAL.RCELRL_1; finsi +si present(GLOBAL.RCELRM_1) alors CORR.RCELRM1731 = GLOBAL.RCELRM_1; finsi +si present(GLOBAL.RCELRN_1) alors CORR.RCELRN1731 = GLOBAL.RCELRN_1; finsi +si present(GLOBAL.ACELXA_1) alors CORR.ACELXA1731 = GLOBAL.ACELXA_1; finsi +si present(GLOBAL.RCELXA_1) alors CORR.RCELXA1731 = GLOBAL.RCELXA_1; finsi +si present(GLOBAL.ACELXC_1) alors CORR.ACELXC1731 = GLOBAL.ACELXC_1; finsi +si present(GLOBAL.RCELXC_1) alors CORR.RCELXC1731 = GLOBAL.RCELXC_1; finsi +si present(GLOBAL.ACELXM_1) alors CORR.ACELXM1731 = GLOBAL.ACELXM_1; finsi +si present(GLOBAL.RCELXM_1) alors CORR.RCELXM1731 = GLOBAL.RCELXM_1; finsi +si present(GLOBAL.ACELXN_1) alors CORR.ACELXN1731 = GLOBAL.ACELXN_1; finsi +si present(GLOBAL.RCELXN_1) alors CORR.RCELXN1731 = GLOBAL.RCELXN_1; finsi +si present(GLOBAL.ACELYA_1) alors CORR.ACELYA1731 = GLOBAL.ACELYA_1; finsi +si present(GLOBAL.RCELYA_1) alors CORR.RCELYA1731 = GLOBAL.RCELYA_1; finsi +si present(GLOBAL.ACELYC_1) alors CORR.ACELYC1731 = GLOBAL.ACELYC_1; finsi +si present(GLOBAL.RCELYC_1) alors CORR.RCELYC1731 = GLOBAL.RCELYC_1; finsi +si present(GLOBAL.ACELYG_1) alors CORR.ACELYG1731 = GLOBAL.ACELYG_1; finsi +si present(GLOBAL.RCELYG_1) alors CORR.RCELYG1731 = GLOBAL.RCELYG_1; finsi +si present(GLOBAL.ACELYR_1) alors CORR.ACELYR1731 = GLOBAL.ACELYR_1; finsi +si present(GLOBAL.RCELYR_1) alors CORR.RCELYR1731 = GLOBAL.RCELYR_1; finsi +si present(GLOBAL.ACELYS_1) alors CORR.ACELYS1731 = GLOBAL.ACELYS_1; finsi +si present(GLOBAL.RCELYS_1) alors CORR.RCELYS1731 = GLOBAL.RCELYS_1; finsi +si present(GLOBAL.ACELPI_1) alors CORR.ACELPI1731 = GLOBAL.ACELPI_1; finsi +si present(GLOBAL.RCELPI_1) alors CORR.RCELPI1731 = GLOBAL.RCELPI_1; finsi +si present(GLOBAL.ACELPJ_1) alors CORR.ACELPJ1731 = GLOBAL.ACELPJ_1; finsi +si present(GLOBAL.RCELPJ_1) alors CORR.RCELPJ1731 = GLOBAL.RCELPJ_1; finsi +si present(GLOBAL.ACELAU_1) alors CORR.ACELAU1731 = GLOBAL.ACELAU_1; finsi +si present(GLOBAL.RCELAU_1) alors CORR.RCELAU1731 = GLOBAL.RCELAU_1; finsi +si present(GLOBAL.ACELAB_1) alors CORR.ACELAB1731 = GLOBAL.ACELAB_1; finsi +si present(GLOBAL.RCELAB_1) alors CORR.RCELAB1731 = GLOBAL.RCELAB_1; finsi +si present(GLOBAL.ACELAD_1) alors CORR.ACELAD1731 = GLOBAL.ACELAD_1; finsi +si present(GLOBAL.RCELAD_1) alors CORR.RCELAD1731 = GLOBAL.RCELAD_1; finsi +si present(GLOBAL.ACELAF_1) alors CORR.ACELAF1731 = GLOBAL.ACELAF_1; finsi +si present(GLOBAL.RCELAF_1) alors CORR.RCELAF1731 = GLOBAL.RCELAF_1; finsi +si present(GLOBAL.ACELAH_1) alors CORR.ACELAH1731 = GLOBAL.ACELAH_1; finsi +si present(GLOBAL.RCELAH_1) alors CORR.RCELAH1731 = GLOBAL.RCELAH_1; finsi +si present(GLOBAL.ACELAI_1) alors CORR.ACELAI1731 = GLOBAL.ACELAI_1; finsi +si present(GLOBAL.RCELAI_1) alors CORR.RCELAI1731 = GLOBAL.RCELAI_1; finsi +si present(GLOBAL.ACELAP_1) alors CORR.ACELAP1731 = GLOBAL.ACELAP_1; finsi +si present(GLOBAL.RCELAP_1) alors CORR.RCELAP1731 = GLOBAL.RCELAP_1; finsi +si present(GLOBAL.ACELAR_1) alors CORR.ACELAR1731 = GLOBAL.ACELAR_1; finsi +si present(GLOBAL.RCELAR_1) alors CORR.RCELAR1731 = GLOBAL.RCELAR_1; finsi +si present(GLOBAL.ACELAS_1) alors CORR.ACELAS1731 = GLOBAL.ACELAS_1; finsi +si present(GLOBAL.RCELAS_1) alors CORR.RCELAS1731 = GLOBAL.RCELAS_1; finsi +si present(GLOBAL.ACELAT_1) alors CORR.ACELAT1731 = GLOBAL.ACELAT_1; finsi +si present(GLOBAL.RCELAT_1) alors CORR.RCELAT1731 = GLOBAL.RCELAT_1; finsi +si present(GLOBAL.ACELQE_1) alors CORR.ACELQE1731 = GLOBAL.ACELQE_1; finsi +si present(GLOBAL.RCELQE_1) alors CORR.RCELQE1731 = GLOBAL.RCELQE_1; finsi +si present(GLOBAL.ACELXB_1) alors CORR.ACELXB1731 = GLOBAL.ACELXB_1; finsi +si present(GLOBAL.RCELXB_1) alors CORR.RCELXB1731 = GLOBAL.RCELXB_1; finsi +si present(GLOBAL.ACELXL_1) alors CORR.ACELXL1731 = GLOBAL.ACELXL_1; finsi +si present(GLOBAL.RCELXL_1) alors CORR.RCELXL1731 = GLOBAL.RCELXL_1; finsi diff --git a/m_ext/2022/commence_par_5.m b/m_ext/2022/commence_par_5.m new file mode 100644 index 000000000..f10c9949f --- /dev/null +++ b/m_ext/2022/commence_par_5.m @@ -0,0 +1,168 @@ +cible alias_commence_par_5: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 5AC) ou meme_variable(VAR, 5AD) ou meme_variable(VAR, 5AE) ou + meme_variable(VAR, 5AF) ou meme_variable(VAR, 5AG) ou meme_variable(VAR, 5AH) ou + meme_variable(VAR, 5AI) ou meme_variable(VAR, 5AK) ou meme_variable(VAR, 5AL) ou + meme_variable(VAR, 5AN) ou meme_variable(VAR, 5AO) ou meme_variable(VAR, 5AP) ou + meme_variable(VAR, 5AQ) ou meme_variable(VAR, 5AR) ou meme_variable(VAR, 5AT) ou + meme_variable(VAR, 5AX) ou meme_variable(VAR, 5AY) ou meme_variable(VAR, 5AZ) ou + meme_variable(VAR, 5BC) ou meme_variable(VAR, 5BD) ou meme_variable(VAR, 5BE) ou + meme_variable(VAR, 5BF) ou meme_variable(VAR, 5BG) ou meme_variable(VAR, 5BH) ou + meme_variable(VAR, 5BI) ou meme_variable(VAR, 5BK) ou meme_variable(VAR, 5BL) ou + meme_variable(VAR, 5BN) ou meme_variable(VAR, 5BO) ou meme_variable(VAR, 5BP) ou + meme_variable(VAR, 5BQ) ou meme_variable(VAR, 5BR) ou meme_variable(VAR, 5BT) ou + meme_variable(VAR, 5BX) ou meme_variable(VAR, 5BY) ou meme_variable(VAR, 5BZ) ou + meme_variable(VAR, 5CC) ou meme_variable(VAR, 5CD) ou meme_variable(VAR, 5CE) ou + meme_variable(VAR, 5CF) ou meme_variable(VAR, 5CG) ou meme_variable(VAR, 5CI) ou + meme_variable(VAR, 5CK) ou meme_variable(VAR, 5CL) ou meme_variable(VAR, 5CM) ou + meme_variable(VAR, 5CN) ou meme_variable(VAR, 5CQ) ou meme_variable(VAR, 5CR) ou + meme_variable(VAR, 5CT) ou meme_variable(VAR, 5CU) ou meme_variable(VAR, 5CV) ou + meme_variable(VAR, 5CX) ou meme_variable(VAR, 5CY) ou meme_variable(VAR, 5CZ) ou + meme_variable(VAR, 5DB) ou meme_variable(VAR, 5DD) ou meme_variable(VAR, 5DF) ou + meme_variable(VAR, 5DG) ou meme_variable(VAR, 5DK) ou meme_variable(VAR, 5DL) ou + meme_variable(VAR, 5DM) ou meme_variable(VAR, 5DN) ou meme_variable(VAR, 5EA) ou + meme_variable(VAR, 5EB) ou meme_variable(VAR, 5EC) ou meme_variable(VAR, 5ED) ou + meme_variable(VAR, 5EF) ou meme_variable(VAR, 5EG) ou meme_variable(VAR, 5EI) ou + meme_variable(VAR, 5EK) ou meme_variable(VAR, 5EL) ou meme_variable(VAR, 5EM) ou + meme_variable(VAR, 5EN) ou meme_variable(VAR, 5EQ) ou meme_variable(VAR, 5EU) ou + meme_variable(VAR, 5EV) ou meme_variable(VAR, 5EY) ou meme_variable(VAR, 5EZ) ou + meme_variable(VAR, 5FA) ou meme_variable(VAR, 5FB) ou meme_variable(VAR, 5FD) ou + meme_variable(VAR, 5FF) ou meme_variable(VAR, 5FG) ou meme_variable(VAR, 5FK) ou + meme_variable(VAR, 5FL) ou meme_variable(VAR, 5FM) ou meme_variable(VAR, 5FN) ou + meme_variable(VAR, 5FY) ou meme_variable(VAR, 5FZ) ou meme_variable(VAR, 5GA) ou + meme_variable(VAR, 5GB) ou meme_variable(VAR, 5GC) ou meme_variable(VAR, 5GD) ou + meme_variable(VAR, 5GE) ou meme_variable(VAR, 5GF) ou meme_variable(VAR, 5GG) ou + meme_variable(VAR, 5GH) ou meme_variable(VAR, 5GI) ou meme_variable(VAR, 5GJ) ou + meme_variable(VAR, 5GY) ou meme_variable(VAR, 5GZ) ou meme_variable(VAR, 5HA) ou + meme_variable(VAR, 5HB) ou meme_variable(VAR, 5HC) ou meme_variable(VAR, 5HD) ou + meme_variable(VAR, 5HE) ou meme_variable(VAR, 5HF) ou meme_variable(VAR, 5HG) ou + meme_variable(VAR, 5HH) ou meme_variable(VAR, 5HI) ou meme_variable(VAR, 5HK) ou + meme_variable(VAR, 5HL) ou meme_variable(VAR, 5HM) ou meme_variable(VAR, 5HP) ou + meme_variable(VAR, 5HQ) ou meme_variable(VAR, 5HR) ou meme_variable(VAR, 5HS) ou + meme_variable(VAR, 5HT) ou meme_variable(VAR, 5HV) ou meme_variable(VAR, 5HW) ou + meme_variable(VAR, 5HX) ou meme_variable(VAR, 5HY) ou meme_variable(VAR, 5HZ) ou + meme_variable(VAR, 5IA) ou meme_variable(VAR, 5IB) ou meme_variable(VAR, 5IC) ou + meme_variable(VAR, 5ID) ou meme_variable(VAR, 5IE) ou meme_variable(VAR, 5IF) ou + meme_variable(VAR, 5IG) ou meme_variable(VAR, 5IH) ou meme_variable(VAR, 5II) ou + meme_variable(VAR, 5IK) ou meme_variable(VAR, 5IL) ou meme_variable(VAR, 5IM) ou + meme_variable(VAR, 5IP) ou meme_variable(VAR, 5IQ) ou meme_variable(VAR, 5IR) ou + meme_variable(VAR, 5IS) ou meme_variable(VAR, 5IT) ou meme_variable(VAR, 5IU) ou + meme_variable(VAR, 5IV) ou meme_variable(VAR, 5IW) ou meme_variable(VAR, 5IX) ou + meme_variable(VAR, 5IY) ou meme_variable(VAR, 5IZ) ou meme_variable(VAR, 5JA) ou + meme_variable(VAR, 5JB) ou meme_variable(VAR, 5JC) ou meme_variable(VAR, 5JD) ou + meme_variable(VAR, 5JE) ou meme_variable(VAR, 5JF) ou meme_variable(VAR, 5JG) ou + meme_variable(VAR, 5JH) ou meme_variable(VAR, 5JI) ou meme_variable(VAR, 5JJ) ou + meme_variable(VAR, 5JK) ou meme_variable(VAR, 5JL) ou meme_variable(VAR, 5JM) ou + meme_variable(VAR, 5JP) ou meme_variable(VAR, 5JQ) ou meme_variable(VAR, 5JR) ou + meme_variable(VAR, 5JS) ou meme_variable(VAR, 5JT) ou meme_variable(VAR, 5JU) ou + meme_variable(VAR, 5JV) ou meme_variable(VAR, 5JW) ou meme_variable(VAR, 5JX) ou + meme_variable(VAR, 5JY) ou meme_variable(VAR, 5JZ) ou meme_variable(VAR, 5KB) ou + meme_variable(VAR, 5KC) ou meme_variable(VAR, 5KE) ou meme_variable(VAR, 5KF) ou + meme_variable(VAR, 5KH) ou meme_variable(VAR, 5KI) ou meme_variable(VAR, 5KJ) ou + meme_variable(VAR, 5KK) ou meme_variable(VAR, 5KL) ou meme_variable(VAR, 5KM) ou + meme_variable(VAR, 5KN) ou meme_variable(VAR, 5KO) ou meme_variable(VAR, 5KP) ou + meme_variable(VAR, 5KQ) ou meme_variable(VAR, 5KR) ou meme_variable(VAR, 5KT) ou + meme_variable(VAR, 5KU) ou meme_variable(VAR, 5KV) ou meme_variable(VAR, 5KW) ou + meme_variable(VAR, 5KX) ou meme_variable(VAR, 5KY) ou meme_variable(VAR, 5KZ) ou + meme_variable(VAR, 5LB) ou meme_variable(VAR, 5LC) ou meme_variable(VAR, 5LD) ou + meme_variable(VAR, 5LE) ou meme_variable(VAR, 5LF) ou meme_variable(VAR, 5LH) ou + meme_variable(VAR, 5LI) ou meme_variable(VAR, 5LJ) ou meme_variable(VAR, 5LK) ou + meme_variable(VAR, 5LL) ou meme_variable(VAR, 5LM) ou meme_variable(VAR, 5LN) ou + meme_variable(VAR, 5LO) ou meme_variable(VAR, 5LP) ou meme_variable(VAR, 5LQ) ou + meme_variable(VAR, 5LR) ou meme_variable(VAR, 5LT) ou meme_variable(VAR, 5LU) ou + meme_variable(VAR, 5LV) ou meme_variable(VAR, 5LW) ou meme_variable(VAR, 5LX) ou + meme_variable(VAR, 5LY) ou meme_variable(VAR, 5LZ) ou meme_variable(VAR, 5MB) ou + meme_variable(VAR, 5MC) ou meme_variable(VAR, 5MD) ou meme_variable(VAR, 5ME) ou + meme_variable(VAR, 5MF) ou meme_variable(VAR, 5MH) ou meme_variable(VAR, 5MI) ou + meme_variable(VAR, 5MJ) ou meme_variable(VAR, 5MK) ou meme_variable(VAR, 5ML) ou + meme_variable(VAR, 5MM) ou meme_variable(VAR, 5MN) ou meme_variable(VAR, 5MO) ou + meme_variable(VAR, 5MP) ou meme_variable(VAR, 5MQ) ou meme_variable(VAR, 5MR) ou + meme_variable(VAR, 5MT) ou meme_variable(VAR, 5MU) ou meme_variable(VAR, 5MV) ou + meme_variable(VAR, 5MW) ou meme_variable(VAR, 5MX) ou meme_variable(VAR, 5MY) ou + meme_variable(VAR, 5MZ) ou meme_variable(VAR, 5NA) ou meme_variable(VAR, 5NB) ou + meme_variable(VAR, 5NC) ou meme_variable(VAR, 5ND) ou meme_variable(VAR, 5NE) ou + meme_variable(VAR, 5NF) ou meme_variable(VAR, 5NG) ou meme_variable(VAR, 5NH) ou + meme_variable(VAR, 5NI) ou meme_variable(VAR, 5NJ) ou meme_variable(VAR, 5NK) ou + meme_variable(VAR, 5NL) ou meme_variable(VAR, 5NM) ou meme_variable(VAR, 5NN) ou + meme_variable(VAR, 5NO) ou meme_variable(VAR, 5NP) ou meme_variable(VAR, 5NQ) ou + meme_variable(VAR, 5NR) ou meme_variable(VAR, 5NS) ou meme_variable(VAR, 5NT) ou + meme_variable(VAR, 5NU) ou meme_variable(VAR, 5NW) ou meme_variable(VAR, 5NX) ou + meme_variable(VAR, 5NY) ou meme_variable(VAR, 5NZ) ou meme_variable(VAR, 5OA) ou + meme_variable(VAR, 5OB) ou meme_variable(VAR, 5OC) ou meme_variable(VAR, 5OD) ou + meme_variable(VAR, 5OE) ou meme_variable(VAR, 5OF) ou meme_variable(VAR, 5OG) ou + meme_variable(VAR, 5OH) ou meme_variable(VAR, 5OI) ou meme_variable(VAR, 5OJ) ou + meme_variable(VAR, 5OK) ou meme_variable(VAR, 5OL) ou meme_variable(VAR, 5OM) ou + meme_variable(VAR, 5ON) ou meme_variable(VAR, 5OO) ou meme_variable(VAR, 5OP) ou + meme_variable(VAR, 5OQ) ou meme_variable(VAR, 5OR) ou meme_variable(VAR, 5OS) ou + meme_variable(VAR, 5OT) ou meme_variable(VAR, 5OU) ou meme_variable(VAR, 5OW) ou + meme_variable(VAR, 5OX) ou meme_variable(VAR, 5OY) ou meme_variable(VAR, 5OZ) ou + meme_variable(VAR, 5PA) ou meme_variable(VAR, 5PB) ou meme_variable(VAR, 5PC) ou + meme_variable(VAR, 5PD) ou meme_variable(VAR, 5PE) ou meme_variable(VAR, 5PF) ou + meme_variable(VAR, 5PG) ou meme_variable(VAR, 5PH) ou meme_variable(VAR, 5PI) ou + meme_variable(VAR, 5PJ) ou meme_variable(VAR, 5PK) ou meme_variable(VAR, 5PL) ou + meme_variable(VAR, 5PM) ou meme_variable(VAR, 5PN) ou meme_variable(VAR, 5PO) ou + meme_variable(VAR, 5PP) ou meme_variable(VAR, 5PQ) ou meme_variable(VAR, 5PR) ou + meme_variable(VAR, 5PW) ou meme_variable(VAR, 5PX) ou meme_variable(VAR, 5PY) ou + meme_variable(VAR, 5PZ) ou meme_variable(VAR, 5QA) ou meme_variable(VAR, 5QB) ou + meme_variable(VAR, 5QC) ou meme_variable(VAR, 5QD) ou meme_variable(VAR, 5QE) ou + meme_variable(VAR, 5QF) ou meme_variable(VAR, 5QG) ou meme_variable(VAR, 5QH) ou + meme_variable(VAR, 5QI) ou meme_variable(VAR, 5QJ) ou meme_variable(VAR, 5QK) ou + meme_variable(VAR, 5QL) ou meme_variable(VAR, 5QM) ou meme_variable(VAR, 5QN) ou + meme_variable(VAR, 5QO) ou meme_variable(VAR, 5QP) ou meme_variable(VAR, 5QQ) ou + meme_variable(VAR, 5RA) ou meme_variable(VAR, 5RB) ou meme_variable(VAR, 5RC) ou + meme_variable(VAR, 5RD) ou meme_variable(VAR, 5RE) ou meme_variable(VAR, 5RF) ou + meme_variable(VAR, 5RG) ou meme_variable(VAR, 5RH) ou meme_variable(VAR, 5RI) ou + meme_variable(VAR, 5RJ) ou meme_variable(VAR, 5RK) ou meme_variable(VAR, 5RL) ou + meme_variable(VAR, 5RM) ou meme_variable(VAR, 5RN) ou meme_variable(VAR, 5RO) ou + meme_variable(VAR, 5RP) ou meme_variable(VAR, 5RQ) ou meme_variable(VAR, 5RR) ou + meme_variable(VAR, 5RW) ou meme_variable(VAR, 5RZ) ou meme_variable(VAR, 5SA) ou + meme_variable(VAR, 5SB) ou meme_variable(VAR, 5SC) ou meme_variable(VAR, 5SD) ou + meme_variable(VAR, 5SE) ou meme_variable(VAR, 5SF) ou meme_variable(VAR, 5SG) ou + meme_variable(VAR, 5SH) ou meme_variable(VAR, 5SI) ou meme_variable(VAR, 5SJ) ou + meme_variable(VAR, 5SK) ou meme_variable(VAR, 5SL) ou meme_variable(VAR, 5SN) ou + meme_variable(VAR, 5SO) ou meme_variable(VAR, 5SP) ou meme_variable(VAR, 5SV) ou + meme_variable(VAR, 5SW) ou meme_variable(VAR, 5SX) ou meme_variable(VAR, 5SZ) ou + meme_variable(VAR, 5TA) ou meme_variable(VAR, 5TB) ou meme_variable(VAR, 5TC) ou + meme_variable(VAR, 5TE) ou meme_variable(VAR, 5TF) ou meme_variable(VAR, 5TH) ou + meme_variable(VAR, 5TJ) ou meme_variable(VAR, 5TK) ou meme_variable(VAR, 5TL) ou + meme_variable(VAR, 5TP) ou meme_variable(VAR, 5UA) ou meme_variable(VAR, 5UB) ou + meme_variable(VAR, 5UC) ou meme_variable(VAR, 5UE) ou meme_variable(VAR, 5UF) ou + meme_variable(VAR, 5UH) ou meme_variable(VAR, 5UI) ou meme_variable(VAR, 5UJ) ou + meme_variable(VAR, 5UK) ou meme_variable(VAR, 5UL) ou meme_variable(VAR, 5UP) ou + meme_variable(VAR, 5UR) ou meme_variable(VAR, 5US) ou meme_variable(VAR, 5UT) ou + meme_variable(VAR, 5UU) ou meme_variable(VAR, 5UY) ou meme_variable(VAR, 5UZ) ou + meme_variable(VAR, 5VA) ou meme_variable(VAR, 5VB) ou meme_variable(VAR, 5VC) ou + meme_variable(VAR, 5VE) ou meme_variable(VAR, 5VF) ou meme_variable(VAR, 5VH) ou + meme_variable(VAR, 5VI) ou meme_variable(VAR, 5VJ) ou meme_variable(VAR, 5VK) ou + meme_variable(VAR, 5VL) ou meme_variable(VAR, 5VM) ou meme_variable(VAR, 5VN) ou + meme_variable(VAR, 5VP) ou meme_variable(VAR, 5VQ) ou meme_variable(VAR, 5VR) ou + meme_variable(VAR, 5VS) ou meme_variable(VAR, 5VT) ou meme_variable(VAR, 5VU) ou + meme_variable(VAR, 5VV) ou meme_variable(VAR, 5VW) ou meme_variable(VAR, 5VX) ou + meme_variable(VAR, 5VY) ou meme_variable(VAR, 5VZ) ou meme_variable(VAR, 5WE) ou + meme_variable(VAR, 5WF) ou meme_variable(VAR, 5WI) ou meme_variable(VAR, 5WM) ou + meme_variable(VAR, 5WN) ou meme_variable(VAR, 5WR) ou meme_variable(VAR, 5WS) ou + meme_variable(VAR, 5XA) ou meme_variable(VAR, 5XB) ou meme_variable(VAR, 5XE) ou + meme_variable(VAR, 5XF) ou meme_variable(VAR, 5XH) ou meme_variable(VAR, 5XI) ou + meme_variable(VAR, 5XJ) ou meme_variable(VAR, 5XK) ou meme_variable(VAR, 5XL) ou + meme_variable(VAR, 5XM) ou meme_variable(VAR, 5XN) ou meme_variable(VAR, 5XO) ou + meme_variable(VAR, 5XP) ou meme_variable(VAR, 5XQ) ou meme_variable(VAR, 5XR) ou + meme_variable(VAR, 5XS) ou meme_variable(VAR, 5XT) ou meme_variable(VAR, 5XU) ou + meme_variable(VAR, 5XV) ou meme_variable(VAR, 5XW) ou meme_variable(VAR, 5XX) ou + meme_variable(VAR, 5XY) ou meme_variable(VAR, 5XZ) ou meme_variable(VAR, 5YA) ou + meme_variable(VAR, 5YB) ou meme_variable(VAR, 5YE) ou meme_variable(VAR, 5YF) ou + meme_variable(VAR, 5YH) ou meme_variable(VAR, 5YI) ou meme_variable(VAR, 5YJ) ou + meme_variable(VAR, 5YK) ou meme_variable(VAR, 5YL) ou meme_variable(VAR, 5YM) ou + meme_variable(VAR, 5YN) ou meme_variable(VAR, 5YO) ou meme_variable(VAR, 5YP) ou + meme_variable(VAR, 5YQ) ou meme_variable(VAR, 5YR) ou meme_variable(VAR, 5YS) ou + meme_variable(VAR, 5YT) ou meme_variable(VAR, 5YU) ou meme_variable(VAR, 5YX) ou + meme_variable(VAR, 5YY) ou meme_variable(VAR, 5YZ) ou meme_variable(VAR, 5ZA) ou + meme_variable(VAR, 5ZB) ou meme_variable(VAR, 5ZH) ou meme_variable(VAR, 5ZI) ou + meme_variable(VAR, 5ZJ) ou meme_variable(VAR, 5ZK) ou meme_variable(VAR, 5ZL) ou + meme_variable(VAR, 5ZM) ou meme_variable(VAR, 5ZN) ou meme_variable(VAR, 5ZO) ou + meme_variable(VAR, 5ZP) ou meme_variable(VAR, 5ZQ) ou meme_variable(VAR, 5ZR) ou + meme_variable(VAR, 5ZS) ou meme_variable(VAR, 5ZT) ou meme_variable(VAR, 5ZU) ou + meme_variable(VAR, 5ZW) ou meme_variable(VAR, 5ZX) ou meme_variable(VAR, 5ZY) ou + meme_variable(VAR, 5ZZ); + diff --git a/m_ext/2022/commence_par_7.m b/m_ext/2022/commence_par_7.m new file mode 100644 index 000000000..b96e4f2f7 --- /dev/null +++ b/m_ext/2022/commence_par_7.m @@ -0,0 +1,164 @@ +cible alias_commence_par_7: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 7DL) ou meme_variable(VAR, 7VO) ou meme_variable(VAR, 7WT) + ou meme_variable(VAR, 7WU) ou meme_variable(VAR, 7WV) ou meme_variable(VAR, 7WW) + ou meme_variable(VAR, 7YM) ou meme_variable(VAR, 7YN) ou meme_variable(VAR, 7YO) + ou meme_variable(VAR, 7YP) ou meme_variable(VAR, 7YT) ou meme_variable(VAR, 7YU) + ou meme_variable(VAR, 7YV) ou meme_variable(VAR, 7YW) ou meme_variable(VAR, 7LQ) + ou meme_variable(VAR, 7LR) ou meme_variable(VAR, 7LU) ou meme_variable(VAR, 7LV) + ou meme_variable(VAR, 7GN) ou meme_variable(VAR, 7FN) ou meme_variable(VAR, 7AA) + ou meme_variable(VAR, 7AB) ou meme_variable(VAR, 7AD) ou meme_variable(VAR, 7AF) + ou meme_variable(VAR, 7AH) ou meme_variable(VAR, 7AI) ou meme_variable(VAR, 7AP) + ou meme_variable(VAR, 7AR) ou meme_variable(VAR, 7AS) ou meme_variable(VAR, 7AT) + ou meme_variable(VAR, 7AU) ou meme_variable(VAR, 7BA) ou meme_variable(VAR, 7BB) + ou meme_variable(VAR, 7BC) ou meme_variable(VAR, 7BD) ou meme_variable(VAR, 7BE) + ou meme_variable(VAR, 7BF) ou meme_variable(VAR, 7BG) ou meme_variable(VAR, 7BH) + ou meme_variable(VAR, 7BJ) ou meme_variable(VAR, 7BK) ou meme_variable(VAR, 7BL) + ou meme_variable(VAR, 7BM) ou meme_variable(VAR, 7BN) ou meme_variable(VAR, 7BO) + ou meme_variable(VAR, 7BS) ou meme_variable(VAR, 7BT) ou meme_variable(VAR, 7CA) + ou meme_variable(VAR, 7CH) ou meme_variable(VAR, 7CI) ou meme_variable(VAR, 7CR) + ou meme_variable(VAR, 7CS) ou meme_variable(VAR, 7CT) ou meme_variable(VAR, 7CV) + ou meme_variable(VAR, 7CX) ou meme_variable(VAR, 7CY) ou meme_variable(VAR, 7DC) + ou meme_variable(VAR, 7DR) ou meme_variable(VAR, 7DY) ou meme_variable(VAR, 7EK) + ou meme_variable(VAR, 7EN) ou meme_variable(VAR, 7EY) ou meme_variable(VAR, 7FT) + ou meme_variable(VAR, 7FU) ou meme_variable(VAR, 7FW) ou meme_variable(VAR, 7FX) + ou meme_variable(VAR, 7FY) ou meme_variable(VAR, 7GR) ou meme_variable(VAR, 7GS) + ou meme_variable(VAR, 7GU) ou meme_variable(VAR, 7GW) ou meme_variable(VAR, 7GX) + ou meme_variable(VAR, 7GY) ou meme_variable(VAR, 7HA) ou meme_variable(VAR, 7HB) + ou meme_variable(VAR, 7HD) ou meme_variable(VAR, 7HE) ou meme_variable(VAR, 7HF) + ou meme_variable(VAR, 7HG) ou meme_variable(VAR, 7HH) ou meme_variable(VAR, 7HJ) + ou meme_variable(VAR, 7HK) ou meme_variable(VAR, 7HL) ou meme_variable(VAR, 7HM) + ou meme_variable(VAR, 7HN) ou meme_variable(VAR, 7HO) ou meme_variable(VAR, 7HP) + ou meme_variable(VAR, 7HQ) ou meme_variable(VAR, 7HR) ou meme_variable(VAR, 7HS) + ou meme_variable(VAR, 7HT) ou meme_variable(VAR, 7HU) ou meme_variable(VAR, 7HV) + ou meme_variable(VAR, 7HW) ou meme_variable(VAR, 7HX) ou meme_variable(VAR, 7HY) + ou meme_variable(VAR, 7HZ) ou meme_variable(VAR, 7IA) ou meme_variable(VAR, 7IB) + ou meme_variable(VAR, 7IC) ou meme_variable(VAR, 7IE) ou meme_variable(VAR, 7IF) + ou meme_variable(VAR, 7IG) ou meme_variable(VAR, 7IH) ou meme_variable(VAR, 7IK) + ou meme_variable(VAR, 7IL) ou meme_variable(VAR, 7IO) ou meme_variable(VAR, 7IP) + ou meme_variable(VAR, 7IQ) ou meme_variable(VAR, 7JA) ou meme_variable(VAR, 7JB) + ou meme_variable(VAR, 7JC) ou meme_variable(VAR, 7JD) ou meme_variable(VAR, 7JM) + ou meme_variable(VAR, 7JN) ou meme_variable(VAR, 7JO) ou meme_variable(VAR, 7JP) + ou meme_variable(VAR, 7JQ) ou meme_variable(VAR, 7JR) ou meme_variable(VAR, 7JS) + ou meme_variable(VAR, 7JT) ou meme_variable(VAR, 7JU) ou meme_variable(VAR, 7JV) + ou meme_variable(VAR, 7JW) ou meme_variable(VAR, 7JX) ou meme_variable(VAR, 7JY) + ou meme_variable(VAR, 7JZ) ou meme_variable(VAR, 7KC) ou meme_variable(VAR, 7KD) + ou meme_variable(VAR, 7KE) ou meme_variable(VAR, 7KF) ou meme_variable(VAR, 7KG) + ou meme_variable(VAR, 7KH) ou meme_variable(VAR, 7KI) ou meme_variable(VAR, 7KJ) + ou meme_variable(VAR, 7KL) ou meme_variable(VAR, 7KM) ou meme_variable(VAR, 7KN) + ou meme_variable(VAR, 7KO) ou meme_variable(VAR, 7KQ) ou meme_variable(VAR, 7KR) + ou meme_variable(VAR, 7KS) ou meme_variable(VAR, 7KT) ou meme_variable(VAR, 7KU) + ou meme_variable(VAR, 7KV) ou meme_variable(VAR, 7KW) ou meme_variable(VAR, 7KX) + ou meme_variable(VAR, 7KZ) ou meme_variable(VAR, 7LA) ou meme_variable(VAR, 7LB) + ou meme_variable(VAR, 7LC) ou meme_variable(VAR, 7LD) ou meme_variable(VAR, 7LE) + ou meme_variable(VAR, 7LF) ou meme_variable(VAR, 7LG) ou meme_variable(VAR, 7LH) + ou meme_variable(VAR, 7LI) ou meme_variable(VAR, 7LJ) ou meme_variable(VAR, 7LM) + ou meme_variable(VAR, 7LN) ou meme_variable(VAR, 7LT) ou meme_variable(VAR, 7LX) + ou meme_variable(VAR, 7LY) ou meme_variable(VAR, 7LZ) ou meme_variable(VAR, 7MA) + ou meme_variable(VAR, 7MB) ou meme_variable(VAR, 7MC) ou meme_variable(VAR, 7MD) + ou meme_variable(VAR, 7MG) ou meme_variable(VAR, 7MH) ou meme_variable(VAR, 7MI) + ou meme_variable(VAR, 7MJ) ou meme_variable(VAR, 7MK) ou meme_variable(VAR, 7ML) + ou meme_variable(VAR, 7MM) ou meme_variable(VAR, 7MN) ou meme_variable(VAR, 7MO) + ou meme_variable(VAR, 7MP) ou meme_variable(VAR, 7MQ) ou meme_variable(VAR, 7MR) + ou meme_variable(VAR, 7MS) ou meme_variable(VAR, 7MT) ou meme_variable(VAR, 7MU) + ou meme_variable(VAR, 7MV) ou meme_variable(VAR, 7MW) ou meme_variable(VAR, 7MX) + ou meme_variable(VAR, 7MY) ou meme_variable(VAR, 7MZ) ou meme_variable(VAR, 7NA) + ou meme_variable(VAR, 7NB) ou meme_variable(VAR, 7NC) ou meme_variable(VAR, 7ND) + ou meme_variable(VAR, 7NE) ou meme_variable(VAR, 7NF) ou meme_variable(VAR, 7NG) + ou meme_variable(VAR, 7NH) ou meme_variable(VAR, 7NI) ou meme_variable(VAR, 7NJ) + ou meme_variable(VAR, 7NK) ou meme_variable(VAR, 7NL) ou meme_variable(VAR, 7NM) + ou meme_variable(VAR, 7NN) ou meme_variable(VAR, 7NX) ou meme_variable(VAR, 7NY) + ou meme_variable(VAR, 7OF) ou meme_variable(VAR, 7OG) ou meme_variable(VAR, 7OH) + ou meme_variable(VAR, 7OI) ou meme_variable(VAR, 7OJ) ou meme_variable(VAR, 7OK) + ou meme_variable(VAR, 7OL) ou meme_variable(VAR, 7OM) ou meme_variable(VAR, 7ON) + ou meme_variable(VAR, 7OO) ou meme_variable(VAR, 7OP) ou meme_variable(VAR, 7OQ) + ou meme_variable(VAR, 7OR) ou meme_variable(VAR, 7OS) ou meme_variable(VAR, 7OT) + ou meme_variable(VAR, 7OW) ou meme_variable(VAR, 7OX) ou meme_variable(VAR, 7OY) + ou meme_variable(VAR, 7OZ) ou meme_variable(VAR, 7PA) ou meme_variable(VAR, 7PB) + ou meme_variable(VAR, 7PC) ou meme_variable(VAR, 7PD) ou meme_variable(VAR, 7PE) + ou meme_variable(VAR, 7PF) ou meme_variable(VAR, 7PG) ou meme_variable(VAR, 7PI) + ou meme_variable(VAR, 7PJ) ou meme_variable(VAR, 7PP) ou meme_variable(VAR, 7PQ) + ou meme_variable(VAR, 7PR) ou meme_variable(VAR, 7PS) ou meme_variable(VAR, 7PT) + ou meme_variable(VAR, 7PU) ou meme_variable(VAR, 7PV) ou meme_variable(VAR, 7PW) + ou meme_variable(VAR, 7PX) ou meme_variable(VAR, 7PY) ou meme_variable(VAR, 7PZ) + ou meme_variable(VAR, 7QA) ou meme_variable(VAR, 7QB) ou meme_variable(VAR, 7QC) + ou meme_variable(VAR, 7QD) ou meme_variable(VAR, 7QE) ou meme_variable(VAR, 7QF) + ou meme_variable(VAR, 7QH) ou meme_variable(VAR, 7QI) ou meme_variable(VAR, 7QJ) + ou meme_variable(VAR, 7QK) ou meme_variable(VAR, 7QL) ou meme_variable(VAR, 7QM) + ou meme_variable(VAR, 7QN) ou meme_variable(VAR, 7QO) ou meme_variable(VAR, 7QP) + ou meme_variable(VAR, 7QQ) ou meme_variable(VAR, 7QV) ou meme_variable(VAR, 7QW) + ou meme_variable(VAR, 7QX) ou meme_variable(VAR, 7QY) ou meme_variable(VAR, 7RA) + ou meme_variable(VAR, 7RB) ou meme_variable(VAR, 7RC) ou meme_variable(VAR, 7RD) + ou meme_variable(VAR, 7RE) ou meme_variable(VAR, 7RF) ou meme_variable(VAR, 7RG) + ou meme_variable(VAR, 7RH) ou meme_variable(VAR, 7RI) ou meme_variable(VAR, 7RJ) + ou meme_variable(VAR, 7RK) ou meme_variable(VAR, 7RL) ou meme_variable(VAR, 7RM) + ou meme_variable(VAR, 7RN) ou meme_variable(VAR, 7RP) ou meme_variable(VAR, 7RQ) + ou meme_variable(VAR, 7RT) ou meme_variable(VAR, 7RU) ou meme_variable(VAR, 7RX) + ou meme_variable(VAR, 7RY) ou meme_variable(VAR, 7SA) ou meme_variable(VAR, 7SB) + ou meme_variable(VAR, 7SC) ou meme_variable(VAR, 7SD) ou meme_variable(VAR, 7SE) + ou meme_variable(VAR, 7SF) ou meme_variable(VAR, 7SG) ou meme_variable(VAR, 7SH) + ou meme_variable(VAR, 7SI) ou meme_variable(VAR, 7SJ) ou meme_variable(VAR, 7SK) + ou meme_variable(VAR, 7SL) ou meme_variable(VAR, 7SM) ou meme_variable(VAR, 7SN) + ou meme_variable(VAR, 7SO) ou meme_variable(VAR, 7SP) ou meme_variable(VAR, 7SQ) + ou meme_variable(VAR, 7SR) ou meme_variable(VAR, 7SS) ou meme_variable(VAR, 7SU) + ou meme_variable(VAR, 7SV) ou meme_variable(VAR, 7SW) ou meme_variable(VAR, 7SX) + ou meme_variable(VAR, 7SY) ou meme_variable(VAR, 7TA) ou meme_variable(VAR, 7TB) + ou meme_variable(VAR, 7TE) ou meme_variable(VAR, 7TF) ou meme_variable(VAR, 7TK) + ou meme_variable(VAR, 7TM) ou meme_variable(VAR, 7TO) ou meme_variable(VAR, 7TP) + ou meme_variable(VAR, 7TQ) ou meme_variable(VAR, 7TR) ou meme_variable(VAR, 7TS) + ou meme_variable(VAR, 7TT) ou meme_variable(VAR, 7TU) ou meme_variable(VAR, 7TV) + ou meme_variable(VAR, 7TW) ou meme_variable(VAR, 7TX) ou meme_variable(VAR, 7TY) + ou meme_variable(VAR, 7UA) ou meme_variable(VAR, 7UB) ou meme_variable(VAR, 7UG) + ou meme_variable(VAR, 7UH) ou meme_variable(VAR, 7UI) ou meme_variable(VAR, 7UJ) + ou meme_variable(VAR, 7UU) ou meme_variable(VAR, 7UV) ou meme_variable(VAR, 7UW) + ou meme_variable(VAR, 7UX) ou meme_variable(VAR, 7UY) ou meme_variable(VAR, 7UZ) + ou meme_variable(VAR, 7VH) ou meme_variable(VAR, 7VI) ou meme_variable(VAR, 7VJ) + ou meme_variable(VAR, 7VK) ou meme_variable(VAR, 7VM) ou meme_variable(VAR, 7VN) + ou meme_variable(VAR, 7VQ) ou meme_variable(VAR, 7VR) ou meme_variable(VAR, 7WC) + ou meme_variable(VAR, 7WD) ou meme_variable(VAR, 7WE) ou meme_variable(VAR, 7WF) + ou meme_variable(VAR, 7WG) ou meme_variable(VAR, 7WH) ou meme_variable(VAR, 7WI) + ou meme_variable(VAR, 7WK) ou meme_variable(VAR, 7WQ) ou meme_variable(VAR, 7WS) + ou meme_variable(VAR, 7WX) ou meme_variable(VAR, 7WY) ou meme_variable(VAR, 7WZ) + ou meme_variable(VAR, 7XA) ou meme_variable(VAR, 7XB) ou meme_variable(VAR, 7XC) + ou meme_variable(VAR, 7XH) ou meme_variable(VAR, 7XI) ou meme_variable(VAR, 7XJ) + ou meme_variable(VAR, 7XK) ou meme_variable(VAR, 7XL) ou meme_variable(VAR, 7XM) + ou meme_variable(VAR, 7XN) ou meme_variable(VAR, 7XO) ou meme_variable(VAR, 7XP) + ou meme_variable(VAR, 7XQ) ou meme_variable(VAR, 7XR) ou meme_variable(VAR, 7XV) + ou meme_variable(VAR, 7XX) ou meme_variable(VAR, 7XZ) ou meme_variable(VAR, 7YA) + ou meme_variable(VAR, 7YC) ou meme_variable(VAR, 7YE) ou meme_variable(VAR, 7YG) + ou meme_variable(VAR, 7YI) ou meme_variable(VAR, 7YJ) ou meme_variable(VAR, 7YK) + ou meme_variable(VAR, 7YL) ou meme_variable(VAR, 7YR) ou meme_variable(VAR, 7YS) + ou meme_variable(VAR, 7YX) ou meme_variable(VAR, 7YY) ou meme_variable(VAR, 7YZ) + ou meme_variable(VAR, 7ZI) ou meme_variable(VAR, 7ZJ) ou meme_variable(VAR, 7ZK) + ou meme_variable(VAR, 7ZL) ou meme_variable(VAR, 7ZM) ou meme_variable(VAR, 7ZO) + ou meme_variable(VAR, 7ZP) ou meme_variable(VAR, 7ZQ) ou meme_variable(VAR, 7ZR) + ou meme_variable(VAR, 7ZS) ou meme_variable(VAR, 7ZT) ou meme_variable(VAR, 7ZU) + ou meme_variable(VAR, 7ZV) ou meme_variable(VAR, 7ZW) ou meme_variable(VAR, 7ZX) + ou meme_variable(VAR, 7ZY) ou meme_variable(VAR, 7ZZ) ou meme_variable(VAR, 7UL) + ou meme_variable(VAR, 7DB) ou meme_variable(VAR, 7VC) ou meme_variable(VAR, 7VA) + ou meme_variable(VAR, 7FK) ou meme_variable(VAR, 7FR) ou meme_variable(VAR, 7FV) + ou meme_variable(VAR, 7GQ) ou meme_variable(VAR, 7FQ) ou meme_variable(VAR, 7FM) + ou meme_variable(VAR, 7FL) ou meme_variable(VAR, 7UC) ou meme_variable(VAR, 7DG) + ou meme_variable(VAR, 7UM) ou meme_variable(VAR, 7IN) ou meme_variable(VAR, 7ID) + ou meme_variable(VAR, 7II) ou meme_variable(VAR, 7IJ) ou meme_variable(VAR, 7FG) + ou meme_variable(VAR, 7BI) ou meme_variable(VAR, 7CZ) ou meme_variable(VAR, 7DI) + ou meme_variable(VAR, 7EZ) ou meme_variable(VAR, 7RZ) ou meme_variable(VAR, 7TZ) + ou meme_variable(VAR, 7VX) ou meme_variable(VAR, 7VZ) ou meme_variable(VAR, 7VV) + ou meme_variable(VAR, 7VT) ou meme_variable(VAR, 7DQ) ou meme_variable(VAR, 7WN) + ou meme_variable(VAR, 7WO) ou meme_variable(VAR, 7UK) ou meme_variable(VAR, 7TD) + ou meme_variable(VAR, 7CE) ou meme_variable(VAR, 7FF) ou meme_variable(VAR, 7UF) + ou meme_variable(VAR, 7EC) ou meme_variable(VAR, 7ED) ou meme_variable(VAR, 7EA) + ou meme_variable(VAR, 7EB) ou meme_variable(VAR, 7EF) ou meme_variable(VAR, 7EG) + ou meme_variable(VAR, 7WJ) ou meme_variable(VAR, 7UN) ou meme_variable(VAR, 7UQ) + ou meme_variable(VAR, 7UP) ou meme_variable(VAR, 7GA) ou meme_variable(VAR, 7GE) + ou meme_variable(VAR, 7GB) ou meme_variable(VAR, 7GF) ou meme_variable(VAR, 7GC) + ou meme_variable(VAR, 7GG) ou meme_variable(VAR, 7GD) ou meme_variable(VAR, 7GM) + ou meme_variable(VAR, 7US) ou meme_variable(VAR, 7WP) ou meme_variable(VAR, 7UD) + ou meme_variable(VAR, 7GZ) ou meme_variable(VAR, 7AE) ou meme_variable(VAR, 7AG) + ou meme_variable(VAR, 7AC) ou meme_variable(VAR, 7WL) ou meme_variable(VAR, 7XS) + ou meme_variable(VAR, 7XT) ou meme_variable(VAR, 7XU) ou meme_variable(VAR, 7XW) + ou meme_variable(VAR, 7XY) ou meme_variable(VAR, 7TJ) ou meme_variable(VAR, 7IM) + ou meme_variable(VAR, 7NZ) ou meme_variable(VAR, 7WR) ou meme_variable(VAR, 7FH) + ou meme_variable(VAR, 7CD) ou meme_variable(VAR, 7UT) ou meme_variable(VAR, 7WM); diff --git a/m_ext/2022/commence_par_H.m b/m_ext/2022/commence_par_H.m new file mode 100644 index 000000000..643616a77 --- /dev/null +++ b/m_ext/2022/commence_par_H.m @@ -0,0 +1,47 @@ +cible alias_commence_par_H: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, HDI) ou meme_variable(VAR, HDJ) ou meme_variable(VAR, HDK) + ou meme_variable(VAR, HDM) ou meme_variable(VAR, HDN) ou meme_variable(VAR, HDO) + ou meme_variable(VAR, HDP) ou meme_variable(VAR, HDR) ou meme_variable(VAR, HDS) + ou meme_variable(VAR, HDT) ou meme_variable(VAR, HDU) ou meme_variable(VAR, HDW) + ou meme_variable(VAR, HEN) ou meme_variable(VAR, HEO) ou meme_variable(VAR, HEP) + ou meme_variable(VAR, HER) ou meme_variable(VAR, HES) ou meme_variable(VAR, HET) + ou meme_variable(VAR, HEU) ou meme_variable(VAR, HEW) ou meme_variable(VAR, HFN) + ou meme_variable(VAR, HFO) ou meme_variable(VAR, HFP) ou meme_variable(VAR, HFR) + ou meme_variable(VAR, HFS) ou meme_variable(VAR, HFT) ou meme_variable(VAR, HFU) + ou meme_variable(VAR, HFW) ou meme_variable(VAR, HGS) ou meme_variable(VAR, HGT) + ou meme_variable(VAR, HGU) ou meme_variable(VAR, HGW) ou meme_variable(VAR, HHC) + ou meme_variable(VAR, HHS) ou meme_variable(VAR, HHT) ou meme_variable(VAR, HHU) + ou meme_variable(VAR, HHW) ou meme_variable(VAR, HIC) ou meme_variable(VAR, HIS) + ou meme_variable(VAR, HIT) ou meme_variable(VAR, HIU) ou meme_variable(VAR, HIV) + ou meme_variable(VAR, HIW) ou meme_variable(VAR, HJA) ou meme_variable(VAR, HJC) + ou meme_variable(VAR, HKC) ou meme_variable(VAR, HOD) ou meme_variable(VAR, HOE) + ou meme_variable(VAR, HOF) ou meme_variable(VAR, HOG) ou meme_variable(VAR, HOX) + ou meme_variable(VAR, HOY) ou meme_variable(VAR, HOZ) ou meme_variable(VAR, HUA) + ou meme_variable(VAR, HUB) ou meme_variable(VAR, HUC) ou meme_variable(VAR, HUD) + ou meme_variable(VAR, HUE) ou meme_variable(VAR, HUF) ou meme_variable(VAR, HUG) + ou meme_variable(VAR, HUH) ou meme_variable(VAR, HUI) ou meme_variable(VAR, HUJ) + ou meme_variable(VAR, HUK) ou meme_variable(VAR, HUL) ou meme_variable(VAR, HUM) + ou meme_variable(VAR, HUN) ou meme_variable(VAR, HUO) ou meme_variable(VAR, HUP) + ou meme_variable(VAR, HUQ) ou meme_variable(VAR, HUR) ou meme_variable(VAR, HUS) + ou meme_variable(VAR, HUT) ou meme_variable(VAR, HUU) ou meme_variable(VAR, HVA) + ou meme_variable(VAR, HVB) ou meme_variable(VAR, HVC) ou meme_variable(VAR, HVD) + ou meme_variable(VAR, HVE) ou meme_variable(VAR, HVF) ou meme_variable(VAR, HVG) + ou meme_variable(VAR, HVH) ou meme_variable(VAR, HVI) ou meme_variable(VAR, HVJ) + ou meme_variable(VAR, HVK) ou meme_variable(VAR, HVL) ou meme_variable(VAR, HXQ) + ou meme_variable(VAR, HXR) ou meme_variable(VAR, HXS) ou meme_variable(VAR, HXT) + ou meme_variable(VAR, HXU) ou meme_variable(VAR, HYA) ou meme_variable(VAR, HYB) + ou meme_variable(VAR, HYC) ou meme_variable(VAR, HYD) ou meme_variable(VAR, HYE) + ou meme_variable(VAR, HYF) ou meme_variable(VAR, HYG) ou meme_variable(VAR, HQL) + ou meme_variable(VAR, HQT) ou meme_variable(VAR, HQC) ou meme_variable(VAR, HQM) + ou meme_variable(VAR, HQB) ou meme_variable(VAR, HQD) ou meme_variable(VAR, HOA) + ou meme_variable(VAR, HOB) ou meme_variable(VAR, HOC) ou meme_variable(VAR, HOH) + ou meme_variable(VAR, HOI) ou meme_variable(VAR, HOJ) ou meme_variable(VAR, HOK) + ou meme_variable(VAR, HOL) ou meme_variable(VAR, HOM) ou meme_variable(VAR, HON) + ou meme_variable(VAR, HOO) ou meme_variable(VAR, HOP) ou meme_variable(VAR, HOQ) + ou meme_variable(VAR, HOR) ou meme_variable(VAR, HOS) ou meme_variable(VAR, HOT) + ou meme_variable(VAR, HOU) ou meme_variable(VAR, HOV) ou meme_variable(VAR, HOW) + ou meme_variable(VAR, HQA); + diff --git a/m_ext/2022/correctif.m b/m_ext/2022/correctif.m new file mode 100644 index 000000000..2d14c024c --- /dev/null +++ b/m_ext/2022/correctif.m @@ -0,0 +1,7006 @@ +# correctif + +MAX_ID_EVT: calculee primrest = 0 : "" ; + +TMP_ARG1 : calculee primrest = 0 : "" ; +TMP_ARG2 : calculee primrest = 0 : "" ; +TMP_ARG3 : calculee primrest = 0 : "" ; +TMP_ARG4 : calculee primrest = 0 : "" ; +TMP_ARG5 : calculee primrest = 0 : "" ; +TMP_ARG6 : calculee primrest = 0 : "" ; +TMP_ARG7 : calculee primrest = 0 : "" ; +TMP_ARG8 : calculee primrest = 0 : "" ; +TMP_ARG9 : calculee primrest = 0 : "" ; +TMP_RES : calculee primrest = 0 : "" ; +TMP_RES1 : calculee primrest = 0 : "" ; +TMP_RES2 : calculee primrest = 0 : "" ; +TMP_RES3 : calculee primrest = 0 : "" ; +TMP_RES4 : calculee primrest = 0 : "" ; + +N_INDEFINIE : const = 0; +N_REVENU : const = 1; +N_CHARGE : const = 2; + +SENS_R : const = 0; +SENS_M : const = 1; +SENS_P : const = 2; +SENS_C : const = 3; + +SF_INVALIDE : const = 0; +SF_MARIAGE : const = 1; +SF_CELIBAT : const = 2; +SF_DIVORCE : const = 3; +SF_PACSE : const = 4; +SF_VEUVAGE_TRUE : const = 5; +SF_VEUVAGE_FALSE : const = 6; + +TL_TL_ACQUISE : const = 0; +TL_TL_DEFAUT_2042 : const = 1; +TL_TL_MAUVAISE_FOI : const = 2; + +MAJ_TL : const = 0; +MAJ_NON_TL : const = 1; +MAJ_TL15 : const = 2; +MAJ_NON_TL15 : const = 3; +MAJ_RAPPEL_C : const = 4; +MAJ_RAPPEL_CP : const = 5; +MAJ_RAPPEL_CP01 : const = 6; +MAJ_RAPPEL_CP22 : const = 7; +MAJ_RAPPEL_CP24 : const = 8; +MAJ_RAPPEL_F : const = 9; +MAJ_RAPPEL_NF : const = 10; +MAJ_RAPPEL_M : const = 11; +MAJ_RAPPEL_MF : const = 12; +MAJ_RAPPEL_NON_M : const = 13; +MAJ_RAPPEL_P : const = 14; +MAJ_RAPPEL_R : const = 15; +MAJ_RAPPEL_R55 : const = 16; +MAJ_1728 : const = 17; +MAJ_ABAT_20 : const = 18; +MAJ_CODE_1729_2A5 : const = 19; +MAJ_CODE_1729_6 : const = 20; +MAJ_CODE_22 : const = 21; +MAJ_CODE_24 : const = 22; +MAJ_CONTEXTE_22 : const = 23; +MAJ_MENTION_EXP_99 : const = 24; +MAJ_MENTION_EXP_99R : const = 25; +MAJ_NON_MENTION_EXP : const = 26; + +INR_FLAG_INR_NON_TL : const = 2; +INR_FLAG_INR_TL : const = 3; + +ID_SANS_TRAITEMENT : const = 0; +ID_CUMULE_CHAMP_BASE_TL : const = 1; +ID_CUMULE_BASE_TL_INIT : const = 2; +ID_CUMULE_CHAMP_BASE_TL_RECT : const = 3; +ID_TRAITE_MAJO_P : const = 4; + + +cible init_variables: +application: iliad; +GLOBAL.ANNEE_REVENU = GLOBAL.V_ANREV; +GLOBAL.NB_STRATES = 26; +GLOBAL.MAX_ID_EVT = -2; +# Données globales +GLOBAL.PRESENT_8VV = 0; +GLOBAL.PRESENT_8VW = 0; +GLOBAL.PRESENT_9YT = 0; +GLOBAL.MONTANT_9YT = 0; +GLOBAL.PENALITE_9YT = 0; +GLOBAL.SENS_9YT = SENS_R; +GLOBAL.NUM_EVT_9YT = 0; +GLOBAL.IND_20_9YT = 0; +GLOBAL.BASE_TL_9YT = 0; +GLOBAL.PRESENT_9YU = 0; +GLOBAL.MONTANT_9YU = 0; +GLOBAL.PENALITE_9YU = 0; +GLOBAL.SENS_9YU = SENS_R; +GLOBAL.NUM_EVT_9YU = 0; +GLOBAL.DATE_9YU = 0; +GLOBAL.PRESENT_9XT = 0; +GLOBAL.MONTANT_9XT = 0; +GLOBAL.PENALITE_9XT = 0; +GLOBAL.SENS_9XT = SENS_R; +GLOBAL.NUM_EVT_9XT = 0; +GLOBAL.IND_20_9XT = 0; +GLOBAL.BASE_TL_9XT = 0; +GLOBAL.PRESENT_9XU = 0; +GLOBAL.MONTANT_9XU = 0; +GLOBAL.PENALITE_9XU = 0; +GLOBAL.SENS_9XU = SENS_R; +GLOBAL.NUM_EVT_9XU = 0; +GLOBAL.DATE_9XU = 0; +GLOBAL.PRESENT_REGCO = 0; +GLOBAL.PENALITE_REGCO = 0; +GLOBAL.NUM_EVT_REGCO = 0; +GLOBAL.NUM_RAP_REGCO = 0; +GLOBAL.IND_20_REGCO = 0; +GLOBAL.PREMIER_EVT = 0; +GLOBAL.CODE_9ZA = 0; +GLOBAL.SAUVE_INR_R99 = 0; +GLOBAL.ANNEE_DECES_CONJOINT = 0; +GLOBAL.NB_RAPPELS_RES = 0; +# sommes inr 2 +GLOBAL.INR_SOMMEBAND_2 = 0; +GLOBAL.INR_SOMMEBA_2 = 0; +GLOBAL.INR_SOMMEBICND_2 = 0; +GLOBAL.INR_SOMMEBIC_2 = 0; +GLOBAL.INR_SOMMEBNCND_2 = 0; +GLOBAL.INR_SOMMEBNC_2 = 0; +GLOBAL.INR_SOMMEGLOBAL_2 = 0; +GLOBAL.INR_SOMMEGLOBND_2 = 0; +GLOBAL.INR_SOMMELOC_2 = 0; +GLOBAL.INR_SOMMEMOND_2 = 0; +GLOBAL.INR_SOMMERCM_2 = 0; +GLOBAL.INR_SOMMERF_2 = 0; +GLOBAL.INR_SOMMERI_2 = 0; +# Données de Reference +GLOBAL.D2042_NB = 0; +GLOBAL.DEFAUT = 0; +GLOBAL.DEFAUT10 = 0; +GLOBAL.DEFAUT11 = 0; +GLOBAL.DEFAUT1011 = 0; +GLOBAL.RETARD = 0; +GLOBAL.RETARD07 = 0; +GLOBAL.RETARD08 = 0; +GLOBAL.RETARD0718 = 0; +GLOBAL.RETARD101718 = 0; +GLOBAL.RETARD22 = 0; +GLOBAL.RETARD99 = 0; +GLOBAL.RECTIF = 0; +GLOBAL.RECTIF_MAJO = 0; +GLOBAL.MENTION_EXP = 0; +GLOBAL.CORR_RJLJ = 0; +GLOBAL.CODE_PENA = 0; +GLOBAL.CODE_PENA_ISF = 0; +GLOBAL.DATE = 0; +GLOBAL.SF_INITIALE = SF_INVALIDE; +GLOBAL.SF_COURANTE = SF_INVALIDE; +GLOBAL.SF_PRIMITIF = 0; +GLOBAL.R_TARDIF = 0; +GLOBAL.LIMELIGHT = 0; +GLOBAL.ISF_PRIM = 0; +GLOBAL.PRESENT_R10 = 0; +GLOBAL.PRESENT_R30 = 0; +GLOBAL.PRESENT_R32 = 0; +GLOBAL.PREM_8_11 = 0; +GLOBAL.PENA_994 = 0; +GLOBAL.FLAGMENC = 0; +# tl +GLOBAL.TL_D2042_NB = 0; +GLOBAL.TL_D2042_INIT_NB = 0; +GLOBAL.TL_D2042_RECT_NB = 0; +GLOBAL.TL_BASE_TL = 0; +GLOBAL.TL_BASE_TL_INIT = 0; +GLOBAL.TL_BASE_TL_RECT = 0; +GLOBAL.TL_BASE_TL_TBTC = 0; +GLOBAL.TL_BASE_TL_TBTC_INIT = 0; +GLOBAL.TL_BASE_TL_TBTC_RECT = 0; +GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +# tl mauvaise foi +GLOBAL.TL_MF_MFCDIS = 0; +GLOBAL.TL_MF_MFCHR = 0; +GLOBAL.TL_MF_MFCHR7 = 0; +GLOBAL.TL_MF_MFCS = 0; +GLOBAL.TL_MF_MFCSAL = 0; +GLOBAL.TL_MF_MFCVN = 0; +GLOBAL.TL_MF_MFGAIN = 0; +GLOBAL.TL_MF_MFGLO = 0; +GLOBAL.TL_MF_MFIFI = 0; +GLOBAL.TL_MF_MFIR = 0; +GLOBAL.TL_MF_MFLOY = 0; +GLOBAL.TL_MF_MFMCSG820 = 0; +GLOBAL.TL_MF_MFPCAP = 0; +GLOBAL.TL_MF_MFPS = 0; +GLOBAL.TL_MF_MFPSOL = 0; +GLOBAL.TL_MF_MFRD = 0; +GLOBAL.TL_MF_MFREGV = 0; +GLOBAL.TL_MF_MFRSE1 = 0; +GLOBAL.TL_MF_MFRSE2 = 0; +GLOBAL.TL_MF_MFRSE3 = 0; +GLOBAL.TL_MF_MFRSE4 = 0; +GLOBAL.TL_MF_MFRSE5 = 0; +GLOBAL.TL_MF_MFRSE6 = 0; +GLOBAL.TL_MF_MFRSE7 = 0; +GLOBAL.TL_MF_MFTAXAGA = 0; +# inr +GLOBAL.INR_NB_MOIS = 0; +GLOBAL.INR_NB_MOIS2 = 0; +GLOBAL.INR_NB_MOIS_ISF = 0; +GLOBAL.INR_ANNEE_COR = 0; +GLOBAL.INR_PASDINR = 0; +# majo +GLOBAL.MAJO_D2042_STRATE_NB = 0; +GLOBAL.MAJO_D2042_P_NB = 0; +GLOBAL.MAJO_TAUX_STRATE = 0; +GLOBAL.MAJO_CODE_STRATE = 0; +GLOBAL.MAJO_TARDIF_EVT2 = 0; +GLOBAL.MAJO_STR_TR_00 = 0; +GLOBAL.MAJO_STR_TR_01 = 0; +GLOBAL.MAJO_STR_TR_02 = 0; +GLOBAL.MAJO_STR_TR_03 = 0; +GLOBAL.MAJO_STR_TR_04 = 0; +GLOBAL.MAJO_STR_TR_05 = 0; +GLOBAL.MAJO_STR_TR_06 = 0; +GLOBAL.MAJO_STR_TR_07 = 0; +GLOBAL.MAJO_STR_TR_08 = 0; +GLOBAL.MAJO_STR_TR_09 = 0; +GLOBAL.MAJO_STR_TR_10 = 0; +GLOBAL.MAJO_STR_TR_11 = 0; +GLOBAL.MAJO_STR_TR_12 = 0; +GLOBAL.MAJO_STR_TR_13 = 0; +GLOBAL.MAJO_STR_TR_14 = 0; +GLOBAL.MAJO_STR_TR_15 = 0; +GLOBAL.MAJO_STR_TR_16 = 0; +GLOBAL.MAJO_STR_TR_17 = 0; +GLOBAL.MAJO_STR_TR_18 = 0; +GLOBAL.MAJO_STR_TR_19 = 0; +GLOBAL.MAJO_STR_TR_20 = 0; +GLOBAL.MAJO_STR_TR_21 = 0; +GLOBAL.MAJO_STR_TR_22 = 0; +GLOBAL.MAJO_STR_TR_23 = 0; +GLOBAL.MAJO_STR_TR_24 = 0; +GLOBAL.MAJO_STR_TR_25 = 0; +GLOBAL.MAJO_PREM_STR = 0; +GLOBAL.MAJO_NB_STR_TR = 0; +GLOBAL.MAJO_DERN_STR_TR = 0; +GLOBAL.MAJO_NUM_STRATE = 0; +# prorata +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; +# art1731 +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +cible signaler_erreurs: +application: iliad; +si nb_anomalies() > 0 alors + nettoie_erreurs_finalisees; + finalise_erreurs; + exporte_erreurs; + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +sinon + finalise_erreurs; +finsi + +cible signaler_erreur_ano: +application: iliad; +finalise_erreurs; +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) +stop application; + +cible init_majo_str_tr : +application: iliad; +arguments: I, B; +aiguillage (I) : ( + cas 0: MAJO_STR_TR_00 = B; + cas 1: MAJO_STR_TR_01 = B; + cas 2: MAJO_STR_TR_02 = B; + cas 3: MAJO_STR_TR_03 = B; + cas 4: MAJO_STR_TR_04 = B; + cas 5: MAJO_STR_TR_05 = B; + cas 6: MAJO_STR_TR_06 = B; + cas 7: MAJO_STR_TR_07 = B; + cas 8: MAJO_STR_TR_08 = B; + cas 9: MAJO_STR_TR_09 = B; + cas 10: MAJO_STR_TR_10 = B; + cas 11: MAJO_STR_TR_11 = B; + cas 12: MAJO_STR_TR_12 = B; + cas 13: MAJO_STR_TR_13 = B; + cas 14: MAJO_STR_TR_14 = B; + cas 15: MAJO_STR_TR_15 = B; + cas 16: MAJO_STR_TR_16 = B; + cas 17: MAJO_STR_TR_17 = B; + cas 18: MAJO_STR_TR_18 = B; + cas 19: MAJO_STR_TR_19 = B; + cas 20: MAJO_STR_TR_20 = B; + cas 21: MAJO_STR_TR_21 = B; + cas 22: MAJO_STR_TR_22 = B; + cas 23: MAJO_STR_TR_23 = B; + cas 24: MAJO_STR_TR_24 = B; + cas 25: MAJO_STR_TR_25 = B; +) + +cible set_majo_str_tr: +application: iliad; +arguments: I; +variables_temporaires: B; +B = 1; +calculer cible init_majo_str_tr : avec I, B; + +cible set_majo_str_tr_proc: +application: iliad; +variables_temporaires: I; +I = TMP_ARG1; +calculer cible set_majo_str_tr : avec I; + +cible unset_majo_str_tr: +application: iliad; +arguments: I; +variables_temporaires: B; +B = 0; +calculer cible init_majo_str_tr : avec I, B; + +cible unset_majo_str_tr_proc: +application: iliad; +variables_temporaires: I; +I = TMP_ARG1; +calculer cible unset_majo_str_tr : avec I; + +cible clear_majo_str_tr: +application: iliad; +iterer : variable I : entre 0..25 increment 1 : dans ( + calculer cible unset_majo_str_tr : avec I; +) + +cible affect_str_tr: +application: iliad; +CORR.STR_TR00 = MAJO_STR_TR_00; +CORR.STR_TR01 = MAJO_STR_TR_01; +CORR.STR_TR02 = MAJO_STR_TR_02; +CORR.STR_TR03 = MAJO_STR_TR_03; +CORR.STR_TR04 = MAJO_STR_TR_04; +CORR.STR_TR05 = MAJO_STR_TR_05; +CORR.STR_TR06 = MAJO_STR_TR_06; +CORR.STR_TR07 = MAJO_STR_TR_07; +CORR.STR_TR08 = MAJO_STR_TR_08; +CORR.STR_TR09 = MAJO_STR_TR_09; +CORR.STR_TR10 = MAJO_STR_TR_10; +CORR.STR_TR11 = MAJO_STR_TR_11; +CORR.STR_TR12 = MAJO_STR_TR_12; +CORR.STR_TR13 = MAJO_STR_TR_13; +CORR.STR_TR14 = MAJO_STR_TR_14; +CORR.STR_TR15 = MAJO_STR_TR_15; +CORR.STR_TR16 = MAJO_STR_TR_16; +CORR.STR_TR17 = MAJO_STR_TR_17; +CORR.STR_TR18 = MAJO_STR_TR_18; +CORR.STR_TR19 = MAJO_STR_TR_19; +CORR.STR_TR20 = MAJO_STR_TR_20; +CORR.STR_TR21 = MAJO_STR_TR_21; +CORR.STR_TR22 = MAJO_STR_TR_22; +CORR.STR_TR23 = MAJO_STR_TR_23; +CORR.STR_TR24 = MAJO_STR_TR_24; +CORR.STR_TR25 = MAJO_STR_TR_25; + +cible enchaine_calcul_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible effacer_base_etc : espace GLOBAL; + calculer cible traite_double_liquidation_2_prim; + calculer cible sauve_base_initial_prim; + calculer cible sauve_base_1728_prim; + calculer cible sauve_base_anterieure_prim; + calculer cible sauve_base_anterieure_cor_prim; + calculer cible sauve_base_inr_inter22_prim; +sinon + GLOBAL.V_ACO_MTAP = 0; + GLOBAL.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_prim; +finsi + +cible enchaine_calcul_corr: +application: iliad; +si CORR.V_IND_TRAIT = 1 alors + calculer cible effacer_base_etc : espace CORR; + calculer cible traite_double_liquidation_2_corr; + calculer cible sauve_base_initial_corr; + calculer cible sauve_base_1728_corr; + calculer cible sauve_base_anterieure_corr; + calculer cible sauve_base_anterieure_cor_corr; + calculer cible sauve_base_inr_inter22_corr; +sinon + CORR.V_ACO_MTAP = 0; + CORR.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_corr; +finsi + +cible enchaine_verification_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_prim; +sinon + calculer cible verif_saisie_cohe_corrective_prim; +finsi + +cible enchaine_verification_corr: +application: iliad; +si CORR.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_corr; +sinon + calculer cible verif_saisie_cohe_corrective_corr; +finsi + +cible reset_saisie_calc: +application: iliad; +variables_temporaires: IND_TRAIT_SAV; +IND_TRAIT_SAV = CORR.V_IND_TRAIT; +iterer +: variable V +: categorie saisie *, calculee +: espace CORR +: dans ( + V = indefini; +) +CORR.V_IND_TRAIT = IND_TRAIT_SAV; + +cible reset_codes_rappel: +application: iliad; +CORR.PEN_RAPPEL = indefini; +CORR.MOIS_RAPPEL = indefini; +CORR.ANNEE_RAPPEL = indefini; +CORR.SENS_RAPPEL = indefini; +CORR.MONT_RAPPEL = indefini; +CORR.NUM_RAPPEL = indefini; +CORR.AB20_RAPPEL = indefini; +CORR.EVT_RAPPEL = indefini; +CORR.BTOL_RAPPEL = indefini; +CORR.COD_RAPPEL = indefini; + +cible add_majo_T_RABP: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABP07 = GLOBAL.MAJO_T_RABP07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABP08 = GLOBAL.MAJO_T_RABP08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABP09 = GLOBAL.MAJO_T_RABP09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABP10 = GLOBAL.MAJO_T_RABP10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABP11 = GLOBAL.MAJO_T_RABP11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABP12 = GLOBAL.MAJO_T_RABP12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABP17 = GLOBAL.MAJO_T_RABP17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABP31 = GLOBAL.MAJO_T_RABP31 + MONTANT; +) + +cible add_majo_T_RABPPS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31 + MONTANT; +) + +cible add_majo_T_RABPCS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31 + MONTANT; +) + +cible add_majo_T_RABPRD: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31 + MONTANT; +) + +cible add_majo_T_RABPCH: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31 + MONTANT; +) +cible add_majo_T_RABPLO: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31 + MONTANT; +) + +cible contexte_2042_INR: +application: iliad; +CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; +CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; +CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; +CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; +CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; +CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; +CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; +CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; +CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; +CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; +CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; +CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; +CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; + +cible contexte_2042_TL_Ref: +application: iliad; +CORR.SOMMEBAND_2 = 0; +CORR.SOMMEBA_2 = 0; +CORR.SOMMEBICND_2 = 0; +CORR.SOMMEBIC_2 = 0; +CORR.SOMMEBNCND_2 = 0; +CORR.SOMMEBNC_2 = 0; +CORR.SOMMEGLOBAL_2 = 0; +CORR.SOMMEGLOBND_2 = 0; +CORR.SOMMELOC_2 = 0; +CORR.SOMMEMOND_2 = 0; +CORR.SOMMERCM_2 = 0; +CORR.SOMMERF_2 = 0; +CORR.SOMMERI_2 = 0; + +cible affect_code: +application: iliad; +variables_temporaires: PENA, I; + si RETARD > 0 alors + PENA = GLOBAL.CODE_PENA; + sinon + PENA = GLOBAL.MAJO_CODE_STRATE; + finsi + aiguillage (PENA) : ( + cas 1 : I = 25; + cas 2 : I = 23; + cas 3 : I = 14; + cas 4 : I = 9; + cas 5 : I = 7; + cas 6 : I = 3; + cas 7 : + cas 18 : I = 17; + cas 8 : I = 12; + cas 10 : I = 16; + cas 11 : I = 11; + cas 17 : I = 15; + cas 22 : I = 24; + cas 30 : I = 10; + cas 31 : I = 6; + cas 32 : I = 5; + cas 35 : I = 9; + cas 55 : I = 13; + cas 99 : I = 0; + cas indefini : + par_defaut : stop cible; + ) + calculer cible set_majo_str_tr : avec I; + +cible remplit_tgv_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_inr_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_p: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_strate: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_STRATE +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_init: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_INIT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible set_rappel_ifi_prim: +application: iliad; +si + GLOBAL.COD9AA != 0 ou GLOBAL.COD9AB != 0 ou GLOBAL.COD9AC != 0 + ou GLOBAL.COD9AD != 0 ou GLOBAL.COD9AE != 0 ou GLOBAL.COD9BA != 0 + ou GLOBAL.COD9BB != 0 ou GLOBAL.COD9CA != 0 ou GLOBAL.COD9GF != 0 + ou GLOBAL.COD9GH != 0 ou GLOBAL.COD9GL != 0 ou GLOBAL.COD9GM != 0 + ou GLOBAL.COD9GN != 0 ou GLOBAL.COD9NC != 0 ou GLOBAL.COD9NG != 0 + ou GLOBAL.COD9PR != 0 ou GLOBAL.COD9PX != 0 ou GLOBAL.COD9RS != 0 + ou GLOBAL.CMAJ_ISF != 0 # 9XT + ou GLOBAL.MOISAN_ISF != 0 # 9XU +alors + GLOBAL.ISF_PRIM = 1; +finsi + +cible calcul_1731: +application: iliad; +calculer cible range_base_corr_corrige; +CORR.VARR30R32 = GLOBAL.ART1731_SOMME_R3032; +CORR.VARR10 = GLOBAL.ART1731_PRESENT_R10; +CORR.VARR30 = GLOBAL.ART1731_PRESENT_R30; +CORR.VARR32 = GLOBAL.ART1731_PRESENT_R32; + +cible init_1731: +application: iliad; +CORR.VARR30R32 = 0; +CORR.FLAG_INR_REF = 0; +CORR.PREM8_11 = GLOBAL.PREM_8_11; +CORR.PENA994 = GLOBAL.PENA_994; + +cible empty_art1731: +application: iliad; +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +fonction vers_nature: +application: iliad; +arguments: ATTR; +resultat: NAT; +si ATTR = 0 alors + NAT = N_REVENU; +sinon_si ATTR = 1 alors + NAT = N_CHARGE; +sinon + NAT = N_INDEFINIE; +finsi + +cible get_nature: +application: iliad; +arguments: NATURE, VAR; +NATURE = 0; +si + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + si dans_domaine(VAR, saisie contexte) alors + NATURE = vers_nature(attribut(VAR, modcat)); + sinon_si + # Il s'agit de la même condition qu'au dessus ? + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon_si dans_domaine(VAR, calculee *) alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon + NATURE = N_INDEFINIE; + finsi +sinon_si dans_domaine(VAR, saisie contexte) alors + si meme_variable(VAR, V_REGCO) alors + NATURE = N_REVENU; + sinon_si + meme_variable(VAR, V_EAG) + ou meme_variable(VAR, V_EAD) + ou meme_variable(VAR, V_CNR) + ou meme_variable(VAR, V_CNR2) + ou meme_variable(VAR, V_CR2) + alors + NATURE = N_CHARGE; + sinon + NATURE = N_REVENU; + finsi +sinon_si + dans_domaine(VAR, saisie variation) + ou dans_domaine(VAR, saisie penalite) + ou dans_domaine(VAR, calculee *) +alors + NATURE = N_REVENU; +finsi + +cible get_abat: +application: iliad; +arguments: ABAT, VAR; +si + dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + ABAT = attribut(VAR, ind_abat); +sinon + ABAT = 0; +finsi + +cible calcul_cum_p: +application: iliad; +variables_temporaires: NATURE; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: avec + present(VAR) + et non ( + meme_variable(VAR, DAT) ou meme_variable(VAR, ANTCR) + ou meme_variable(VAR, ANTIR) ou meme_variable(VAR, ANTRE) + ou meme_variable(VAR, CSANT) ou meme_variable(VAR, FORCA) + ou meme_variable(VAR, FORPA) ou meme_variable(VAR, FORVA) + ou meme_variable(VAR, IDANT) ou meme_variable(VAR, NIMPA) + ou meme_variable(VAR, NOTRAIT) ou meme_variable(VAR, PSANT) + ou meme_variable(VAR, RDANT) ou meme_variable(VAR, ANC_BAR) + ou meme_variable(VAR, ACO_MTAP) ou meme_variable(VAR, INDG) + ou meme_variable(VAR, CHRANT) ou meme_variable(VAR, CODILIAD) + ) +: dans ( + calculer cible get_nature : avec NATURE, VAR; + si NATURE = N_REVENU alors + aiguillage( attribut(VAR, cotsoc) ) : ( + cas 1: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + cas 5: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + cas 9: + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + cas 10: + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 11: cas 12: cas 13: cas 14: cas 19: cas 20: cas 21: + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 16: + GLOBAL.MAJO_T_RABPLO = GLOBAL.MAJO_T_RABPLO + VAR; + cas 18: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + ) + finsi +) + +cible process_penalite: +application: iliad; +arguments: PENA_CODE, P; +variables_temporaires: P_MAX, P_OLD, P_MULTI; +P_MAX = inf(PENA_CODE / 1000) % 100; +P_OLD = inf(PENA_CODE / 10) % 100; +P_MULTI = inf(PENA_CODE) % 10; +si P >= P_MAX alors + P_MAX = P; +finsi +si P != P_OLD alors + P_MULTI = si (P_OLD != 0 ou positif(P_MULTI)) alors (1) sinon (0) finsi; + P_OLD = P; +finsi +PENA_CODE = (1000 * P_MAX) + (10 * P_OLD) + P_MULTI; + +fonction get_pMax: +application: iliad; +arguments: CODE; +resultat: R; +R = inf(CODE / 1000); + +fonction get_pMulti: +application: iliad; +arguments: CODE; +resultat: R; +R = positif(inf(CODE) % 10); + +cible detecte_penalites: +application: iliad; +variables_temporaires: + PENA_CODE_I, PENA_CODE_1728, PENA_CODE_ICRP, PENA_CODE_1728CRP, + PENA_CODE_C, PENA_CODE_R, PENA_CODE_P, PENA_CODE_ITAXA, + PENA_CODE_1758AIR, PENA_CODE_1758ATA, PENA_CODE_ICSAL, PENA_CODE_1728CSAL, + PENA_CODE_CSAL, PENA_CODE_ICDIS, PENA_CODE_1728CDIS, PENA_CODE_CDIS, + PENA_CODE_ICAP, PENA_CODE_1728CAP, PENA_CODE_CAP, PENA_CODE_1758ACAP, + PENA_CODE_ICHR, PENA_CODE_1728CHR, PENA_CODE_CHR, PENA_CODE_1758ACHR, + PENA_CODE_IISF, PENA_CODE_1728ISF, PENA_CODE_ISF, PENA_CODE_IGAIN, + PENA_CODE_1728GAIN, PENA_CODE_GAIN, PENA_CODE_IRSE1, PENA_CODE_1728RSE1, + PENA_CODE_RSE1, PENA_CODE_IRSE2, PENA_CODE_1728RSE2, PENA_CODE_RSE2, + PENA_CODE_IRSE3, PENA_CODE_1728RSE3, PENA_CODE_RSE3, PENA_CODE_IRSE4, + PENA_CODE_1728RSE4, PENA_CODE_RSE4, PENA_CODE_ICVN, PENA_CODE_1728CVN, + PENA_CODE_CVN, PENA_CODE_IGLO, PENA_CODE_1728GLO, PENA_CODE_GLO, + PENA_CODE_IRSE5, PENA_CODE_1728RSE5, PENA_CODE_RSE5, PENA_CODE_IRSE6, + PENA_CODE_1728RSE6, PENA_CODE_RSE6, PENA_CODE_IRSE7, PENA_CODE_1728RSE7, + PENA_CODE_RSE7, PENA_CODE_IC820, PENA_CODE_1728C820, PENA_CODE_C820, + PENA_CODE_IRSE8, PENA_CODE_1728RSE8, PENA_CODE_RSE8, PENA_CODE_REGV, + CS, SENS, PENA, P; +PENA_CODE_I = 0; +PENA_CODE_1728 = 0; +PENA_CODE_ICRP = 0; +PENA_CODE_1728CRP = 0; +PENA_CODE_C = 0; +PENA_CODE_R = 0; +PENA_CODE_P = 0; +PENA_CODE_ITAXA = 0; +PENA_CODE_1758AIR = 0; +PENA_CODE_1758ATA = 0; +PENA_CODE_ICSAL = 0; +PENA_CODE_1728CSAL = 0; +PENA_CODE_CSAL = 0; +PENA_CODE_ICDIS = 0; +PENA_CODE_1728CDIS = 0; +PENA_CODE_CDIS = 0; +PENA_CODE_ICAP = 0; +PENA_CODE_1728CAP = 0; +PENA_CODE_CAP = 0; +PENA_CODE_1758ACAP = 0; +PENA_CODE_ICHR = 0; +PENA_CODE_1728CHR = 0; +PENA_CODE_CHR = 0; +PENA_CODE_1758ACHR = 0; +PENA_CODE_IISF = 0; +PENA_CODE_1728ISF = 0; +PENA_CODE_ISF = 0; +PENA_CODE_IGAIN = 0; +PENA_CODE_1728GAIN = 0; +PENA_CODE_GAIN = 0; +PENA_CODE_IRSE1 = 0; +PENA_CODE_1728RSE1 = 0; +PENA_CODE_RSE1 = 0; +PENA_CODE_IRSE2 = 0; +PENA_CODE_1728RSE2 = 0; +PENA_CODE_RSE2 = 0; +PENA_CODE_IRSE3 = 0; +PENA_CODE_1728RSE3 = 0; +PENA_CODE_RSE3 = 0; +PENA_CODE_IRSE4 = 0; +PENA_CODE_1728RSE4 = 0; +PENA_CODE_RSE4 = 0; +PENA_CODE_ICVN = 0; +PENA_CODE_1728CVN = 0; +PENA_CODE_CVN = 0; +PENA_CODE_IGLO = 0; +PENA_CODE_1728GLO = 0; +PENA_CODE_GLO = 0; +PENA_CODE_IRSE5 = 0; +PENA_CODE_1728RSE5 = 0; +PENA_CODE_RSE5 = 0; +PENA_CODE_IRSE6 = 0; +PENA_CODE_1728RSE6 = 0; +PENA_CODE_RSE6 = 0; +PENA_CODE_IRSE7 = 0; +PENA_CODE_1728RSE7 = 0; +PENA_CODE_RSE7 = 0; +PENA_CODE_IC820 = 0; +PENA_CODE_1728C820 = 0; +PENA_CODE_C820 = 0; +PENA_CODE_IRSE8 = 0; +PENA_CODE_1728RSE8 = 0; +PENA_CODE_RSE8 = 0; +PENA_CODE_REGV = 0; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + CS = inf(attribut(champ_evenement(R, code), cotsoc)); + SENS = inf(champ_evenement(R, sens)); + PENA = inf(champ_evenement(R, penalite)); + si (GLOBAL.DEFAUT ou GLOBAL.RETARD) et SENS = SENS_R et PENA = 99 + alors + P = GLOBAL.CODE_PENA; + sinon + P = PENA; + finsi + si non (P dans (0, 1, 99)) alors + si P < 7 ou P dans (22, 24, 30, 32, 35, 55) alors + calculer cible process_penalite : avec PENA_CODE_I, P; + finsi + si non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21) + et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_ICRP, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23) + et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_1728CRP, P; + finsi + si CS dans (17, 18) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICVN, P; + finsi + si CS dans (17, 18) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CVN, P; + finsi + si CS = 18 et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGLO, P; + finsi + si CS = 18 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GLO, P; + finsi + si CS dans (19, 20) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE5, P; + finsi + si CS dans (19, 20) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE5, P; + finsi + si CS = 3 alors + calculer cible process_penalite : avec PENA_CODE_ITAXA, P; + finsi + si P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758AIR, P; + finsi + si CS = 3 et P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758ATA, P; + finsi + si CS = 4 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICSAL, P; + finsi + si CS = 4 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CSAL, P; + finsi + si CS = 8 alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACHR, P; + finsi + si CS = 8 et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CHR, P; + finsi + si CS = 9 alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACAP, P; + finsi + si CS = 9 et (P < 7 ou P dans (22, 24, 35, 55 )) alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CAP, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CDIS, P; + finsi + si CS = 15 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGAIN, P; + finsi + si CS = 15 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GAIN, P; + finsi + si CS = 11 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE1, P; + finsi + si CS = 11 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE1, P; + finsi + si CS dans (12, 21) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE2, P; + finsi + si CS dans (12, 21) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE2, P; + finsi + si CS = 13 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE3, P; + finsi + si CS = 13 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE3, P; + finsi + si CS = 14 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE4, P; + finsi + si CS = 14 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE4, P; + finsi + si CS dans (20, 21, 22) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE6, P; + finsi + si CS dans (20, 21, 22) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE6, P; + finsi + si CS = 23 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IC820, P; + finsi + si CS = 23 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728C820, P; + finsi + si CS = 22 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE8, P; + finsi + si CS = 22 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE8, P; + finsi + si (P < 7 ou P = 35) alors + calculer cible process_penalite : avec PENA_CODE_IISF, P; + finsi + si (P dans (3, 4, 5, 7, 8, 10, 11, 17, 18, 22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728ISF, P; + finsi + si CS dans (1, 7, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_C, P; + finsi + si CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23) alors + calculer cible process_penalite : avec PENA_CODE_R, P; + finsi + si CS dans (1, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_P, P; + finsi + si CS dans (17, 18) alors + calculer cible process_penalite : avec PENA_CODE_CVN, P; + finsi + si CS = 7 alors + calculer cible process_penalite : avec PENA_CODE_REGV, P; + finsi + si CS = 4 alors + calculer cible process_penalite : avec PENA_CODE_CSAL, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_CDIS, P; + finsi + si CS = 11 alors + calculer cible process_penalite : avec PENA_CODE_RSE1, P; + finsi + si CS dans (12, 21) alors + calculer cible process_penalite : avec PENA_CODE_RSE2, P; + finsi + si CS = 13 alors + calculer cible process_penalite : avec PENA_CODE_RSE3, P; + finsi + si CS = 14 alors + calculer cible process_penalite : avec PENA_CODE_RSE4, P; + finsi + si CS dans (19, 20) alors + calculer cible process_penalite : avec PENA_CODE_RSE5, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE6, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE7, P; + finsi + si CS = 23 alors + calculer cible process_penalite : avec PENA_CODE_C820, P; + finsi + si CS = 22 alors + calculer cible process_penalite : avec PENA_CODE_RSE8, P; + finsi + si CS = 15 alors + calculer cible process_penalite : avec PENA_CODE_GAIN, P; + finsi + si CS = 18 alors + calculer cible process_penalite : avec PENA_CODE_GLO, P; + finsi + finsi +) +CORR.V_CODPF1728 = get_pMax(PENA_CODE_1728); +CORR.V_CODPF1728C820 = get_pMax(PENA_CODE_1728C820); +CORR.V_CODPF1728CAP = get_pMax(PENA_CODE_1728CAP); +CORR.V_CODPF1728CDIS = get_pMax(PENA_CODE_1728CDIS); +CORR.V_CODPF1728CHR = get_pMax(PENA_CODE_1728CHR); +CORR.V_CODPF1728CRP = get_pMax(PENA_CODE_1728CRP); +CORR.V_CODPF1728CSAL = get_pMax(PENA_CODE_1728CSAL); +CORR.V_CODPF1728CVN = get_pMax(PENA_CODE_1728CVN); +CORR.V_CODPF1728GAIN = get_pMax(PENA_CODE_1728GAIN); +CORR.V_CODPF1728GLO = get_pMax(PENA_CODE_1728GLO); +CORR.V_CODPF1728ISF = get_pMax(PENA_CODE_1728ISF); +CORR.V_CODPF1728RSE1 = get_pMax(PENA_CODE_1728RSE1); +CORR.V_CODPF1728RSE2 = get_pMax(PENA_CODE_1728RSE2); +CORR.V_CODPF1728RSE3 = get_pMax(PENA_CODE_1728RSE3); +CORR.V_CODPF1728RSE4 = get_pMax(PENA_CODE_1728RSE4); +CORR.V_CODPF1728RSE5 = get_pMax(PENA_CODE_1728RSE5); +CORR.V_CODPF1728RSE6 = get_pMax(PENA_CODE_1728RSE6); +CORR.V_CODPF1728RSE7 = get_pMax(PENA_CODE_1728RSE7); +CORR.V_CODPF1728RSE8 = get_pMax(PENA_CODE_1728RSE8); +CORR.V_CODPFC = get_pMax(PENA_CODE_C); +CORR.V_CODPFC820 = get_pMax(PENA_CODE_C820); +CORR.V_CODPFCAP = get_pMax(PENA_CODE_CAP); +CORR.V_CODPFCDIS = get_pMax(PENA_CODE_CDIS); +CORR.V_CODPFCHR = get_pMax(PENA_CODE_CHR); +CORR.V_CODPFCSAL = get_pMax(PENA_CODE_CSAL); +CORR.V_CODPFCVN = get_pMax(PENA_CODE_CVN); +CORR.V_CODPFGAIN = get_pMax(PENA_CODE_GAIN); +CORR.V_CODPFGLO = get_pMax(PENA_CODE_GLO); +CORR.V_CODPFI = get_pMax(PENA_CODE_I); +CORR.V_CODPFIC820 = get_pMax(PENA_CODE_IC820); +CORR.V_CODPFICAP = get_pMax(PENA_CODE_ICAP); +CORR.V_CODPFICDIS = get_pMax(PENA_CODE_ICDIS); +CORR.V_CODPFICHR = get_pMax(PENA_CODE_ICHR); +CORR.V_CODPFICRP = get_pMax(PENA_CODE_ICRP); +CORR.V_CODPFICSAL = get_pMax(PENA_CODE_ICSAL); +CORR.V_CODPFICVN = get_pMax(PENA_CODE_ICVN); +CORR.V_CODPFIGAIN = get_pMax(PENA_CODE_IGAIN); +CORR.V_CODPFIGLO = get_pMax(PENA_CODE_IGLO); +CORR.V_CODPFIISF = get_pMax(PENA_CODE_IISF); +CORR.V_CODPFIRSE1 = get_pMax(PENA_CODE_IRSE1); +CORR.V_CODPFIRSE2 = get_pMax(PENA_CODE_IRSE2); +CORR.V_CODPFIRSE3 = get_pMax(PENA_CODE_IRSE3); +CORR.V_CODPFIRSE4 = get_pMax(PENA_CODE_IRSE4); +CORR.V_CODPFIRSE5 = get_pMax(PENA_CODE_IRSE5); +CORR.V_CODPFIRSE6 = get_pMax(PENA_CODE_IRSE6); +CORR.V_CODPFIRSE7 = get_pMax(PENA_CODE_IRSE7); +CORR.V_CODPFIRSE8 = get_pMax(PENA_CODE_IRSE8); +CORR.V_CODPFISF = get_pMax(PENA_CODE_ISF); +CORR.V_CODPFITAXA = get_pMax(PENA_CODE_ITAXA); +CORR.V_CODPFP = get_pMax(PENA_CODE_P); +CORR.V_CODPFR = get_pMax(PENA_CODE_R); +CORR.V_CODPFRSE1 = get_pMax(PENA_CODE_RSE1); +CORR.V_CODPFRSE2 = get_pMax(PENA_CODE_RSE2); +CORR.V_CODPFRSE3 = get_pMax(PENA_CODE_RSE3); +CORR.V_CODPFRSE4 = get_pMax(PENA_CODE_RSE4); +CORR.V_CODPFRSE5 = get_pMax(PENA_CODE_RSE5); +CORR.V_CODPFRSE6 = get_pMax(PENA_CODE_RSE6); +CORR.V_CODPFRSE7 = get_pMax(PENA_CODE_RSE7); +CORR.V_CODPFRSE8 = get_pMax(PENA_CODE_RSE8); +CORR.V_NBCOD1728 = get_pMulti(PENA_CODE_1728); +CORR.V_NBCOD1728C820 = get_pMulti(PENA_CODE_1728C820); +CORR.V_NBCOD1728CAP = get_pMulti(PENA_CODE_1728CAP); +CORR.V_NBCOD1728CDIS = get_pMulti(PENA_CODE_1728CDIS); +CORR.V_NBCOD1728CHR = get_pMulti(PENA_CODE_1728CHR); +CORR.V_NBCOD1728CRP = get_pMulti(PENA_CODE_1728CRP); +CORR.V_NBCOD1728CSAL = get_pMulti(PENA_CODE_1728CSAL); +CORR.V_NBCOD1728CVN = get_pMulti(PENA_CODE_1728CVN); +CORR.V_NBCOD1728GAIN = get_pMulti(PENA_CODE_1728GAIN); +CORR.V_NBCOD1728GLO = get_pMulti(PENA_CODE_1728GLO); +CORR.V_NBCOD1728ISF = get_pMulti(PENA_CODE_1728ISF); +CORR.V_NBCOD1728RSE1 = get_pMulti(PENA_CODE_1728RSE1); +CORR.V_NBCOD1728RSE2 = get_pMulti(PENA_CODE_1728RSE2); +CORR.V_NBCOD1728RSE3 = get_pMulti(PENA_CODE_1728RSE3); +CORR.V_NBCOD1728RSE4 = get_pMulti(PENA_CODE_1728RSE4); +CORR.V_NBCOD1728RSE5 = get_pMulti(PENA_CODE_1728RSE5); +CORR.V_NBCOD1728RSE6 = get_pMulti(PENA_CODE_1728RSE6); +CORR.V_NBCOD1728RSE7 = get_pMulti(PENA_CODE_1728RSE7); +CORR.V_NBCOD1728RSE8 = get_pMulti(PENA_CODE_1728RSE8); +CORR.V_NBCOD1758ACAP = get_pMulti(PENA_CODE_1758ACAP); +CORR.V_NBCOD1758ACHR = get_pMulti(PENA_CODE_1758ACHR); +CORR.V_NBCOD1758AIR = get_pMulti(PENA_CODE_1758AIR); +CORR.V_NBCOD1758ATA = get_pMulti(PENA_CODE_1758ATA); +CORR.V_NBCODC = get_pMulti(PENA_CODE_C); +CORR.V_NBCODC820 = get_pMulti(PENA_CODE_C820); +CORR.V_NBCODCDIS = get_pMulti(PENA_CODE_CDIS); +CORR.V_NBCODCSAL = get_pMulti(PENA_CODE_CSAL); +CORR.V_NBCODCVN = get_pMulti(PENA_CODE_CVN); +CORR.V_NBCODGAIN = get_pMulti(PENA_CODE_GAIN); +CORR.V_NBCODGLO = get_pMulti(PENA_CODE_GLO); +CORR.V_NBCODI = get_pMulti(PENA_CODE_I); +CORR.V_NBCODIC820 = get_pMulti(PENA_CODE_IC820); +CORR.V_NBCODICAP = get_pMulti(PENA_CODE_ICAP); +CORR.V_NBCODICDIS = get_pMulti(PENA_CODE_ICDIS); +CORR.V_NBCODICHR = get_pMulti(PENA_CODE_ICHR); +CORR.V_NBCODICRP = get_pMulti(PENA_CODE_ICRP); +CORR.V_NBCODICSAL = get_pMulti(PENA_CODE_ICSAL); +CORR.V_NBCODICVN = get_pMulti(PENA_CODE_ICVN); +CORR.V_NBCODIGAIN = get_pMulti(PENA_CODE_IGAIN); +CORR.V_NBCODIGLO = get_pMulti(PENA_CODE_IGLO); +CORR.V_NBCODIISF = get_pMulti(PENA_CODE_IISF); +CORR.V_NBCODIRSE1 = get_pMulti(PENA_CODE_IRSE1); +CORR.V_NBCODIRSE2 = get_pMulti(PENA_CODE_IRSE2); +CORR.V_NBCODIRSE3 = get_pMulti(PENA_CODE_IRSE3); +CORR.V_NBCODIRSE4 = get_pMulti(PENA_CODE_IRSE4); +CORR.V_NBCODIRSE5 = get_pMulti(PENA_CODE_IRSE5); +CORR.V_NBCODIRSE6 = get_pMulti(PENA_CODE_IRSE6); +CORR.V_NBCODIRSE7 = get_pMulti(PENA_CODE_IRSE7); +CORR.V_NBCODIRSE8 = get_pMulti(PENA_CODE_IRSE8); +CORR.V_NBCODISF = get_pMulti(PENA_CODE_ISF); +CORR.V_NBCODITAXA = get_pMulti(PENA_CODE_ITAXA); +CORR.V_NBCODP = get_pMulti(PENA_CODE_P); +CORR.V_NBCODR = get_pMulti(PENA_CODE_R); +CORR.V_NBCODRSE1 = get_pMulti(PENA_CODE_RSE1); +CORR.V_NBCODRSE2 = get_pMulti(PENA_CODE_RSE2); +CORR.V_NBCODRSE3 = get_pMulti(PENA_CODE_RSE3); +CORR.V_NBCODRSE4 = get_pMulti(PENA_CODE_RSE4); +CORR.V_NBCODRSE5 = get_pMulti(PENA_CODE_RSE5); +CORR.V_NBCODRSE6 = get_pMulti(PENA_CODE_RSE6); +CORR.V_NBCODRSE7 = get_pMulti(PENA_CODE_RSE7); +CORR.V_NBCODRSE8 = get_pMulti(PENA_CODE_RSE8); + +fonction is_1728_defaut: +application: iliad; +arguments: PENA; +resultat: R; +R = (PENA dans (10, 11, 12)); + +EST_CODE_ISF : calculee primrest = 0 : "" ; + +cible est_code_isf: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, COD9AA) + ou meme_variable(VAR, COD9AB) + ou meme_variable(VAR, COD9AC) + ou meme_variable(VAR, COD9AD) + ou meme_variable(VAR, COD9AE) + ou meme_variable(VAR, COD9BA) + ou meme_variable(VAR, COD9BB) + ou meme_variable(VAR, COD9CA) + ou meme_variable(VAR, COD9GF) + ou meme_variable(VAR, COD9GH) + ou meme_variable(VAR, COD9GL) + ou meme_variable(VAR, COD9GM) + ou meme_variable(VAR, COD9GN) + ou meme_variable(VAR, COD9GY) + ou meme_variable(VAR, COD9NC) + ou meme_variable(VAR, COD9NG) + ou meme_variable(VAR, COD9PR) + ou meme_variable(VAR, COD9PX) + ou meme_variable(VAR, COD9RS) + ou meme_variable(VAR, CMAJ_ISF) + ou meme_variable(VAR, MOISAN_ISF); + +cible est_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +calculer cible est_code_isf : avec RESULTAT, VAR; +si positif(RESULTAT) alors + RESULTAT = (PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99)); +sinon + RESULTAT = (PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99)); +finsi + +cible controle_defaut_retard_2042: +application: iliad; +variables_temporaires: RAP_1728_SF, PENA, EST_1728, EST_ISF, NUM_EVT; +RAP_1728_SF = indefini; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si non present(RAP_1728_SF) alors + si + ( + positif(EST_1728) + et ( + meme_variable(champ_evenement(R, code), V_0AM) + ou meme_variable(champ_evenement(R, code), V_0AC) + ou meme_variable(champ_evenement(R, code), V_0AD) + ou meme_variable(champ_evenement(R, code), V_0AO) + ou meme_variable(champ_evenement(R, code), V_0AV) + ) + et non ( + positif(GLOBAL.V_0AM + 0) + ou positif(GLOBAL.V_0AC + 0) + ou positif(GLOBAL.V_0AD + 0) + ou positif(GLOBAL.V_0AO + 0) + ou positif(GLOBAL.V_0AV + 0) + ) + ) + ou (positif(EST_ISF) et GLOBAL.ISF_PRIM + 0 = 0) + alors + RAP_1728_SF = R; + finsi + finsi +) +si present(RAP_1728_SF) alors + PENA = champ_evenement(RAP_1728_SF, penalite); + GLOBAL.CODE_PENA = PENA; + GLOBAL.DATE = champ_evenement(RAP_1728_SF, date); + si PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (PENA = 10); + GLOBAL.DEFAUT11 = (PENA = 11); + GLOBAL.DEFAUT1011 = (PENA dans (10, 11)); + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD101718 = (PENA dans (10, 17, 18)); + GLOBAL.RETARD0718 = (PENA dans (7, 8, 17, 18)); + GLOBAL.RETARD08 = (PENA = 8); + GLOBAL.RETARD07 = (PENA dans (1, 7, 99)); + GLOBAL.RETARD22 = (PENA = 22); + GLOBAL.RETARD99 = (PENA dans (1, 99)); + finsi +finsi +si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9YT; + GLOBAL.DATE = GLOBAL.DATE_9YU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9YT != NUM_EVT et GLOBAL.MONTANT_9YT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9XT; + GLOBAL.DATE = GLOBAL.DATE_9XU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9XT != NUM_EVT et GLOBAL.MONTANT_9XT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7 ou positif(GLOBAL.RETARD07)); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99 ou positif(GLOBAL.RETARD99)); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + +cible prepare_tl: +application: iliad; +variables_temporaires: COMMENCE_PAR_7; +si positif(GLOBAL.DEFAUT) alors + GLOBAL.TL_NON_ACQUISE = TL_TL_DEFAUT_2042; + CORR.IND_TL_MF = 1; +sinon + GLOBAL.TL_D2042_NB = 0; + GLOBAL.TL_D2042_INIT_NB = 0; + GLOBAL.TL_D2042_RECT_NB = 0; + iterer + : variable VAR + : categorie saisie * + : dans ( + si present(D2042.VAR) alors + TL_D2042.VAR = D2042.VAR; + GLOBAL.TL_D2042_NB = GLOBAL.TL_D2042_NB + 1; + TL_D2042_INIT.VAR = D2042.VAR; + GLOBAL.TL_D2042_INIT_NB = GLOBAL.TL_D2042_INIT_NB + 1; + TL_D2042_RECT.VAR = D2042.VAR; + GLOBAL.TL_D2042_RECT_NB = GLOBAL.TL_D2042_RECT_NB + 1; + sinon + TL_D2042.VAR = indefini; + TL_D2042_INIT.VAR = indefini; + TL_D2042_RECT.VAR = indefini; + finsi + si present(D2042_ABAT.VAR) alors + TL_D2042_ABAT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_INIT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_RECT.VAR = D2042_ABAT.VAR; + sinon + TL_D2042_ABAT.VAR = indefini; + TL_D2042_ABAT_INIT.VAR = indefini; + TL_D2042_ABAT_RECT.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) et attribut(VAR, categorie_TL) dans (40, 50) + : espace D2042 + : dans ( + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, VAR; + si positif(COMMENCE_PAR_7) alors + GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + VAR; + GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + VAR; + finsi + ) +finsi + +cible prepare_majo: +application: iliad; +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; + +cible prepare_inr: +application: iliad; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + INR_D2042.VAR = VAR; +) + +fonction taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +cible calcul_tl: +application: iliad; +arguments: EST_PREMIER; +si GLOBAL.TL_D2042_INIT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_init; + si GLOBAL.TL_NON_ACQUISE != TL_TL_ACQUISE alors + CORR.IND_TL_MF = 1; + finsi + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible sauve_base_tl_init_corr; +finsi +si GLOBAL.TL_D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_corr; +finsi +si GLOBAL.TL_D2042_RECT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_rect; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_rect_corr; +finsi +CORR.MFCDIS = GLOBAL.TL_MF_MFCDIS; +CORR.MFCHR = GLOBAL.TL_MF_MFCHR; +CORR.MFCHR7 = GLOBAL.TL_MF_MFCHR7; +CORR.MFCS = GLOBAL.TL_MF_MFCS; +CORR.MFCSAL = GLOBAL.TL_MF_MFCSAL; +CORR.MFCVN = GLOBAL.TL_MF_MFCVN; +CORR.MFGAIN = GLOBAL.TL_MF_MFGAIN; +CORR.MFGLO = GLOBAL.TL_MF_MFGLO; +CORR.MFIFI = GLOBAL.TL_MF_MFIFI; +CORR.MFIR = GLOBAL.TL_MF_MFIR; +CORR.MFMCSG820 = GLOBAL.TL_MF_MFMCSG820; +CORR.MFPCAP = GLOBAL.TL_MF_MFPCAP; +CORR.MFPS = GLOBAL.TL_MF_MFPS; +CORR.MFPSOL = GLOBAL.TL_MF_MFPSOL; +CORR.MFRD = GLOBAL.TL_MF_MFRD; +CORR.MFREGV = GLOBAL.TL_MF_MFREGV; +CORR.MFRSE1 = GLOBAL.TL_MF_MFRSE1; +CORR.MFRSE2 = GLOBAL.TL_MF_MFRSE2; +CORR.MFRSE3 = GLOBAL.TL_MF_MFRSE3; +CORR.MFRSE4 = GLOBAL.TL_MF_MFRSE4; +CORR.MFRSE5 = GLOBAL.TL_MF_MFRSE5; +CORR.MFRSE6 = GLOBAL.TL_MF_MFRSE6; +CORR.MFRSE7 = GLOBAL.TL_MF_MFRSE7; +CORR.MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA; +CORR.RAPCI_TL = GLOBAL.TL_BASE_TL; +CORR.RAPCI_INIT = GLOBAL.TL_BASE_TL_INIT; +CORR.RAPCI_RECT = GLOBAL.TL_BASE_TL_RECT; +CORR.CI_TL = GLOBAL.TL_BASE_TL_TBTC; +CORR.CI_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT; +CORR.CI_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT; +calculer cible ench_tl_corr; + +cible recherche_C22R02: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +variables_temporaires: TROUVE0, TROUVE1; +TROUVE0 = 0; +TROUVE1 = 0; +iterer +: variable R0 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R0, id_evt) = INDICE_EVT + et champ_evenement(R0, sens) = SENS_C + et champ_evenement(R0, penalite) dans (22, 24) + alors + TROUVE0 = 1; + finsi +) +iterer +: variable R1 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R1, id_evt) = INDICE_EVT + et champ_evenement(R1, sens) = SENS_R + et champ_evenement(R1, penalite) = 2 + et positif(TROUVE0) + alors + TROUVE1 = 1; + finsi +) +RESULTAT = TROUVE1; + + +cible recherche_C22R02_proc: +application: iliad; +variables_temporaires: RESULTAT, INDICE_EVT; +INDICE_EVT = TMP_ARG1; +calculer cible recherche_C22R02 : avec RESULTAT, INDICE_EVT; +TMP_RES = RESULTAT; + +cible verif_code_prem_evt: +application: iliad; +arguments: BRES, R; +variables_temporaires: B; +BRES = 0; +B = 1; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(RR, id_evt) != 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + alors + B = 0; + finsi +) +si B = 1 alors + BRES = 1; +sinon + iterer + : variable RR + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + champ_evenement(RR, id_evt) = 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et champ_evenement(R, montant) <= champ_evenement(RR, montant) + alors + BRES = 1; + finsi + ) +finsi + +cible verif_code_prem_evt_proc: +application: iliad; +calculer cible verif_code_prem_evt : avec TMP_RES, TMP_ARG1; + +cible est_code_tax_init: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, COA) ou meme_variable(VAR, COB) ou meme_variable(VAR, COD) + ou meme_variable(VAR, COE) ou meme_variable(VAR, COF) ou meme_variable(VAR, COG) + ou meme_variable(VAR, COH) ou meme_variable(VAR, COJ) ou meme_variable(VAR, COL) + ou meme_variable(VAR, COM) ou meme_variable(VAR, COO) ou meme_variable(VAR, COP) + ou meme_variable(VAR, COQ) ou meme_variable(VAR, COR) ou meme_variable(VAR, COT) + ou meme_variable(VAR, COU) ou meme_variable(VAR, COV) ou meme_variable(VAR, COX) +); + +cible denature_rappels: +application: iliad; +variables_temporaires: + TAUX_PENA_2042, PENA, TAUX_PENA_RAPPEL, + EST_1728, EST_ISF, EST_TAX_INIT, VERIF_PREM_EVT; +si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + si positif(GLOBAL.PRESENT_9YT) et GLOBAL.MONTANT_9YT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) et GLOBAL.MONTANT_9XT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + ) + finsi + TAUX_PENA_2042 = taux_penalite(GLOBAL.CODE_PENA); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + TAUX_PENA_RAPPEL = taux_penalite(champ_evenement(R, penalite)); + si champ_evenement(R, sens) != SENS_M alors + si positif(GLOBAL.RETARD0718) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + non ( + (non positif(EST_1728)) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (10, 17) + et GLOBAL.CODE_PENA dans (7, 18) + ) + ou champ_evenement(R, penalite) dans (22, 99) + ou TAUX_PENA_2042 < TAUX_PENA_RAPPEL + ) + alors + si champ_evenement(R, sens) = SENS_P alors + champ_evenement(R, penalite) = 0; + sinon + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 2 + et GLOBAL.CODE_PENA dans (7, 18) + alors + champ_evenement(R, anc_penalite) = champ_evenement(R, penalite); + champ_evenement(R, penalite) = 7; + sinon_si + champ_evenement(R, penalite) dans (1, 2, 3, 4, 5, 6, 30, 32, 55) + et (GLOBAL.DEFAUT1011 ou GLOBAL.RETARD0718) + et TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + alors + si + champ_evenement(R, penalite) = 2 et GLOBAL.CODE_PENA dans (7, 18) + alors + GLOBAL.LIMELIGHT = 1; + sinon + champ_evenement(R, 2042_rect) = 0; + finsi + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + finsi + si positif(GLOBAL.DEFAUT) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + alors + si non meme_variable(champ_evenement(R, code), ACODELAISINR) alors + champ_evenement(R, date) = GLOBAL.DATE; + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + sinon_si + positif(EST_1728) et champ_evenement(R, sens) != SENS_P + alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + (champ_evenement(R, penalite) dans (2, 3) et non positif(EST_ISF)) + ou ( + TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + et champ_evenement(R, penalite) != 22 + ) + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + sinon_si + non (champ_evenement(R, penalite) dans (6, 22, 24, 30, 32, 35)) + et champ_evenement(R, sens) != SENS_P + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + sinon + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + non ( + positif(EST_TAX_INIT) + ou meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_PREM_EVT, R; + si positif(VERIF_PREM_EVT) alors + champ_evenement(R, penalite) = 0; + finsi + si champ_evenement(R, sens) = SENS_M alors + CORR.V_FLAGMENC = 1; + finsi + finsi + finsi + ) +finsi + +cible mauvaise_foi: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: + MF_DEF, MONTANT_RECT, NATURE, MONTANT, + COMMENCE_PAR_7, COMMENCE_PAR_H, EST_ISF, + COTSOC; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + MF_DEF = 0; + si + champ_evenement(R, sens) != SENS_P + et non (champ_evenement(R, penalite) dans (0, 2, 22, 24, 99)) + alors + MONTANT_RECT = present(D2042_RECT.champ_evenement(R, code)); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + MONTANT = present(D2042.champ_evenement(R, code)); + si inf(MONTANT_RECT) < inf (MONTANT) alors + MF_DEF = 1; + sinon_si inf(MONTANT_RECT) = 0 alors + MF_DEF = -1; + finsi + sinon_si NATURE = N_REVENU alors + MONTANT = 0; + si inf(MONTANT_RECT) > inf(MONTANT) alors + MF_DEF = 1; + sinon_si inf (MONTANT_RECT) = 0 alors + MF_DEF = -1; + finsi + finsi + finsi + si MF_DEF != 0 alors + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); + calculer cible alias_commence_par_H : avec COMMENCE_PAR_H, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + positif(COMMENCE_PAR_7) ou positif(COMMENCE_PAR_H) + # codes_credit_imp + ou meme_variable(champ_evenement(R, code), 8TA) + ou meme_variable(champ_evenement(R, code), 8TB) + ou meme_variable(champ_evenement(R, code), 8TC) + ou meme_variable(champ_evenement(R, code), 8TE) + ou meme_variable(champ_evenement(R, code), 8TG) + ou meme_variable(champ_evenement(R, code), 8TH) + ou meme_variable(champ_evenement(R, code), 8TL) + ou meme_variable(champ_evenement(R, code), 8TO) + ou meme_variable(champ_evenement(R, code), 8TS) + ou meme_variable(champ_evenement(R, code), 8UW) + ou meme_variable(champ_evenement(R, code), 8UY) + ou meme_variable(champ_evenement(R, code), 8UZ) + alors + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + sinon_si positif(EST_ISF) alors + GLOBAL.TL_MF_MFIFI = GLOBAL.TL_MF_MFIFI + MF_DEF; + sinon + aiguillage (attribut(champ_evenement(R, code), cotsoc)) : ( + cas 2: GLOBAL.TL_MF_MFCDIS = GLOBAL.TL_MF_MFCDIS + MF_DEF; + cas 3: GLOBAL.TL_MF_MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA + MF_DEF; + cas 4: GLOBAL.TL_MF_MFCSAL = GLOBAL.TL_MF_MFCSAL + MF_DEF; + cas 5: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + cas 6: GLOBAL.TL_MF_MFGAIN = GLOBAL.TL_MF_MFGAIN + MF_DEF; + cas 7: GLOBAL.TL_MF_MFREGV = GLOBAL.TL_MF_MFREGV + MF_DEF; + cas 8: GLOBAL.TL_MF_MFCHR = GLOBAL.TL_MF_MFCHR + MF_DEF; + cas 9: GLOBAL.TL_MF_MFPCAP = GLOBAL.TL_MF_MFPCAP + MF_DEF; + cas 10 : + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + cas 11: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 12: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 13: + GLOBAL.TL_MF_MFRSE3 = GLOBAL.TL_MF_MFRSE3 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 14: + GLOBAL.TL_MF_MFRSE4 = GLOBAL.TL_MF_MFRSE4 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 16: GLOBAL.TL_MF_MFLOY = GLOBAL.TL_MF_MFLOY + MF_DEF; + cas 17: GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 18: + GLOBAL.TL_MF_MFGLO = GLOBAL.TL_MF_MFGLO + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 19: + GLOBAL.TL_MF_MFRSE5 = GLOBAL.TL_MF_MFRSE5 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 20: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 21: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 22: + GLOBAL.TL_MF_MFRSE7 = GLOBAL.TL_MF_MFRSE7 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 1: + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + par_defaut: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + ) + finsi + finsi + finsi +) + +cible recherche_cpena: +application: iliad; +arguments: CPENA, R; +variables_temporaires: PREM_RAPPEL, MONTANT_INITIAL, PRESENT_2042, MONTANT, TROUVE, NATURE; +PREM_RAPPEL = 0; +si present(D2042.champ_evenement(R, code)) alors + MONTANT_INITIAL = D2042.champ_evenement(R, code); + PRESENT_2042 = 1; +sinon + MONTANT_INITIAL = 0; + PRESENT_2042 = 0; +finsi +MONTANT = MONTANT_INITIAL; +TROUVE = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non (positif(GLOBAL.RETARD) et champ_evenement(RR, numero) = champ_evenement(PREM_RAPPEL, numero)) + et champ_evenement(RR, numero) <= champ_evenement(R, numero) + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(R, penalite) = champ_evenement(RR, penalite) + et champ_evenement(RR, sens) dans (SENS_R, SENS_C) + alors + MONTANT = MONTANT + champ_evenement(RR, montant); + TROUVE = 1; + finsi +) +si positif(TROUVE) alors + si MONTANT < champ_evenement(R, montant) alors + CPENA = 4; + sinon_si + positif(PRESENT_2042) + et MONTANT - MONTANT_INITIAL < champ_evenement(R, montant) + alors + CPENA = 5; + sinon + CPENA = 2; + finsi +sinon_si + (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) + et GLOBAL.CODE_PENA = champ_evenement(R, penalite) +alors + CPENA = 6; +sinon_si MONTANT < champ_evenement(R, montant) alors + si champ_evenement(R, penalite) != champ_evenement(R, anc_penalite) alors + CPENA = 6; + sinon + CPENA = 4; + finsi +sinon + CPENA = 5; +finsi +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si NATURE = N_CHARGE et CPENA dans (3, 4) alors + CPENA = 1; +finsi + +cible transf_rappels_prim: +application: iliad; +variables_temporaires: NATURE, SENS, PENALITE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, numero) >= 0 + et champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT + et non ( + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + ) + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_REVENU alors + SENS = SENS_R; + PENALITE = 99; + sinon_si NATURE = N_CHARGE alors + SENS = SENS_C; + PENALITE = 0; + sinon # interdit + SENS = SENS_R; # = 0 + PENALITE = 0; + finsi + champ_evenement(R, code) reference ANREV; + champ_evenement(R, montant) = 0; + champ_evenement(R, sens) = SENS; + champ_evenement(R, penalite) = PENALITE; + finsi +) + +cible transfo_pena_regco: +application: iliad; +arguments: R; +si meme_variable(champ_evenement(R, code), REGCO) alors + GLOBAL.PRESENT_REGCO = 1; + GLOBAL.PENALITE_REGCO = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_REGCO = champ_evenement(R, numero); + GLOBAL.NUM_RAP_REGCO = champ_evenement(R, rappel); + GLOBAL.IND_20_REGCO = champ_evenement(R, 2042_rect); +finsi + +fonction get_taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +fonction is_minoration_sf: +application: iliad; +arguments: INITIALE, COURANTE; +resultat: EST_MIN_SF; +si INITIALE = SF_MARIAGE ou INITIALE = SF_PACSE alors + EST_MIN_SF = COURANTE = SF_VEUVAGE_TRUE ou COURANTE = SF_PACSE; +sinon_si INITIALE = SF_VEUVAGE_TRUE alors + EST_MIN_SF = COURANTE = SF_MARIAGE ou COURANTE = SF_PACSE; +sinon + EST_MIN_SF = 1; +finsi + +fonction get_strate_pena: +application: iliad; +arguments: STR; +resultat: PENA; +aiguillage(STR):( + cas 0: PENA = 99; + cas 1 : PENA = -1; + cas 2 : + cas 3 : PENA = 6; + cas 4 : PENA = 12; + cas 5 : PENA = 32; + cas 6 : PENA = 31; + cas 7 : PENA = 5; + cas 8 : PENA = 4; + cas 9 : PENA = 35; + cas 10: PENA = 30; + cas 11: PENA = 11; + cas 12: PENA = 8; + cas 13: PENA = 55; + cas 14: PENA = 3; + cas 15: PENA = 17; + cas 16: PENA = 10; + cas 17: PENA = 7; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: PENA = 2; + cas 24: PENA = 22; + cas 25: PENA = 24; + par_defaut: PENA = -1; +) + +fonction get_strate_taux: +application: iliad; +arguments: STR; +resultat: TAUX; +aiguillage (STR) : ( + cas 0 : + cas 1 : TAUX = -1; + cas 2 : TAUX = 0; + cas 3 : TAUX = 100; + cas 4 : + cas 5 : + cas 6 : + cas 7 : + cas 8 : + cas 9 : TAUX = 80; + cas 10: + cas 11: + cas 12: + cas 13: + cas 14: TAUX = 40; + cas 15: + cas 16: + cas 17: TAUX = 10; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: + cas 24: + cas 25: TAUX = 0; + par_defaut: TAUX = -1; +) + +cible get_code_situation_famille: +application: iliad; +arguments: RESULTAT, CORR, VAR; +si meme_variable(VAR, 0AM) alors + RESULTAT = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RESULTAT = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RESULTAT = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RESULTAT = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si positif(CORR) et GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.ANNEE_REVENU alors + RESULTAT = SF_VEUVAGE_TRUE; + sinon + RESULTAT = SF_VEUVAGE_FALSE; + finsi +sinon + RESULTAT = SF_INVALIDE; +finsi + +cible is_rappel_strate: +application: iliad; +arguments: RESULTAT, R, S; +variables_temporaires: TAUX_STR, CODE_SIT_FAM, CORR; +si S = 0 alors + RESULTAT = ( + champ_evenement(R, penalite) = 99 + ou (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ); + si positif(RESULTAT) alors + GLOBAL.MAJO_TAUX_STRATE = get_taux_penalite(GLOBAL.CODE_PENA); + finsi +sinon_si S = 1 alors + RESULTAT = ( + dans_domaine(champ_evenement(R, code), saisie contexte) + et non positif(GLOBAL.IND_20_REGCO) + et non ( + meme_variable(champ_evenement(R, code), ANREV) + ou meme_variable(champ_evenement(R, code), ANCSDED) + ou meme_variable(champ_evenement(R, code), CALCULIR) + ou meme_variable(champ_evenement(R, code), IND_TRAIT) + ou meme_variable(champ_evenement(R, code), ROLCSG) + ) + ); + si positif(RESULTAT) alors + TAUX_STR = get_taux_penalite(GLOBAL.CODE_PENA); + si TAUX_STR != 0 alors + GLOBAL.MAJO_TAUX_STRATE = TAUX_STR; + finsi + si champ_evenement(R, penalite) != 0 alors + GLOBAL.MAJO_CODE_STRATE = champ_evenement(R, penalite); + finsi + finsi +sinon_si S = 2 alors + CORR = 0; + calculer cible get_code_situation_famille : avec CODE_SIT_FAM, CORR, champ_evenement(R, code); + si + GLOBAL.SF_COURANTE != SF_INVALIDE + et ( + CODE_SIT_FAM != SF_INVALIDE + ou ( + meme_variable(champ_evenement(R, code), 0DA) + ou meme_variable(champ_evenement(R, code), 0DB) + ) + ) + alors + RESULTAT = is_minoration_sf(GLOBAL.SF_INITIALE, GLOBAL.SF_COURANTE); + sinon + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + ou ( + positif(GLOBAL.DEFAUT) + et champ_evenement(R, sens) = SENS_R + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + ) + ); + finsi +sinon_si + champ_evenement(R, numero) = GLOBAL.NUM_EVT_REGCO + et meme_variable(champ_evenement(R, code), REGCO) +alors + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +sinon_si S = 18 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 19 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 20 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 21 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon_si S = 23 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +finsi + +cible get_strate: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: TROUVE; +si champ_evenement(R, sens) = SENS_P et champ_evenement(R, penalite) = 0 alors + RESULTAT = 24; +sinon + RESULTAT = -1; + iterer : variable S : entre 0..(GLOBAL.NB_STRATES - 1) increment 1 : dans ( + si RESULTAT = -1 alors + calculer cible is_rappel_strate : avec TROUVE, R, S; + si RESULTAT = -1 et positif(TROUVE) alors + RESULTAT = S; + finsi + finsi + ) +finsi + +fonction vers_mois: +application: iliad; +arguments: D; +resultat: M; +M = inf(D / 10000); + +fonction vers_annee: +application: iliad; +arguments: D; +resultat: A; +A = inf(D % 10000); + +fonction vers_date: +application: iliad; +arguments: M, A; +resultat: D; +D = inf(M) * 10000 + inf(A); + +cible traite_inr: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: MOIS_DEP, ANNEE_DEP, R_EVT; +GLOBAL.MENTION_EXP = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + alors + GLOBAL.MENTION_EXP = 1; + finsi +) +MOIS_DEP = 7; +ANNEE_DEP = GLOBAL.ANNEE_REVENU + 1; +R_EVT = -1; +iterer +: variable R +: entre (nb_evenements() - 1)..0 increment -1 +: dans ( + si R_EVT = -1 et champ_evenement(R, id_evt) = INDICE_EVT alors + R_EVT = R; + finsi +) +si R_EVT >= 0 alors + GLOBAL.INR_ANNEE_COR = vers_annee(champ_evenement(R_EVT, date)); + si vers_annee(champ_evenement(R_EVT, date)) < 2018 alors + GLOBAL.INR_NB_MOIS = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + GLOBAL.INR_NB_MOIS2 = 0; + sinon_si ANNEE_DEP > 2018 alors + GLOBAL.INR_NB_MOIS = 0; + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + sinon + GLOBAL.INR_NB_MOIS = 12 * (2018 - ANNEE_DEP) + (1 - MOIS_DEP); + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - 2018) + + vers_mois(champ_evenement(R_EVT, date)); + finsi +finsi + +cible is_rappel_abat_20: +application: iliad; +variables_temporaires: RESULTAT, R, NATURE, ABAT; +R = TMP_ARG1; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi +TMP_RES = RESULTAT; + +cible is_rappel_abat_20_proc: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: NATURE, ABAT; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi + + +cible est_code_sf_naiss: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, 0AM) ou meme_variable(VAR, 0AC) ou meme_variable(VAR, 0AD) + ou meme_variable(VAR, 0AO) ou meme_variable(VAR, 0AV) ou meme_variable(VAR, 0DA) + ou meme_variable(VAR, 0DB) +); + +cible is_rappel_autorise_maj: +application: iliad; +arguments: RESULTAT, R, MAJ; +variables_temporaires: EST_SF_NAISS, EST_TAX_INIT; +si MAJ = MAJ_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 10); +sinon_si MAJ = MAJ_NON_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 10); +sinon_si MAJ = MAJ_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 15); +sinon_si MAJ = MAJ_NON_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 15); +sinon_si MAJ = MAJ_RAPPEL_C alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + et GLOBAL.CODE_PENA != 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) > 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP01 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP22 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP24 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 24 + ); +sinon_si MAJ = MAJ_RAPPEL_F alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ); +sinon_si MAJ = MAJ_RAPPEL_NF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et (non positif(EST_SF_NAISS)) + ); +sinon_si MAJ = MAJ_RAPPEL_M alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + et (non positif(EST_SF_NAISS)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99)) + ) + ); +sinon_si MAJ = MAJ_RAPPEL_MF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = (champ_evenement(R, sens) = SENS_M et positif(EST_SF_NAISS)); +sinon_si MAJ = MAJ_RAPPEL_NON_M alors + RESULTAT = (champ_evenement(R, sens) != SENS_M); +sinon_si MAJ = MAJ_RAPPEL_P alors + RESULTAT = (champ_evenement(R, sens) = SENS_P); +sinon_si MAJ = MAJ_RAPPEL_R alors + RESULTAT = (champ_evenement(R, sens) = SENS_R); +sinon_si MAJ = MAJ_RAPPEL_R55 alors + RESULTAT = ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 99)) + ); +sinon_si MAJ = MAJ_1728 alors + RESULTAT = (champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31)); +sinon_si MAJ = MAJ_ABAT_20 alors + calculer cible is_rappel_abat_20_proc : avec RESULTAT, R; +sinon_si MAJ = MAJ_CODE_1729_2A5 alors + RESULTAT = (champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55)); +sinon_si MAJ = MAJ_CODE_1729_6 alors + RESULTAT = (champ_evenement(R, penalite) = 6); +sinon_si MAJ = MAJ_CODE_22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CODE_24 alors + RESULTAT = ( + champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CONTEXTE_22 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)); +sinon_si MAJ = MAJ_MENTION_EXP_99 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et (non positif(GLOBAL.DEFAUT)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_MENTION_EXP_99R alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et GLOBAL.CODE_PENA != 22 + et (non positif(GLOBAL.DEFAUT)) + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_NON_MENTION_EXP alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible is_rappel_autorise: +application: iliad; +arguments: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RES0, RES1, RES2, RES3; +RES0 = 1; +RES1 = 1; +RES2 = 1; +RES3 = 1; +si present(MAJ0) alors + calculer cible is_rappel_autorise_maj : avec RES0, R, MAJ0; +finsi +si present(MAJ1) alors + calculer cible is_rappel_autorise_maj : avec RES1, R, MAJ1; +finsi +si present(MAJ2) alors + calculer cible is_rappel_autorise_maj : avec RES2, R, MAJ2; +finsi +si present(MAJ3) alors + calculer cible is_rappel_autorise_maj : avec RES3, R, MAJ3; +finsi +RESULTAT = (RES0 et RES1 et RES2 et RES3); + +cible is_rappel_autorise_proc: +application: iliad; +variables_temporaires: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +R = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible is_rappel_autorise : avec RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +TMP_RES = RESULTAT; + +cible is_init_1731: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +calculer cible init_1731; +RESULTAT = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + RESULTAT = 1; + finsi +) + +cible calcul_majo_P: +application: iliad; +arguments: NB_RAPPELS_P; +si GLOBAL.MAJO_D2042_P_NB > 0 et NB_RAPPELS_P != 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_majo_d2042_p; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + si GLOBAL.MAJO_T_RABP != 0 alors + CORR.T_RABP = GLOBAL.MAJO_T_RABP; + CORR.T_RABP07 = GLOBAL.MAJO_T_RABP07; + CORR.T_RABP08 = GLOBAL.MAJO_T_RABP08; + CORR.T_RABP09 = GLOBAL.MAJO_T_RABP09; + CORR.T_RABP10 = GLOBAL.MAJO_T_RABP10; + CORR.T_RABP11 = GLOBAL.MAJO_T_RABP11; + CORR.T_RABP12 = GLOBAL.MAJO_T_RABP12; + CORR.T_RABP17 = GLOBAL.MAJO_T_RABP17; + CORR.T_RABP31 = GLOBAL.MAJO_T_RABP31; + finsi + si GLOBAL.MAJO_T_RABPPS != 0 alors + CORR.T_RABPPS = GLOBAL.MAJO_T_RABPPS; + CORR.T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07; + CORR.T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08; + CORR.T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09; + CORR.T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10; + CORR.T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11; + CORR.T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12; + CORR.T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17; + CORR.T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31; + finsi + si GLOBAL.MAJO_T_RABPCS != 0 alors + CORR.T_RABPCS = GLOBAL.MAJO_T_RABPCS; + CORR.T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07; + CORR.T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08; + CORR.T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09; + CORR.T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10; + CORR.T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11; + CORR.T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12; + CORR.T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17; + CORR.T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31; + finsi + si GLOBAL.MAJO_T_RABPRD != 0 alors + CORR.T_RABPRD = GLOBAL.MAJO_T_RABPRD; + CORR.T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07; + CORR.T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08; + CORR.T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09; + CORR.T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10; + CORR.T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11; + CORR.T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12; + CORR.T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17; + CORR.T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31; + finsi + si GLOBAL.MAJO_T_RABPCH != 0 alors + CORR.T_RABPCH = GLOBAL.MAJO_T_RABPCH; + CORR.T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07; + CORR.T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08; + CORR.T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09; + CORR.T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10; + CORR.T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11; + CORR.T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12; + CORR.T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17; + CORR.T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31; + finsi + si GLOBAL.MAJO_T_RABPLO != 0 alors + CORR.T_RABPLO = GLOBAL.MAJO_T_RABPLO; + CORR.T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07; + CORR.T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08; + CORR.T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09; + CORR.T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10; + CORR.T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11; + CORR.T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12; + CORR.T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17; + CORR.T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31; + finsi + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + CORR.FLAG_TRMAJOP = 1; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_TRMAJOP = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + calculer cible sauve_base_majo_corr; +finsi + +cible cumule_base_tl_aux: +application: iliad; +arguments: M_TL, M_TL_TBTC, R; +variables_temporaires: MONTANT, COMMENCE_PAR_7, CAT_TL; +calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); +si positif(COMMENCE_PAR_7) alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = champ_evenement(R, base_tl); +finsi +si champ_evenement(R, sens) != SENS_R alors + MONTANT = -MONTANT; +finsi +CAT_TL = attribut(champ_evenement(R, code), categorie_TL); +si CAT_TL = 40 alors + M_TL = MONTANT; + M_TL_TBTC = 0; +sinon_si CAT_TL = 50 alors + M_TL = 0; + M_TL_TBTC = MONTANT; +sinon + M_TL = 0; + M_TL_TBTC = 0; +finsi + +cible cumule_base_tl_init: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +si GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI alors + M_TL = 0; + M_TL_TBTC = 0; +sinon + calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +finsi +GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + M_TL_TBTC; + +cible cumule_champ_base_tl: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL = GLOBAL.TL_BASE_TL + M_TL; +GLOBAL.TL_BASE_TL_TBTC = GLOBAL.TL_BASE_TL_TBTC + M_TL_TBTC; + +cible cumule_champ_base_tl_rect: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL_RECT = GLOBAL.TL_BASE_TL_RECT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT + M_TL_TBTC; + +cible traite_majo_P: +application: iliad; +variables_temporaires: R, NATURE, PENA, COTSOC, MONTANT; +R = TMP_ARG1; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +PENA = champ_evenement(R, penalite); +COTSOC = attribut(champ_evenement(R, code), cotsoc); +MONTANT = champ_evenement(R, montant); +si + NATURE = N_REVENU + et ((7 <= PENA et PENA <= 12) ou PENA = 17 ou PENA = 31) +alors + si COTSOC = 1 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 5 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 9 alors + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 10 alors + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC dans (11, 12, 13, 14, 19, 20, 21) alors + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC = 16 alors + calculer cible add_majo_T_RABPLO : avec PENA, MONTANT; + sinon_si COTSOC = 18 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + finsi +finsi + +cible calculer_sommes_2042: +application: iliad; +arguments: R; +variables_temporaires: S, N, MONTANT; +S = attribut(champ_evenement(R, code), sanction); +calculer cible get_nature : avec N, champ_evenement(R, code); +si champ_evenement(R, sens) = SENS_R alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = -champ_evenement(R, montant); +finsi +si S = 1 alors + GLOBAL.INR_SOMMERF_2 = GLOBAL.INR_SOMMERF_2 + MONTANT; +finsi +si S = 2 ou S = 12 alors + GLOBAL.INR_SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2 + MONTANT; +finsi +si S = 3 ou S = 13 alors + GLOBAL.INR_SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2 + MONTANT; +finsi +si S = 4 ou S = 14 alors + GLOBAL.INR_SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2 + MONTANT; +finsi +si S = 5 ou S = 15 alors + GLOBAL.INR_SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2 + MONTANT; +finsi +si S = 6 ou S = 16 alors + GLOBAL.INR_SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2 + MONTANT; +finsi +si (1 <= S et S <= 8) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2 + MONTANT; +finsi +si (1 <= S et S <= 9) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMERI_2 = GLOBAL.INR_SOMMERI_2 + MONTANT; +finsi +si (1 <= S et S <= 6) ou S = 8 ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2 + MONTANT; +finsi +si S = 8 et N = N_REVENU alors + GLOBAL.INR_SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2 + MONTANT; +finsi +si S = 2 et N = N_REVENU alors + GLOBAL.INR_SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2 + MONTANT; +finsi +si S = 3 et N = N_REVENU alors + GLOBAL.INR_SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2 + MONTANT; +finsi +si S = 4 et N = N_REVENU alors + GLOBAL.INR_SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2 + MONTANT; +finsi + +cible calculer_sommes_2042_proc: +application: iliad; +variables_temporaires: R; +R = TMP_ARG1; +calculer cible calculer_sommes_2042 : avec R; + +cible maj_elt_2042: +application: iliad; +arguments: MONTANT_2042, R; +variables_temporaires: NATURE; +si + # codes_dates + meme_variable(MONTANT_2042, 0AX) + ou meme_variable(MONTANT_2042, 0AY) + ou meme_variable(MONTANT_2042, 0AZ) + ou meme_variable(MONTANT_2042, 9YD) + ou meme_variable(MONTANT_2042, 9YR) +alors + MONTANT_2042 = champ_evenement(R, montant); +sinon + calculer cible get_nature : avec NATURE, MONTANT_2042; + si NATURE = N_REVENU alors + si + champ_evenement(R, sens) = SENS_R + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + non (champ_evenement(R, sens) dans (SENS_M, SENS_C)) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi +finsi + +cible set_rappel: +application: iliad; +arguments: MONTANT, R; +variables_temporaires: NATURE; +si present(MONTANT) alors + calculer cible maj_elt_2042 : avec MONTANT, R; +sinon + calculer cible get_nature : avec NATURE, MONTANT; + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si NATURE = N_REVENU alors + MONTANT = - champ_evenement(R, montant); + sinon + MONTANT = champ_evenement(R, montant); + finsi + sinon + si + NATURE = N_REVENU + ou ( + # codes_dates + meme_variable(MONTANT, 0AX) + ou meme_variable(MONTANT, 0AY) + ou meme_variable(MONTANT, 0AZ) + ou meme_variable(MONTANT, 9YD) + ou meme_variable(MONTANT, 9YR) + ) + alors + MONTANT = champ_evenement(R, montant); + sinon + MONTANT = - champ_evenement(R, montant); + finsi + finsi +finsi + +cible met_a_jour_2042_INR_evt: +application: iliad; +arguments: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec INR_D2042.champ_evenement(R, code), R : espace GLOBAL; + si + non ( + positif(IS_PREMIER) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + et GLOBAL.CODE_9ZA = 0 + et champ_evenement(R, sens) != SENS_P + et ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + alors + calculer cible calculer_sommes_2042 : avec R; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) +si GLOBAL.NB_RAPPELS_RES > 0 alors + CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; + CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; + CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; + CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; + CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; + CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; + CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; + CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; + CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; + CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; + CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; + CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; + CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; +finsi + +cible met_a_jour_2042_INR_evt_proc: +application: iliad; +variables_temporaires: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_INR_evt +: avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +cible met_a_jour_2042_evt: +application: iliad; +arguments: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.TMP_ARG1 = R; + si F_TRAITEMENT = 1 alors + calculer cible cumule_champ_base_tl : espace GLOBAL; + sinon_si F_TRAITEMENT = 2 alors + calculer cible cumule_base_tl_init : espace GLOBAL; + sinon_si F_TRAITEMENT = 3 alors + calculer cible cumule_champ_base_tl_rect : espace GLOBAL; + sinon_si F_TRAITEMENT = 4 alors + calculer cible traite_majo_P : espace GLOBAL; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) + +cible met_a_jour_2042_evt_TL_D2042: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042; + +cible met_a_jour_2042_evt_TL_D2042_INIT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_INIT; + +cible met_a_jour_2042_evt_TL_D2042_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_RECT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT_INIT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT_INIT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT_RECT; + +cible met_a_jour_2042_evt_D2042_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace D2042_RECT; + +cible met_a_jour_2042_evt_D2042_ABAT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace D2042_ABAT; + +cible met_a_jour_2042_evt_MAJO_D2042_P: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_P; + +cible met_a_jour_2042_strate: +application: iliad; +arguments: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: NUM_PREM_RAPPEL, RAP_AUTH; +NUM_PREM_RAPPEL = champ_evenement(0, numero); +GLOBAL.NB_RAPPELS_RES = 0; +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, strate) = NUM_STRATE alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si + non ( + positif(GLOBAL.RETARD) + et champ_evenement(R, numero) = NUM_PREM_RAPPEL + ) + et positif(RAP_AUTH) + alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi + ) +) + +cible met_a_jour_2042_strate_MAJO_D2042_P: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_P; + +cible met_a_jour_2042_strate_MAJO_D2042_ABAT_P: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_ABAT_P; + +cible met_a_jour_2042_strate_MAJO_D2042_STRATE: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_STRATE; + +cible met_a_jour_2042_strate_MAJO_D2042_ABAT_STRATE: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_ABAT_STRATE; + +cible set_rappel_1731bis: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: MONTANT, NATURE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si + attribut(champ_evenement(R, code), sanction) = 9 + et ( + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et GLOBAL.CODE_PENA dans (3, 8, 11) + ) + ou ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + ) +alors + CORR.SOMMERI1731 = 1; +finsi +MONTANT = GLOBAL.champ_evenement(R, code) + 0; +si + (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C) + et (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) +alors + si + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 2, 3, 7, 8, 10, 11, 17, 18, 22, 24, 99 + ) + ) + ou champ_evenement(R, sens) = SENS_M + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_CHARGE alors + si MONTANT + champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_REVENU alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi +finsi +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et champ_evenement(R, sens) != SENS_C + ) +alors + si NATURE = N_REVENU alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22, 24, 99) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si NATURE = N_CHARGE alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans ( + 2, 3, 4, 5, 6, 7, 8, 10, 11, 17, 18, 22, 24, 30, 31, 32, 35, 55, 99 + ) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi + finsi +finsi + +cible set_rappel_1731bis_proc: +application: iliad; +variables_temporaires: R, IS_PREMIER; +R = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +calculer cible set_rappel_1731bis : avec R, IS_PREMIER; + +cible prepare_1731_aux: +application: iliad; +arguments: R, IS_PREMIER, MAJ_TGV_COPIE; +si positif(MAJ_TGV_COPIE) alors + calculer cible set_rappel_1731bis : avec R, IS_PREMIER; +finsi +si champ_evenement(R, penalite) = 30 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR30 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R30 = 1; + finsi +finsi +si champ_evenement(R, penalite) = 32 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR32 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R32 = 1; + finsi +finsi +si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 10 alors + GLOBAL.ART1731_PRESENT_R10 = 1; +finsi + +cible prepare_1731_aux_proc: +application: iliad; +variables_temporaires: R, IS_PREMIER, MAJ_TGV_COPIE; +R = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +MAJ_TGV_COPIE = TMP_ARG3; +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo_aux: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: NATURE, MAJ_TGV_COPIE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +MAJ_TGV_COPIE = ( + champ_evenement(R, sens) dans (SENS_M, SENS_C) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (1, 2, 7, 10, 17, 18, 22, 24, 99) + ) + ou ( + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 1, 2, 7, 10, 17, 18, 22, 24, 99, 3, + 4, 5, 6, 8, 11, 30, 31, 32, 35, 55 + ) + ) +); +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo: +application: iliad; +arguments: NUM_STRATE; +variables_temporaires: NUM_EVT_PREMIER, IS_PREMIER, NUM_STRATE_COURANTE; +NUM_EVT_PREMIER = champ_evenement(0, numero); +restaurer +: variable V +: categorie * +: espace GLOBAL +: apres ( + calculer cible empty_art1731; + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + IS_PREMIER = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + si positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C alors + IS_PREMIER = (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C); + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER; + finsi + ) + finsi + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + NUM_STRATE_COURANTE = champ_evenement(R, strate); + IS_PREMIER = champ_evenement(R, numero) = NUM_EVT_PREMIER; + si + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et NUM_STRATE_COURANTE <= NUM_STRATE + et champ_evenement(R, sens) != SENS_C + ) + ou ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et NUM_STRATE_COURANTE <= NUM_STRATE + ) + alors + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER; + finsi + ) + ) + calculer cible enchaine_calcul_prim; + calculer cible calcul_1731; +) + +cible prepare_1731_majo_proc: +application: iliad; +variables_temporaires: NUM_STRATE; +NUM_STRATE = TMP_ARG1; +calculer cible prepare_1731_majo : avec NUM_STRATE; + +cible calcul_inr_aux: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, FLG_INR; +variables_temporaires: FLAG, NINR; +calculer cible reset_saisie_calc; +calculer cible remplit_tgv_inr_d2042; +CORR.PASS_TLIR = CORR.TL_IR + 0; +CORR.PASS_TLIFI = CORR.TL_IFI + 0; +CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; +CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + alors + FLAG = 1; + finsi +) +CORR.FLAG_C22 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 2 + alors + FLAG = 1; + finsi +) +CORR.FLAG_C02 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 99 alors + FLAG = 1; + finsi +) +CORR.FLAG_99 = si (positif(FLAG)) alors (4) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 7 alors + FLAG = 1; + finsi +) +CORR.FLAG_07 = si (positif(FLAG)) alors (5) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 24 alors + FLAG = 1; + finsi +) +CORR.FLAG_24 = si (positif(FLAG)) alors (6) sinon (0) finsi; +NINR = 1; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + non ( + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 2 + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + ) + ) + alors + NINR = 0; + finsi +) +NINR = ((non positif(GLOBAL.DEFAUT)) et nb_evenements() != 0 et positif(NINR)); +CORR.FLAG_NINR = NINR; +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; +CORR.FLAG_9YT = GLOBAL.R_TARDIF; +CORR.FLAG_R99 = GLOBAL.SAUVE_INR_R99; +CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; +CORR.CODE_2042 = GLOBAL.CODE_PENA; +CORR.ANNEECOR = GLOBAL.INR_ANNEE_COR; +CORR.NBMOISI = GLOBAL.INR_NB_MOIS; +CORR.NBMOISI2 = GLOBAL.INR_NB_MOIS2; +CORR.NBMOIS2ISF = 0; +CORR.FLAG_INR = FLG_INR; +calculer cible enchaine_calcul_corr; +calculer cible signaler_erreurs; + +cible calcul_inr_aux_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, FLG_INR; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +FLG_INR = TMP_ARG3; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, FLG_INR; + +cible traite_tl: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +calculer cible mauvaise_foi : avec INDICE_EVT; +GLOBAL.TL_MF_MFCDIS = si (GLOBAL.TL_MF_MFCDIS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR = si (GLOBAL.TL_MF_MFCHR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR7 = si (GLOBAL.TL_MF_MFCHR7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCS = si (GLOBAL.TL_MF_MFCS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCSAL = si (GLOBAL.TL_MF_MFCSAL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCVN = si (GLOBAL.TL_MF_MFCVN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGAIN = si (GLOBAL.TL_MF_MFGAIN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGLO = si (GLOBAL.TL_MF_MFGLO > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIFI = si (GLOBAL.TL_MF_MFIFI > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIR = si (GLOBAL.TL_MF_MFIR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFLOY = si (GLOBAL.TL_MF_MFLOY > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFMCSG820 = si (GLOBAL.TL_MF_MFMCSG820 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPCAP = si (GLOBAL.TL_MF_MFPCAP > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPS = si (GLOBAL.TL_MF_MFPS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPSOL = si (GLOBAL.TL_MF_MFPSOL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRD = si (GLOBAL.TL_MF_MFRD > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFREGV = si (GLOBAL.TL_MF_MFREGV > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE1 = si (GLOBAL.TL_MF_MFRSE1 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE2 = si (GLOBAL.TL_MF_MFRSE2 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE3 = si (GLOBAL.TL_MF_MFRSE3 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE4 = si (GLOBAL.TL_MF_MFRSE4 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE5 = si (GLOBAL.TL_MF_MFRSE5 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE6 = si (GLOBAL.TL_MF_MFRSE6 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE7 = si (GLOBAL.TL_MF_MFRSE7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFTAXAGA = si (GLOBAL.TL_MF_MFTAXAGA > 0) alors (1) sinon (0) finsi; +si + GLOBAL.TL_MF_MFCDIS > 0 ou GLOBAL.TL_MF_MFCHR > 0 ou GLOBAL.TL_MF_MFCHR7 > 0 + ou GLOBAL.TL_MF_MFCS > 0 ou GLOBAL.TL_MF_MFCSAL > 0 ou GLOBAL.TL_MF_MFCVN > 0 + ou GLOBAL.TL_MF_MFGAIN > 0 ou GLOBAL.TL_MF_MFGLO > 0 ou GLOBAL.TL_MF_MFIFI > 0 + ou GLOBAL.TL_MF_MFIR > 0 ou GLOBAL.TL_MF_MFLOY > 0 ou GLOBAL.TL_MF_MFMCSG820 > 0 + ou GLOBAL.TL_MF_MFPCAP > 0 ou GLOBAL.TL_MF_MFPS > 0 ou GLOBAL.TL_MF_MFPSOL > 0 + ou GLOBAL.TL_MF_MFRD > 0 ou GLOBAL.TL_MF_MFREGV > 0 ou GLOBAL.TL_MF_MFRSE1 > 0 + ou GLOBAL.TL_MF_MFRSE2 > 0 ou GLOBAL.TL_MF_MFRSE3 > 0 ou GLOBAL.TL_MF_MFRSE4 > 0 + ou GLOBAL.TL_MF_MFRSE5 > 0 ou GLOBAL.TL_MF_MFRSE6 > 0 ou GLOBAL.TL_MF_MFRSE7 > 0 + ou GLOBAL.TL_MF_MFTAXAGA > 0 +alors + GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI; +sinon_si GLOBAL.TL_NON_ACQUISE != TL_TL_DEFAUT_2042 alors + GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +finsi +si + non ( + positif(GLOBAL.DEFAUT) + ou (positif(GLOBAL.RETARD) et positif(IS_PREMIER)) + ) +alors + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_RAPPEL_NON_M; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_RAPPEL_C; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_MENTION_EXP_99; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL_RECT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_MENTION_EXP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_RECT; +finsi + +cible traite_tl_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + +cible is_def_ret_not_8_11: +application: iliad; +arguments: RESULTAT, R; +RESULTAT = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (8, 11) + ) +); + +cible is_code_rappel_13: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et non positif(EST_SF_NAISS) + ) +); + +cible is_code_rappel_12: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 24 + ) +); + +cible is_code_rappel_11: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)) + ou ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_C + ou ( + champ_evenement(R, sens) = SENS_R + et meme_variable(champ_evenement(R, code), REGCO) + ) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et positif(HAS_C22R02) + ) + ) + ) + ) + ) +); + +cible is_code_rappel_10: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) + ou ( + positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (22, 24) + ) + ) + ) +); + +cible is_code_rappel_09: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (22, 24) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) + ) + ) +); + +cible is_code_rappel_08: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_07: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_06: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, HAS_C22R02; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 10 + et champ_evenement(R, penalite) dans (22, 24) + et ( + ( + champ_evenement(R, sens) = SENS_C + et non positif(HAS_C22R02) + ) + ou champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_05: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) +); + +cible is_code_rappel_04: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + ( + champ_evenement(R, sens) = SENS_C + et ( + ( + # is_rappel_1728_X + champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31) + ) + ou champ_evenement(R, penalite) = 6 + ou ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ou ( + champ_evenement(R, penalite) = 22 + et attribut(champ_evenement(R, code), categorie_TL) = 10 + et positif(HAS_C22R02) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) = 6 + ou ( + ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + ) + ) + ) + ) +); + +cible is_code_rappel_03: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) +); + +cible is_code_rappel_02: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + positif(EST_SF_NAISS) + et ( + (champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1) + ou (champ_evenement(R, sens) = SENS_M et positif(GLOBAL.MENTION_EXP)) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + et GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_C + et GLOBAL.CODE_PENA != 22 + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + ) +); + +cible is_code_rappel_01: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non positif(IS_PREMIER) + et ( + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et positif(GLOBAL.MENTION_EXP) + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) + ) + ) +); + +cible prepare_1731_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, CAS_INR; +variables_temporaires: NUM_PREM_RAPPEL_EVT, NUM_EVT_PREMIER, PREM_EVT, IS_CODE, MAJ_TGV_COPIE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si non present(NUM_PREM_RAPPEL_EVT) et champ_evenement(R, id_evt) = INDICE_EVT alors + NUM_PREM_RAPPEL_EVT = champ_evenement(R, numero); + finsi +) +NUM_EVT_PREMIER = champ_evenement(0, numero); +restaurer : variable V : categorie * : espace GLOBAL : apres ( + calculer cible empty_art1731; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= NUM_PREM_RAPPEL_EVT alors + PREM_EVT = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + IS_CODE = 0; + MAJ_TGV_COPIE = 0; + calculer cible is_code_rappel_13 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 13 et positif(IS_CODE))); + calculer cible is_code_rappel_12 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 12 et positif(IS_CODE))); + calculer cible is_code_rappel_11 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 11 et positif(IS_CODE))); + calculer cible is_code_rappel_10 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 10 et positif(IS_CODE))); + calculer cible is_code_rappel_09 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 9 et positif(IS_CODE))); + calculer cible is_code_rappel_08 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 8 et positif(IS_CODE))); + calculer cible is_code_rappel_07 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 7 et positif(IS_CODE))); + calculer cible is_code_rappel_06 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 6 et positif(IS_CODE))); + calculer cible is_code_rappel_05 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 5 et positif(IS_CODE))); + calculer cible is_code_rappel_04 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 4 et positif(IS_CODE))); + calculer cible is_code_rappel_03 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 3 et positif(IS_CODE))); + calculer cible is_code_rappel_02 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 2 et positif(IS_CODE))); + calculer cible is_code_rappel_01 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 1 et positif(IS_CODE))); + calculer cible prepare_1731_aux : avec R, PREM_EVT, MAJ_TGV_COPIE; + finsi + ) + calculer cible enchaine_calcul_prim; + calculer cible calcul_1731; +) + +cible prepare_1731_inr_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, CAS_INR; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +CAS_INR = TMP_ARG3; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + +cible calcul_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: DEFAUT_RETARD_PREMIER, HAS_C22R02, MAJ0, MAJ1, MAJ2, MAJ3, INR_FLAG, CAS_INR; +DEFAUT_RETARD_PREMIER = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) +); +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_PROV_ANT.VAR = VAR; +) +si INDICE_EVT < 2 alors + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable VAR + : categorie saisie * + : espace INR_D2042_R9901_ANT + : dans ( + INR_D2042.VAR = VAR; + ) + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_r9901_corr; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_R9901_ANT.VAR = VAR; +) +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 1; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_HR_corr; +CORR.REF1731 = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_REFR99R_ANT.VAR = VAR; +) + +si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_R55; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 2; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ref_corr; +CORR.REF1731 = 0; +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + CAS_INR = 3; + calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_ntl_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat98_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_2A5; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +si (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 4; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 5; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_intertl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CONTEXTE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 6; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 7; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_CODE_24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_RAPPEL_CP24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 8; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl24_corr; + +CAS_INR = 9; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_1729_2A5; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 10; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_CONTEXTE_22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 11; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 12; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl24_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_NF; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 13; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_inter22_corr; + +cible calcul_inr_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + +cible traite_reference: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3; +si + non ( + ( + positif(GLOBAL.DEFAUT) # positif(GLOBAL.RETARD) + ou positif(GLOBAL.RETARD) + ) + et positif(IS_PREMIER) + ) +alors + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_ABAT; +finsi + +cible traite_reference_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + +cible calcul_majo_normal: +application: iliad; +arguments: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +variables_temporaires: TAUX_PENALITE; +TAUX_PENALITE = get_strate_taux(NUM_STRATE); +si TAUX_PENALITE = -1 alors + TAUX_PENALITE = GLOBAL.MAJO_TAUX_STRATE; +finsi +si NUM_STRATE = 0 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + GLOBAL.MAJO_PREM_STR = 1; + GLOBAL.MAJO_NB_STR_TR = 0; +finsi +si + (NB_RAPPELS_STRATE != 0 et GLOBAL.MAJO_D2042_STRATE_NB > 0) + ou NUM_STRATE = GLOBAL.NB_STRATES - 1 +alors + # if taux_penalite < 0 then failwith "Taux pénalite négatif"; + calculer cible reset_saisie_calc; + CORR.FLAG_1STRATE = GLOBAL.MAJO_PREM_STR; + calculer cible remplit_tgv_majo_d2042_strate; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + calculer cible set_majo_str_tr : avec NUM_STRATE; + CORR.X = NUM_STRATE; + CORR.TAUX_STRATE = TAUX_PENALITE; + CORR.FLAG_NBSTRTR = GLOBAL.MAJO_NB_STR_TR; + CORR.FLAG_DERSTTR = GLOBAL.MAJO_DERN_STR_TR; + CORR.CSTRATE1 = GLOBAL.MAJO_CODE_STRATE; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; + CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; + CORR.FLAG_RECTIF = GLOBAL.RECTIF; + CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; + CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.TARDIFEVT2 = GLOBAL.MAJO_TARDIF_EVT2; + si positif(GLOBAL.RETARD) et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) alors + CORR.CSTRATE99 = GLOBAL.CODE_PENA; + finsi + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.TAUX_2042 = get_taux_penalite(GLOBAL.CODE_PENA); + calculer cible detecte_penalites; + si NUM_STRATE = 1 alors + calculer cible unset_majo_str_tr : avec NUM_STRATE; + calculer cible affect_code; + finsi + calculer cible affect_str_tr; + si + NUM_STRATE = GLOBAL.NB_STRATES - 1 + et positif(GLOBAL.RETARD) + et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) + alors + CORR.FLAG_TRDEGTR = GLOBAL.CODE_PENA; + sinon + CORR.FLAG_TRDEGTR = 0; + finsi + calculer cible init_1731; + calculer cible prepare_1731_majo : avec PROCHAINE_STRATE; + calculer cible enchaine_calcul_corr; + si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + finsi + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + GLOBAL.MAJO_DERN_STR_TR = NUM_STRATE; + GLOBAL.MAJO_PREM_STR = 0; + GLOBAL.MAJO_NB_STR_TR = GLOBAL.MAJO_NB_STR_TR + 1; +finsi +si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; +finsi + +cible calcul_majo_normal_proc: +application: iliad; +variables_temporaires: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +NUM_STRATE = TMP_ARG3; +NB_RAPPELS_STRATE = TMP_ARG4; +PROCHAINE_STRATE = TMP_ARG5; +calculer cible calcul_majo_normal +: avec IS_PREMIER, INDICE_EVT, NUM_STRATE, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + +cible calcul_majo_tardif: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +variables_temporaires: STRATE_0; +si GLOBAL.D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible init_1731; + STRATE_0 = 0; + calculer cible prepare_1731_majo : avec STRATE_0; + calculer cible remplit_tgv_d2042; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + CORR.TAUX_2042 = TAUX_PENALITE; + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.FLAG_TRTARDIF = 1; + CORR.FLAG_1STRATE = 0; + CORR.FLAG_DERSTTR = 0; + calculer cible affect_code; + calculer cible affect_str_tr; + calculer cible detecte_penalites; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + calculer cible sauve_base_anterieure_corr; + CORR.FLAG_TRTARDIF = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; +finsi +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo_tardif_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +NUM_STRATE = TMP_ARG3; +TAUX_PENALITE = TMP_ARG4; +calculer cible calcul_majo_tardif +: avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; + +cible calcul_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: + NUM_STRATE, TAUX_PENALITE, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3, + NB_RAPPELS_P, NB_RAPPELS_STRATE, PROCHAINE_STRATE; +si non positif(GLOBAL.RETARD) alors + calculer cible clear_majo_str_tr; +finsi +calculer cible remplit_tgv_d2042_rect; +calculer cible enchaine_calcul_corr; +si present(CORR.IRBASE) alors + CORR.IRBASE2042_FIC = CORR.IRBASE; +finsi +si present(CORR.IRBASE_I) alors + CORR.IRBASE_IRECT = CORR.IRBASE_I; +finsi +si present(CORR.CSBASE_MAJO) alors + CORR.CSBASE2042_FIC = CORR.CSBASE_MAJO; +finsi +si present(CORR.RDBASE_MAJO) alors + CORR.RDBASE2042_FIC = CORR.RDBASE_MAJO; +finsi +si present(CORR.PSBASE_MAJO) alors + CORR.PSBASE2042_FIC = CORR.PSBASE_MAJO; +finsi +si present(CORR.TAXABASE_MAJO) alors + CORR.TAXABASE2042_FIC = CORR.TAXABASE_MAJO; +finsi +si present(CORR.TAXABASE_I) alors + CORR.TAXABASE_IRECT = CORR.TAXABASE_I; +finsi +si present(CORR.CSALBASE_MAJO) alors + CORR.CSALBASE2042_FIC = CORR.CSALBASE_MAJO; +finsi +si present(CORR.CDISBASE_MAJO) alors + CORR.CDISBASE2042_FIC = CORR.CDISBASE_MAJO; +finsi +si present(CORR.CAPBASE_MAJO) alors + CORR.CAPBASE2042_FIC = CORR.CAPBASE_MAJO; +finsi +si present(CORR.CAPBASE_I) alors + CORR.CAPBASE_IRECT = CORR.CAPBASE_I; +finsi +si present(CORR.HRBASE_MAJO) alors + CORR.HRBASE2042_FIC = CORR.HRBASE_MAJO; +finsi +si present(CORR.HRBASE_I) alors + CORR.HRBASE_IRECT = CORR.HRBASE_I; +finsi +si present(CORR.GAINBASE_MAJO) alors + CORR.GAINBASE2042_FIC = CORR.GAINBASE_MAJO; +finsi +si present(CORR.RSE1BASE_MAJO) alors + CORR.RSE1BASE2042_FIC = CORR.RSE1BASE_MAJO; +finsi +si present(CORR.RSE2BASE_MAJO) alors + CORR.RSE2BASE2042_FIC = CORR.RSE2BASE_MAJO; +finsi +si present(CORR.RSE3BASE_MAJO) alors + CORR.RSE3BASE2042_FIC = CORR.RSE3BASE_MAJO; +finsi +si present(CORR.RSE4BASE_MAJO) alors + CORR.RSE4BASE2042_FIC = CORR.RSE4BASE_MAJO; +finsi +si present(CORR.RSE5BASE_MAJO) alors + CORR.RSE5BASE2042_FIC = CORR.RSE5BASE_MAJO; +finsi +si present(CORR.RSE6BASE_MAJO) alors + CORR.RSE6BASE2042_FIC = CORR.RSE6BASE_MAJO; +finsi +si present(CORR.RSE8BASE_MAJO) alors + CORR.RSE8BASE2042_FIC = CORR.RSE8BASE_MAJO; +finsi +si present(CORR.CVNBASE_MAJO) alors + CORR.CVNBASE2042_FIC = CORR.CVNBASE_MAJO; +finsi +si present(CORR.GLOBASE_MAJO) alors + CORR.GLOBASE2042_FIC = CORR.GLOBASE_MAJO; +finsi +si present(CORR.PSOLBASE_MAJO) alors + CORR.PSOLBASE2042_FIC = CORR.PSOLBASE_MAJO; +finsi +si present(CORR.C820BASE_MAJO) alors + CORR.C820BASE2042_FIC = CORR.C820BASE_MAJO; +finsi +si present(CORR.IFI4BASE) alors + CORR.IFI4BASE2042_FIC = CORR.IFI4BASE; +finsi +si + positif(IS_PREMIER) + et (non positif(GLOBAL.DEFAUT)) + et positif(GLOBAL.RETARD) +alors + TAUX_PENALITE = get_taux_penalite(GLOBAL.CODE_PENA); + NUM_STRATE = GLOBAL.MAJO_NUM_STRATE; + calculer cible calcul_majo_tardif + : avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +sinon + ID_TRAIT = ID_TRAITE_MAJO_P; + MAJ0 = MAJ_RAPPEL_P; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NB_RAPPELS_P = GLOBAL.NB_RAPPELS_RES; + + NUM_STRATE = 0; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 1; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 0; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + NUM_STRATE = 1; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + si NB_RAPPELS_P != 0 alors + calculer cible calcul_cum_p; + finsi + calculer cible calcul_majo_P : avec NB_RAPPELS_P; + calculer cible clear_majo_str_tr; + iterer + : variable NUM_STR + : entre 0 ..(GLOBAL.NB_STRATES + 0 - 1) increment 1 + : dans ( + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + si NUM_STR = 0 alors + PROCHAINE_STRATE = champ_evenement(0, strate); + sinon + PROCHAINE_STRATE = indefini; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + (non present(PROCHAINE_STRATE)) + et champ_evenement(R, strate) = NUM_STR + alors + PROCHAINE_STRATE = champ_evenement(R, strate); + finsi + ) + si non present(PROCHAINE_STRATE) alors + PROCHAINE_STRATE = champ_evenement(nb_evenements() - 1, strate); + finsi + finsi + ) + si NUM_STR dans (20, 21, 22) alors + MAJ0 = MAJ_TL; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + sinon + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + finsi + NB_RAPPELS_STRATE = GLOBAL.NB_RAPPELS_RES; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_STRATE; + GLOBAL.MAJO_NUM_STRATE = NUM_STR; + calculer cible calcul_majo_normal + : avec IS_PREMIER, INDICE_EVT, NUM_STR, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + ) +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +calculer cible sauve_base_majo_corr; +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + +cible recherche_CR02: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: C0, R0, C1, R1, IM41, PREM_R02, NUM_EVT, NUM_RAP; +C0 = 0; +R0 = 0; +C1 = 0; +R1 = 0; +IM41 = 0; +PREM_R02 = 1; +NUM_EVT = 0; +NUM_RAP = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, penalite) = 2 + alors + si + champ_evenement(RR, sens) = SENS_C + et non positif(champ_evenement(RR, 2042_rect)) + alors + C0 = C0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et non positif(champ_evenement(RR, 2042_rect)) + alors + R0 = R0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_C + et positif(champ_evenement(RR, 2042_rect)) + alors + C1 = C1 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + alors + R1 = R1 + champ_evenement(RR, montant); + finsi + finsi + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + et positif(PREM_R02) + alors + PREM_R02 = 0; + NUM_EVT = champ_evenement(RR, numero); + NUM_RAP = champ_evenement(RR, rappel); + finsi + IM41 = ( + positif(IM41) + ou ( + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et ( + champ_evenement(RR, penalite) != 2 + ou ( + champ_evenement(RR, penalite) = 2 + et non positif(champ_evenement(RR, 2042_rect)) + ) + ) + et champ_evenement(RR, sens) dans (SENS_C, SENS_M) + et (non positif(PREM_R02)) + et ( + champ_evenement(RR, numero) > NUM_EVT + ou ( + champ_evenement(RR, numero) = NUM_EVT + et champ_evenement(RR, rappel) > NUM_RAP + ) + ) + ) + ); +) +si positif(IM41) alors + RESULTAT = 3; +sinon_si positif(champ_evenement(R, 2042_rect)) et C1 > R1 alors + RESULTAT = 2; +sinon_si (non positif(champ_evenement(R, 2042_rect))) et C0 > R0 alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible recherche_CR02_proc: +application: iliad; +variables_temporaires: RESULTAT, R; +R = TMP_ARG1; +calculer cible recherche_CR02 : avec RESULTAT, R; +TMP_RES = RESULTAT; + +cible is_code_situation_famille: +application: iliad; +arguments: RES_SF, VAR; +si meme_variable(VAR, 0AM) alors + RES_SF = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RES_SF = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RES_SF = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RES_SF = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.ANNEE_REVENU alors + RES_SF = SF_VEUVAGE_TRUE; + sinon + RES_SF = SF_VEUVAGE_FALSE; + finsi +sinon + RES_SF = SF_INVALIDE; +finsi + +cible is_code_situation_famille_r: +application: iliad; +variables_temporaires: SF, R; +R = TMP_ARG1; +calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); +TMP_RES = SF; + +cible traite_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: RAP_SF, RAP_DA, RAP_DB, PENALITE, SF, STR; +RAP_SF = indefini; +RAP_DA = indefini; +RAP_DB = indefini; +PENALITE = -1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); + si SF != SF_INVALIDE alors + si + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) + ) + alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si + GLOBAL.SF_INITIALE dans (SF_MARIAGE, SF_VEUVAGE_TRUE, SF_PACSE) + alors + RAP_SF = R; + finsi + sinon + GLOBAL.SF_COURANTE = SF; + PENALITE = champ_evenement(R, penalite); + finsi + sinon_si positif(IS_PREMIER) alors + GLOBAL.SF_INITIALE = SF; + finsi + finsi + si meme_variable(champ_evenement(R, code), 0DA) alors + RAP_DA = R; + finsi + si meme_variable(champ_evenement(R, code), 0DB) alors + RAP_DB = R; + finsi + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +si PENALITE >= 0 alors + si present(RAP_SF) alors + champ_evenement(RAP_SF, penalite) = PENALITE; + finsi + si present(RAP_DA) alors + champ_evenement(RAP_DA, penalite) = PENALITE; + finsi + si present(RAP_DB) alors + champ_evenement(RAP_DB, penalite) = PENALITE; + finsi +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) <= INDICE_EVT alors + calculer cible get_strate : avec STR, R; + champ_evenement(R, strate) = STR; + sinon + champ_evenement(R, strate) = -1; + finsi +) +si positif(GLOBAL.DEFAUT) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042_CTXT + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + finsi + ) +sinon_si positif(GLOBAL.RETARD) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace MAJO_D2042_REF_ABAT + : dans ( + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + ) +sinon + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) +finsi + +cible traite_majo_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + +cible controle: +application: iliad; +arguments: QUELLE_SP, INDICE_EVT; +variables_temporaires: NATURE, ELEM_2042, MONTANT_2042, NAT_RECH, COMMENCE_PAR_5; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si QUELLE_SP = 0 alors + ELEM_2042 = D2042.champ_evenement(R, code); + sinon + ELEM_2042 = INR_D2042.champ_evenement(R, code); + finsi + MONTANT_2042 = ELEM_2042 + 0; + si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) != 0 alors + calculer cible recherche_cpena : avec NAT_RECH, R; + sinon + NAT_RECH = 0; + finsi + si NAT_RECH = 5 alors + nettoie_erreurs_finalisees; + leve_erreur A72207; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, penalite) = 32 + et non meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A045; + calculer cible signaler_erreur_ano; + finsi + si + non (champ_evenement(R, penalite) dans (0, 32)) + et meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A044; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) != SENS_M + et non (champ_evenement(R, penalite) dans (0, 7, 8, 10, 11, 17, 18, 99)) + alors + si meme_variable(champ_evenement(R, code), 8VW) alors + nettoie_erreurs_finalisees; + leve_erreur A042; + calculer cible signaler_erreur_ano; + sinon_si meme_variable(champ_evenement(R, code), 8VV) alors + nettoie_erreurs_finalisees; + leve_erreur A041; + calculer cible signaler_erreur_ano; + finsi + finsi + si + non (champ_evenement(R, penalite) dans (30, 35, 99)) + et meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A046; + calculer cible signaler_erreur_ano; + finsi + calculer cible alias_commence_par_5 : avec COMMENCE_PAR_5, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 31 + et ( + meme_variable(champ_evenement(R, code), 5QM) + ou meme_variable(champ_evenement(R, code), 5RM) + ou non positif(COMMENCE_PAR_5) + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A048; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) = SENS_M + et champ_evenement(R, penalite) != 0 + et non meme_variable(champ_evenement(R, code), REGCO) + alors + nettoie_erreurs_finalisees; + leve_erreur A970; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XT > GLOBAL.NUM_EVT_9XU alors + nettoie_erreurs_finalisees; + leve_erreur A96903; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XU > GLOBAL.NUM_EVT_9XT alors + nettoie_erreurs_finalisees; + leve_erreur A96904; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XT = 0 et GLOBAL.MONTANT_9XU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96803; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XU = 0 et GLOBAL.MONTANT_9XT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96804; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YT > GLOBAL.NUM_EVT_9YU alors + nettoie_erreurs_finalisees; + leve_erreur A96901; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YU > GLOBAL.NUM_EVT_9YT alors + nettoie_erreurs_finalisees; + leve_erreur A96902; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YT = 0 et GLOBAL.MONTANT_9YU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96801; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YU = 0 et GLOBAL.MONTANT_9YT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96802; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 0 alors + nettoie_erreurs_finalisees; + leve_erreur A971; + calculer cible signaler_erreur_ano; + finsi + si present(ELEM_2042) alors + si + type(champ_evenement(R, code), BOOLEEN) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et champ_evenement(R, numero) = champ_evenement(0, numero) + ) + alors + si NATURE = N_REVENU alors + si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + sinon_si NATURE = N_CHARGE alors + si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + finsi + finsi + finsi + si + NAT_RECH dans (0, 6) + et NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + et NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_P et non present(ELEM_2042) alors + nettoie_erreurs_finalisees; + leve_erreur A721; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + alors + si + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, montant) > MONTANT_2042 + alors + si champ_evenement(R, penalite) = 99 alors + nettoie_erreurs_finalisees; + leve_erreur A72204; + calculer cible signaler_erreur_ano; + sinon + nettoie_erreurs_finalisees; + leve_erreur A72201; + calculer cible signaler_erreur_ano; + finsi + finsi + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_M + et ( + non present(ELEM_2042) + ou champ_evenement(R, montant) > MONTANT_2042 + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A72202; + calculer cible signaler_erreur_ano; + finsi + CORR.V_FLAG8OT = positif(GLOBAL.COD8OT + 0); + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + et present(ELEM_2042) + et champ_evenement(R, montant) > MONTANT_2042 + alors + nettoie_erreurs_finalisees; + leve_erreur A72203; + calculer cible signaler_erreur_ano; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_P) + et champ_evenement(R, penalite) dans (9, 12) + et vers_annee(champ_evenement(R, date)) >= 2006 + alors + nettoie_erreurs_finalisees; + leve_erreur A724; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et champ_evenement(R, numero) != champ_evenement(0, numero) + et champ_evenement(R, penalite) = 22 + et non positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A725; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et non ( + # codes_sf + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + et champ_evenement(R, penalite) != 99 + et positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A726; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, numero) = champ_evenement(nb_evenements() - 1, numero) + et champ_evenement(R, sens) dans (SENS_R, SENS_C, SENS_M) + alors + calculer cible recherche_CR02 : avec NAT_RECH, R; + si NAT_RECH = 2 alors + nettoie_erreurs_finalisees; + leve_erreur A72301; + calculer cible signaler_erreur_ano; + sinon_si NAT_RECH = 3 et non positif(GLOBAL.ISF_PRIM) alors + leve_erreur IM41; + finalise_erreurs; + finsi + finsi + finsi +) + +cible controle_proc: +application: iliad; +variables_temporaires: QUELLE_SP, INDICE_EVT; +QUELLE_SP = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible controle : avec QUELLE_SP, INDICE_EVT; + +cible make_2042_of_tgv: +application: iliad; +arguments: VAR; +variables_temporaires: SF; +si present(GLOBAL.VAR) alors + calculer cible is_code_situation_famille : avec SF, VAR; + si SF != SF_INVALIDE alors + GLOBAL.SF_INITIALE = SF; + finsi + si meme_variable(VAR, RJLJ) et GLOBAL.VAR != 0 alors + GLOBAL.CORR_RJLJ = 1; + finsi + D2042.VAR = GLOBAL.VAR; + GLOBAL.D2042_NB = GLOBAL.D2042_NB + 1; +finsi + +cible is_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +variables_temporaires: EST_ISF; +calculer cible est_code_isf : avec EST_ISF, VAR; +si positif(EST_ISF) alors + RESULTAT = ( + PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99) + ); +sinon + RESULTAT = ( + PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99) + ); +finsi + + +cible prepare_reference: +application: iliad; +variables_temporaires: + MAKE_2042, MONTANT, NATURE, LEVE_A989, EST_ISF, PENA, EST_RAPPEL_1728; +si non (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9XT)) alors + iterer + : variable VAR + : categorie saisie famille + : avec present(VAR) + : espace GLOBAL + : dans ( + SF_PRIMITIF = 1; + ) +finsi +GLOBAL.D2042_NB = 0; +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = ( + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + ou dans_domaine(VAR, saisie variation) + ); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) + : espace D2042 + : dans ( + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + ) +sinon + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + D2042_CTXT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = (dans_domaine(VAR, saisie revenu)); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + si present(VAR) alors + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + D2042_CTXT.VAR = VAR; + MAJO_D2042_REF_ABAT.VAR = VAR; + sinon + MAJO_D2042_REF_ABAT.VAR = indefini; + finsi + ) + si positif(GLOBAL.PRESENT_9YT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + si non (GLOBAL.MONTANT_9YT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9YT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + si non (GLOBAL.MONTANT_9XT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9XT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, id_evt) = 0 alors + si present(D2042.champ_evenement(R, code)) alors + MONTANT = D2042.champ_evenement(R, code) + champ_evenement(R, montant); + si + type(champ_evenement(R, code), BOOLEEN) + et non (MONTANT dans (0, 1)) + alors + MONTANT = D2042.champ_evenement(R, code); + finsi + sinon + MONTANT = champ_evenement(R, montant); + finsi + D2042.champ_evenement(R, code) = MONTANT; + D2042_RECT.champ_evenement(R, code) = MONTANT; + si positif(GLOBAL.RETARD) et champ_evenement(R, penalite) = 7 alors + D2042_ABAT.champ_evenement(R, code) = MONTANT; + MAJO_D2042_REF_ABAT.champ_evenement(R, code) = MONTANT; + finsi + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, penalite) = 0; + finsi + finsi + ) +finsi +LEVE_A989 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si LEVE_A989 = 0 alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + PENA = champ_evenement(R, penalite); + calculer cible is_rappel_1728 + : avec EST_RAPPEL_1728, PENA, champ_evenement(R, code); + si positif(EST_ISF) et positif(EST_RAPPEL_1728) alors + si + (positif(GLOBAL.ISF_PRIM) et GLOBAL.CODE_PENA_ISF = 1) + ou ((non positif(GLOBAL.ISF_PRIM)) et GLOBAL.CODE_PENA_ISF = 0) + alors + GLOBAL.CODE_PENA_ISF = champ_evenement(R, penalite); + finsi + si + non ( + champ_evenement(R, penalite) dans (1, 2, 3, 22, 99, GLOBAL.CODE_PENA_ISF) + ) + alors + LEVE_A989 = 1; + finsi + finsi + finsi +) +si positif(LEVE_A989) alors + nettoie_erreurs_finalisees; + leve_erreur A989; + calculer cible signaler_erreur_ano; +finsi + +cible calcul_aux: +application: iliad; +variables_temporaires: + HUIT, PENA_0DA, EST_TAX_INIT, VERIF_CODE, + QUELLE_SP, INDICE_EVT_CTRL, ANO_994_1, ANO_994_2, + IS_PREMIER, IS_DERNIER, EXISTE_SENS_RC; +GLOBAL.SAUVE_INR_R99 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si GLOBAL.SAUVE_INR_R99 = 0 alors + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 99 + alors + GLOBAL.SAUVE_INR_R99 = 1; + finsi + finsi +) +HUIT = 0; +PENA_0DA = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si meme_variable(champ_evenement(R, code), 9ZA) alors + GLOBAL.CODE_9ZA = (champ_evenement(R, montant) = 1); + finsi + HUIT = (positif(HUIT) ou champ_evenement(R, penalite) = 8); + si champ_evenement(R, penalite) = 18 alors + champ_evenement(R, penalite) = 7; + sinon_si champ_evenement(R, penalite) = 34 alors + si non positif(HUIT) alors + CORR.V_FLAGR34 = 1; + finsi + champ_evenement(R, penalite) = 8; + sinon_si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 99; + sinon_si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 0; + sinon_si champ_evenement(R, penalite) = 24 alors + CORR.V_FLAGANO726 = 1; + CORR.V_FLAGR24 = 1; + sinon_si champ_evenement(R, penalite) = 22 alors + CORR.V_FLAGR22 = 1; + finsi + si + meme_variable(champ_evenement(R, code), 0DA) + et champ_evenement(R, sens) = SENS_R + et (3 <= champ_evenement(R, penalite) et champ_evenement(R, penalite) <= 98) + alors + PENA_0DA = champ_evenement(R, penalite); + finsi + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + champ_evenement(R, sens) = SENS_M + et non ( + meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + alors + CORR.V_FLAGMENC = 1; + GLOBAL.FLAGMENC = 1; + champ_evenement(R, sens) = SENS_C; + champ_evenement(R, penalite) = 0; + sinon_si + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = PENA_0DA + et non (champ_evenement(R, penalite) dans (2, 22)) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_CODE, R; + si positif(VERIF_CODE) alors + champ_evenement(R, penalite) = 0; + finsi + finsi +) +calculer cible controle_defaut_retard_2042; +GLOBAL.PREM_8_11 = 1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si positif(GLOBAL.PREM_8_11) alors + si + non ( + champ_evenement(R, id_evt) != 0 + ou champ_evenement(R, penalite) dans (8, 11) + ) + alors + GLOBAL.PREM_8_11 = 0; + finsi + finsi +) +GLOBAL.PREM_8_11 = ( + (GLOBAL.PREM_8_11 ou GLOBAL.MONTANT_9XT dans (8, 11)) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) +); +CORR.PREM8_11 = GLOBAL.PREM_8_11; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ou positif(EST_TAX_INIT) + alors + GLOBAL.RECTIF = 0; + finsi + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) dans (1, 99) + alors + GLOBAL.RECTIF_MAJO = 1; + finsi + si + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et ( + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ) + alors + champ_evenement(R, date) = champ_evenement(0, date); + finsi + si + champ_evenement(R, penalite) = 30 + et non meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A047; + calculer cible signaler_erreur_ano; + finsi +) +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (vers_annee(champ_evenement(R1, date)) < vers_annee(champ_evenement(R2, date))) alors (1) + sinon (si (vers_annee(champ_evenement(R1, date)) > vers_annee(champ_evenement(R2, date))) alors (0) + sinon (si (vers_mois(champ_evenement(R1, date)) < vers_mois(champ_evenement(R2, date))) alors (1) + sinon (si (vers_mois(champ_evenement(R1, date)) > vers_mois(champ_evenement(R2, date))) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + calculer cible prepare_reference; + calculer cible prepare_tl; + calculer cible prepare_majo; + calculer cible prepare_inr; + QUELLE_SP = 0; + INDICE_EVT_CTRL = 0; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible denature_rappels; + ANO_994_1 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_1) alors + si + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + alors + ANO_994_1 = 1; + finsi + finsi + ) + ANO_994_2 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_2) alors + si + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22) + alors + ANO_994_2 = 1; + finsi + finsi + ) + GLOBAL.PENA_994 = (positif(ANO_994_1) et positif(ANO_994_2)); + CORR.PENA994 = GLOBAL.PENA_994; + CORR.V_FLAGMENC = 0; + iterer + : variable INDICE_EVT + : entre 0..GLOBAL.MAX_ID_EVT increment 1 + : dans ( + IS_PREMIER = (INDICE_EVT = 0); + IS_DERNIER = (INDICE_EVT = GLOBAL.MAX_ID_EVT); + CORR.V_FLAGR22 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR22) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 22 + alors + CORR.V_FLAGR22 = 1; + finsi + finsi + ) + CORR.V_FLAGR24 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR24) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 24 + alors + CORR.V_FLAGR24 = 1; + finsi + finsi + ) + calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_inr : avec INDICE_EVT; + calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + CORR.FLAGPREM = IS_PREMIER; + GLOBAL.FLAGPREM = IS_PREMIER; + si positif(IS_DERNIER) alors + CORR.FLAGDERNIE = IS_DERNIER; + GLOBAL.FLAGDERNIE = IS_DERNIER; + finsi + calculer cible init_1731; + EXISTE_SENS_RC = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(EXISTE_SENS_RC) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + EXISTE_SENS_RC = 1; + finsi + finsi + ) + si positif(EXISTE_SENS_RC) alors + CORR.ART1731BIS = 0; + GLOBAL.ART1731BIS = 0; + finsi + iterer + : variable VAR + : categorie calculee + : espace CORR + : dans ( + VAR = indefini; + ) + si positif(GLOBAL.FLAGMENC) alors + CORR.FLAGMENC = 1; + finsi + calculer cible calcul_tl : avec IS_PREMIER; + calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + si + positif(IS_DERNIER) + ou ( + positif(IS_PREMIER) + et non positif(GLOBAL.DEFAUT) + et positif(GLOBAL.RETARD) + ) + alors + calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + finsi + si + positif(IS_DERNIER) + et positif(GLOBAL.PRESENT_8VV) + et positif(GLOBAL.PRESENT_8VW) + et CORR.RE168 + 0 > 0 + et CORR.TAX1649 + 0 > 0 + alors + nettoie_erreurs_finalisees; + leve_erreur A043; + calculer cible signaler_erreur_ano; + finsi + si non positif(IS_DERNIER) alors + QUELLE_SP = 1; + INDICE_EVT_CTRL = INDICE_EVT + 1; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible sauve_base_anterieure_cor_corr; + si positif(IS_PREMIER) alors + calculer cible sauve_base_premier_corr; + finsi + finsi + CORR.V_FLAGR22 = 0; + CORR.V_FLAGR24 = 0; + ) +) + +cible nb_transf_2042_rappels: +application: iliad; +variables_temporaires: EST_ISF; +iterer +: variable VAR +: categorie saisie revenu, saisie revenu corrective, saisie variation, saisie penalite, calculee * +: avec present(VAR) +: espace CORR +: dans ( + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + finsi +) + +cible prepare_rappels: +application: iliad; +variables_temporaires: FIN, MOIS, ANNEE; +GLOBAL.DATEINR = 0; +CORR.DATEINR = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YA) + et champ_evenement(R, numero) != champ_evenement(nb_evenements() - 1, numero) + alors + nettoie_erreurs_finalisees; + leve_erreur A99302; + calculer cible signaler_erreur_ano; + finsi + si + type(champ_evenement(R, code), BOOLEEN) + et non (champ_evenement(R, montant) dans (0, 1)) + alors + nettoie_erreurs_finalisees; + leve_erreur A910; + calculer cible signaler_erreur_ano; + finsi +) +calculer cible set_rappel_ifi_prim; +FIN = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(FIN) + et meme_variable(champ_evenement(R, code), REGCO) + alors + calculer cible transfo_pena_regco : avec R; + si present(GLOBAL.REGCO) alors + si GLOBAL.REGCO - champ_evenement(R, montant) < 0 alors + champ_evenement(R, sens) = SENS_R; + champ_evenement(R, montant) = champ_evenement(R, montant) - GLOBAL.REGCO; + sinon + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, montant) = GLOBAL.REGCO - champ_evenement(R, montant); + finsi + FIN = 1; + finsi + finsi +) +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 8VV) alors + GLOBAL.PRESENT_8VV = 1; + sinon_si meme_variable(champ_evenement(R, code), 8VW) alors + GLOBAL.PRESENT_8VW = 1; + sinon_si meme_variable(champ_evenement(R, code), 9YT) alors + GLOBAL.PRESENT_9YT = 1; + si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9YT = 7; + sinon + GLOBAL.MONTANT_9YT = champ_evenement(R, montant); + finsi + GLOBAL.PENALITE_9YT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YT = champ_evenement(R, numero); + CORR.CMAJ2 = champ_evenement(R, montant); + GLOBAL.CMAJ2 = champ_evenement(R, montant); + si GLOBAL.MONTANT_9YT != 0 alors + GLOBAL.SENS_9YT = champ_evenement(R, sens); + GLOBAL.IND_20_9YT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9YT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9YU) alors + GLOBAL.PRESENT_9YU = 1; + GLOBAL.MONTANT_9YU = champ_evenement(R, montant); + GLOBAL.PENALITE_9YU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YU = champ_evenement(R, numero); + GLOBAL.SENS_9YU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + CORR.DATEINR = ANNEE * 10000 + MOIS * 100 + 1; + GLOBAL.DATEINR = CORR.DATEINR; + CORR.MOISAN2 = champ_evenement(R, montant); + GLOBAL.MOISAN2 = champ_evenement(R, montant); + GLOBAL.DATE_9YU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9YU)) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 9XT) alors + GLOBAL.PRESENT_9XT = 1; + si champ_evenement(R, montant) = 34 alors + GLOBAL.MONTANT_9XT = 8; + sinon_si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9XT = 7; + sinon + GLOBAL.MONTANT_9XT = champ_evenement(R, montant); + finsi + si champ_evenement(R, montant) = 34 alors + CORR.V_FLAGR34 = 1; + finsi + GLOBAL.PENALITE_9XT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XT = champ_evenement(R, numero); + si GLOBAL.MONTANT_9XT != 0 alors + GLOBAL.SENS_9XT = champ_evenement(R, sens); + GLOBAL.IND_20_9XT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9XT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9XU) alors + GLOBAL.PRESENT_9XU = 1; + GLOBAL.MONTANT_9XU = champ_evenement(R, montant); + GLOBAL.PENALITE_9XU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XU = champ_evenement(R, numero); + GLOBAL.SENS_9XU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + GLOBAL.DATE_9XU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9XT) ou positif(GLOBAL.PRESENT_9XU)) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + alors + champ_evenement(R, numero) = -1; + sinon + si + positif(GLOBAL.PRESENT_9YT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9YT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + si + positif(GLOBAL.PRESENT_9XT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9XT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + finsi +) +NB_RAPPELS = nb_evenements(); +NB_NOUVEAUX_RAPPELS = 0; +si + positif(GLOBAL.PRESENT_9YT) + et positif(GLOBAL.PRESENT_9YU) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi +si + positif(GLOBAL.PRESENT_9XT) + et positif(GLOBAL.PRESENT_9XU) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi + +cible set_id_evt: +application: iliad; +variables_temporaires: ID_EVT, NUM_EVT, NUM; +ID_EVT = 0; +GLOBAL.MAX_ID_EVT = 0; +NUM_EVT = champ_evenement(0, numero); +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + NUM = champ_evenement(R, numero); + si NUM != NUM_EVT alors + ID_EVT = ID_EVT + 1; + GLOBAL.MAX_ID_EVT = ID_EVT; + NUM_EVT = NUM; + finsi + champ_evenement(R, id_evt) = ID_EVT; +) + +cible test_9YT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9YT dans (0, 7, 8, 10, 11, 17, 18)) + et positif(CORR.APPLI_ILIAD + 0) + et ( + positif(CORR.CALCULIR + 0) + ou ( + (CORR.NOTRAIT + 0) dans (16, 23, 26, 33, 36, 43, 46, 53, 56) + ) + ) +); + +cible test_9XT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9XT dans (0, 7, 8, 10, 11, 17, 18, 34)) + et positif(CORR.APPLI_ILIAD + 0) + et (positif(CORR.CALCULIR + 0) ou CORR.NOTRAIT + 0 >= 16) +); + +cible test_mois_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = (CORR.NOTRAIT + 0 >= 16 et vers_mois(GLOBAL.DATE_9XU) <= 12); + +cible test_an_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + vers_annee(GLOBAL.DATE_9XU) = 0 + ou ( + vers_annee(GLOBAL.DATE_9XU) > GLOBAL.ANNEE_REVENU + et vers_annee(GLOBAL.DATE_9XU) < GLOBAL.ANNEE_REVENU + 7 + ) +); + +cible transf_2042_rappels: +application: iliad; +variables_temporaires: NUM_RAP, EST_ISF; +NUM_RAP = 0; +iterer +: variable VAR +: categorie * +: avec present(VAR) +: espace CORR +: dans ( + si dans_domaine(VAR, saisie famille) alors + GLOBAL.SF_PRIMITIF = 1; + sinon_si dans_domaine(VAR, saisie contexte) alors + GLOBAL.VAR = VAR; + sinon + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.VAR = indefini; + GLOBAL.ISF_PRIM = 0; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9XT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9XU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9XT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9XT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.VAR = indefini; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9YT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9YU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9YT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9YT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + finsi + finsi +) + +cible prepare_rappels_puis_calcul: +application: iliad; +variables_temporaires: TEST_9YT, TEST_9XT, TEST_MOIS_9XU, TEST_AN_9XU; +arranger_evenements +: ajouter NB_NOUVEAUX_RAPPELS +: dans ( + iterer + : variable R + : entre NB_RAPPELS..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, numero) = -1; + ) + NOUVEAU_RAPPEL = NB_RAPPELS; + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + si GLOBAL.MONTANT_9YT != 0 et GLOBAL.MONTANT_9YU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + si GLOBAL.MONTANT_9XT != 0 et GLOBAL.MONTANT_9XU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + + arranger_evenements + : trier R1, R2 : avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi + : filtrer R : avec + champ_evenement(R, numero) >= 0 + : dans ( + calculer cible set_id_evt; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, strate) = -1; + ) + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + calculer cible test_9YT : avec TEST_9YT; + si non positif(TEST_9YT) alors + nettoie_erreurs_finalisees; + leve_erreur A96102; + calculer cible signaler_erreur_ano; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + calculer cible test_9XT : avec TEST_9XT; + si non positif(TEST_9XT) alors + nettoie_erreurs_finalisees; + leve_erreur A96103; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_mois_9XU : avec TEST_MOIS_9XU; + si non positif(TEST_MOIS_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96303; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_an_9XU : avec TEST_AN_9XU; + si non positif(TEST_AN_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96304; + calculer cible signaler_erreur_ano; + finsi + finsi + calculer cible calcul_aux; + ) +) + +cible range_rappel: +application: iliad; +arguments: R; +calculer cible reset_codes_rappel; +CORR.PEN_RAPPEL = champ_evenement(R, penalite); +calculer cible verif_cohe_horizontale_corr; +calculer cible reset_codes_rappel; +si nb_anomalies() + nb_discordances() + nb_informatives() > 0 alors + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +finsi + +cible calcul_avec_rappels: +application: iliad; +variables_temporaires: TROUVE_0AZ; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible range_rappel : avec R; +) +TROUVE_0AZ = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(TROUVE_0AZ) + et meme_variable(champ_evenement(R, code), 0AZ) + alors + GLOBAL.ANNEE_DECES_CONJOINT = champ_evenement(R, montant); + TROUVE_0AZ = 1; + finsi +) +calculer cible prepare_rappels; +calculer cible prepare_rappels_puis_calcul; + +cible calcul: +application: iliad; +calculer cible init_variables; +iterer +: variable VAR +: categorie * +: espace GLOBAL +: dans ( + CORR.VAR = VAR; +) +CORR.IND_TRAIT = 5; # correctif +si nb_evenements() = 0 alors + arranger_evenements + : ajouter 1 + : dans ( + champ_evenement(0, rappel) = 1; + champ_evenement(0, numero) = 1; + champ_evenement(0, code) reference ANREV; + champ_evenement(0, sens) = SENS_R; + champ_evenement(0, montant) = 0; + champ_evenement(0, penalite) = 1; + champ_evenement(0, base_tl) = 0; + champ_evenement(0, date) = vers_date(1, GLOBAL.ANNEE_REVENU + 1); + champ_evenement(0, 2042_rect) = 0; + champ_evenement(0, anc_penalite) = 0; + champ_evenement(0, id_evt) = -1; + champ_evenement(0, strate) = -1; + calculer cible calcul_avec_rappels; + ) +sinon + calculer cible calcul_avec_rappels; +finsi +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) + +#{ tester l'existence des attributs dans les fonctions attribut(...), + meme_variable(...), dans_domaine(...) }# +#{ contrôler les espaces dans l'usage des références }# +#{ dans_espace(...), dans_tableau(...) }# +#{ tester si la variable d'itération existe déjà ailleurs }# +#{ compléter exec_verif avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ cas des tableaux statiques avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ déplacer les expansions dans mir.ml }# + diff --git a/m_ext/2022/main.m b/m_ext/2022/main.m new file mode 100644 index 000000000..f75dbb6f3 --- /dev/null +++ b/m_ext/2022/main.m @@ -0,0 +1,25 @@ +# primitif iterpréteur + +cible enchaineur_primitif: +application: iliad; +GLOBAL.IND_TRAIT = 4; # primitif +GLOBAL.ANCSDED = ANREV + 1; +calculer cible enchaine_verification_prim; +si nb_anomalies() = 0 alors + calculer cible calcul_primitif_isf_prim; + calculer cible verif_calcul_primitive_isf_prim; + calculer cible enchaine_calcul_prim; +finsi +# finalise_erreurs; +# exporte_erreurs; + +cible enchaineur_correctif: +application: iliad; +calculer cible calcul; + +cible enchainement_primitif_interpreteur: +application: iliad; +V_IND_TRAIT = 4; # primitif +calculer cible enchainement_primitif; +exporte_erreurs; + diff --git a/m_ext/2023/cibles.m b/m_ext/2023/cibles.m index 8099f566c..48c3fcce3 100644 --- a/m_ext/2023/cibles.m +++ b/m_ext/2023/cibles.m @@ -1,5 +1,268 @@ # compir +espace_variables CORR : categorie saisie, calculee, base; +espace_variables D2042 : categorie saisie; +espace_variables D2042_ABAT : categorie saisie; +espace_variables D2042_RECT : categorie saisie; +espace_variables D2042_CTXT : categorie saisie; +espace_variables TL_D2042 : categorie saisie; +espace_variables TL_D2042_INIT : categorie saisie; +espace_variables TL_D2042_RECT : categorie saisie; +espace_variables TL_D2042_ABAT : categorie saisie; +espace_variables TL_D2042_ABAT_INIT : categorie saisie; +espace_variables TL_D2042_ABAT_RECT : categorie saisie; +espace_variables INR_D2042 : categorie saisie; +espace_variables INR_D2042_PROV_ANT : categorie saisie; +espace_variables INR_D2042_REFR99R_ANT : categorie saisie; +espace_variables INR_D2042_R9901_ANT : categorie saisie; +espace_variables MAJO_D2042_STRATE : categorie saisie; +espace_variables MAJO_D2042_REF_ABAT : categorie saisie; +espace_variables MAJO_D2042_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_STRATE : categorie saisie; + +ANNEE_REVENU : calculee primrest = 0 : "" ; +NB_STRATES : calculee primrest = 0 : "" ; +MODE_CORR : saisie environnement toto = 0 alias EST_CORR : "" ; + +# Données globales +PRESENT_8VV : calculee primrest = 0 : "" ; +PRESENT_8VW : calculee primrest = 0 : "" ; +PRESENT_9YT : calculee primrest = 0 : "" ; +MONTANT_9YT : calculee primrest = 0 : "" ; +PENALITE_9YT : calculee primrest = 0 : "" ; +SENS_9YT : calculee primrest = 0 : "" ; +NUM_EVT_9YT : calculee primrest = 0 : "" ; +IND_20_9YT : calculee primrest = 0 : "" ; +BASE_TL_9YT : calculee primrest = 0 : "" ; +PRESENT_9YU : calculee primrest = 0 : "" ; +MONTANT_9YU : calculee primrest = 0 : "" ; +PENALITE_9YU : calculee primrest = 0 : "" ; +SENS_9YU : calculee primrest = 0 : "" ; +NUM_EVT_9YU : calculee primrest = 0 : "" ; +DATE_9YU : calculee primrest = 0 : "" ; +PRESENT_9XT : calculee primrest = 0 : "" ; +MONTANT_9XT : calculee primrest = 0 : "" ; +PENALITE_9XT : calculee primrest = 0 : "" ; +SENS_9XT : calculee primrest = 0 : "" ; +NUM_EVT_9XT : calculee primrest = 0 : "" ; +IND_20_9XT : calculee primrest = 0 : "" ; +BASE_TL_9XT : calculee primrest = 0 : "" ; +PRESENT_9XU : calculee primrest = 0 : "" ; +MONTANT_9XU : calculee primrest = 0 : "" ; +PENALITE_9XU : calculee primrest = 0 : "" ; +SENS_9XU : calculee primrest = 0 : "" ; +NUM_EVT_9XU : calculee primrest = 0 : "" ; +DATE_9XU : calculee primrest = 0 : "" ; +PRESENT_REGCO : calculee primrest = 0 : "" ; +PENALITE_REGCO : calculee primrest = 0 : "" ; +NUM_EVT_REGCO : calculee primrest = 0 : "" ; +NUM_RAP_REGCO : calculee primrest = 0 : "" ; +IND_20_REGCO : calculee primrest = 0 : "" ; +PREMIER_EVT : calculee primrest = 0 : "" ; +CODE_9ZA : calculee primrest = 0 : "" ; +SAUVE_INR_R99 : calculee primrest = 0 : "" ; +ANNEE_DECES_CONJOINT : calculee primrest = 0 : "" ; +NB_RAPPELS_RES : calculee primrest = 0 : "" ; + +# sommes inr 2 +INR_SOMMEBAND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBA_2 : calculee primrest = 0 : "" ; +INR_SOMMEBICND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBIC_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNCND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNC_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBAL_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBND_2 : calculee primrest = 0 : "" ; +INR_SOMMELOC_2 : calculee primrest = 0 : "" ; +INR_SOMMEMOND_2 : calculee primrest = 0 : "" ; +INR_SOMMERCM_2 : calculee primrest = 0 : "" ; +INR_SOMMERF_2 : calculee primrest = 0 : "" ; +INR_SOMMERI_2 : calculee primrest = 0 : "" ; + +# Données de Reference +D2042_NB : calculee primrest = 0 : "" ; +DEFAUT : calculee primrest = 0 : "" ; +DEFAUT10 : calculee primrest = 0 : "" ; +DEFAUT11 : calculee primrest = 0 : "" ; +DEFAUT1011 : calculee primrest = 0 : "" ; +RETARD : calculee primrest = 0 : "" ; +RETARD07 : calculee primrest = 0 : "" ; +RETARD08 : calculee primrest = 0 : "" ; +RETARD0718 : calculee primrest = 0 : "" ; +RETARD101718 : calculee primrest = 0 : "" ; +RETARD22 : calculee primrest = 0 : "" ; +RETARD99 : calculee primrest = 0 : "" ; +RECTIF : calculee primrest = 0 : "" ; +RECTIF_MAJO : calculee primrest = 0 : "" ; +MENTION_EXP : calculee primrest = 0 : "" ; +CORR_RJLJ : calculee primrest = 0 : "" ; +CODE_PENA : calculee primrest = 0 : "" ; +CODE_PENA_ISF : calculee primrest = 0 : "" ; +DATE : calculee primrest = 0 : "" ; +SF_INITIALE : calculee primrest = 0 : "" ; +SF_COURANTE : calculee primrest = 0 : "" ; +SF_PRIMITIF : calculee primrest = 0 : "" ; +R_TARDIF : calculee primrest = 0 : "" ; +LIMELIGHT : calculee primrest = 0 : "" ; +ISF_PRIM : calculee primrest = 0 : "" ; +PRESENT_R10 : calculee primrest = 0 : "" ; +PRESENT_R30 : calculee primrest = 0 : "" ; +PRESENT_R32 : calculee primrest = 0 : "" ; +PREM_8_11 : calculee primrest = 0 : "" ; +PENA_994 : calculee primrest = 0 : "" ; +FLAGMENC : calculee primrest = 0 : "" ; + +# tl +TL_D2042_NB : calculee primrest = 0 : "" ; +TL_D2042_INIT_NB : calculee primrest = 0 : "" ; +TL_D2042_RECT_NB : calculee primrest = 0 : "" ; +TL_BASE_TL : calculee primrest = 0 : "" ; +TL_BASE_TL_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_RECT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_RECT : calculee primrest = 0 : "" ; +TL_NON_ACQUISE : calculee primrest = 0 : "" ; + +# tl mauvaise foi +TL_MF_MFCDIS : calculee primrest = 0 : "" ; +TL_MF_MFCHR : calculee primrest = 0 : "" ; +TL_MF_MFCHR7 : calculee primrest = 0 : "" ; +TL_MF_MFCS : calculee primrest = 0 : "" ; +TL_MF_MFCSAL : calculee primrest = 0 : "" ; +TL_MF_MFCVN : calculee primrest = 0 : "" ; +TL_MF_MFGAIN : calculee primrest = 0 : "" ; +TL_MF_MFGLO : calculee primrest = 0 : "" ; +TL_MF_MFIFI : calculee primrest = 0 : "" ; +TL_MF_MFIR : calculee primrest = 0 : "" ; +TL_MF_MFLOY : calculee primrest = 0 : "" ; +TL_MF_MFMCSG820 : calculee primrest = 0 : "" ; +TL_MF_MFPCAP : calculee primrest = 0 : "" ; +TL_MF_MFPS : calculee primrest = 0 : "" ; +TL_MF_MFPSOL : calculee primrest = 0 : "" ; +TL_MF_MFRD : calculee primrest = 0 : "" ; +TL_MF_MFREGV : calculee primrest = 0 : "" ; +TL_MF_MFRSE1 : calculee primrest = 0 : "" ; +TL_MF_MFRSE2 : calculee primrest = 0 : "" ; +TL_MF_MFRSE3 : calculee primrest = 0 : "" ; +TL_MF_MFRSE4 : calculee primrest = 0 : "" ; +TL_MF_MFRSE5 : calculee primrest = 0 : "" ; +TL_MF_MFRSE6 : calculee primrest = 0 : "" ; +TL_MF_MFRSE7 : calculee primrest = 0 : "" ; +TL_MF_MFTAXAGA : calculee primrest = 0 : "" ; + +# inr +INR_NB_MOIS : calculee primrest = 0 : "" ; +INR_NB_MOIS2 : calculee primrest = 0 : "" ; +INR_NB_MOIS_ISF : calculee primrest = 0 : "" ; +INR_ANNEE_COR : calculee primrest = 0 : "" ; +INR_PASDINR : calculee primrest = 0 : "" ; + +# majo +MAJO_D2042_STRATE_NB : calculee primrest = 0 : "" ; +MAJO_D2042_P_NB : calculee primrest = 0 : "" ; +MAJO_TAUX_STRATE : calculee primrest = 0 : "" ; +MAJO_CODE_STRATE : calculee primrest = 0 : "" ; +MAJO_TARDIF_EVT2 : calculee primrest = 0 : "" ; +MAJO_STR_TR_00 : calculee primrest = 0 : "" ; +MAJO_STR_TR_01 : calculee primrest = 0 : "" ; +MAJO_STR_TR_02 : calculee primrest = 0 : "" ; +MAJO_STR_TR_03 : calculee primrest = 0 : "" ; +MAJO_STR_TR_04 : calculee primrest = 0 : "" ; +MAJO_STR_TR_05 : calculee primrest = 0 : "" ; +MAJO_STR_TR_06 : calculee primrest = 0 : "" ; +MAJO_STR_TR_07 : calculee primrest = 0 : "" ; +MAJO_STR_TR_08 : calculee primrest = 0 : "" ; +MAJO_STR_TR_09 : calculee primrest = 0 : "" ; +MAJO_STR_TR_10 : calculee primrest = 0 : "" ; +MAJO_STR_TR_11 : calculee primrest = 0 : "" ; +MAJO_STR_TR_12 : calculee primrest = 0 : "" ; +MAJO_STR_TR_13 : calculee primrest = 0 : "" ; +MAJO_STR_TR_14 : calculee primrest = 0 : "" ; +MAJO_STR_TR_15 : calculee primrest = 0 : "" ; +MAJO_STR_TR_16 : calculee primrest = 0 : "" ; +MAJO_STR_TR_17 : calculee primrest = 0 : "" ; +MAJO_STR_TR_18 : calculee primrest = 0 : "" ; +MAJO_STR_TR_19 : calculee primrest = 0 : "" ; +MAJO_STR_TR_20 : calculee primrest = 0 : "" ; +MAJO_STR_TR_21 : calculee primrest = 0 : "" ; +MAJO_STR_TR_22 : calculee primrest = 0 : "" ; +MAJO_STR_TR_23 : calculee primrest = 0 : "" ; +MAJO_STR_TR_24 : calculee primrest = 0 : "" ; +MAJO_STR_TR_25 : calculee primrest = 0 : "" ; +MAJO_PREM_STR : calculee primrest = 0 : "" ; +MAJO_NB_STR_TR : calculee primrest = 0 : "" ; +MAJO_DERN_STR_TR : calculee primrest = 0 : "" ; +MAJO_NUM_STRATE : calculee primrest = 0 : "" ; + +# prorata +MAJO_T_RABP : calculee primrest = 0 : "" ; +MAJO_T_RABP07 : calculee primrest = 0 : "" ; +MAJO_T_RABP08 : calculee primrest = 0 : "" ; +MAJO_T_RABP09 : calculee primrest = 0 : "" ; +MAJO_T_RABP10 : calculee primrest = 0 : "" ; +MAJO_T_RABP11 : calculee primrest = 0 : "" ; +MAJO_T_RABP12 : calculee primrest = 0 : "" ; +MAJO_T_RABP17 : calculee primrest = 0 : "" ; +MAJO_T_RABP31 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS : calculee primrest = 0 : "" ; +MAJO_T_RABPPS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS : calculee primrest = 0 : "" ; +MAJO_T_RABPCS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD : calculee primrest = 0 : "" ; +MAJO_T_RABPRD07 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD08 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD09 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD10 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD11 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD12 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD17 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH : calculee primrest = 0 : "" ; +MAJO_T_RABPCH07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH31 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO : calculee primrest = 0 : "" ; +MAJO_T_RABPLO07 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO08 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO09 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO10 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO11 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO12 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO17 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO31 : calculee primrest = 0 : "" ; + +# art1731 +ART1731_SOMME_R3032 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R10 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R30 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R32 : calculee primrest = 0 : "" ; + +# rappels +NB_RAPPELS : calculee primrest = 0 : "" ; +NB_NOUVEAUX_RAPPELS : calculee primrest = 0 : "" ; +NOUVEAU_RAPPEL : calculee primrest = 0 : "" ; + cible regle_1: application: iliad; BIDON = 1; @@ -773,232 +1036,6 @@ si nb_discordances() + nb_informatives() > 0 alors exporte_erreurs; finsi -fonction truc: -application: iliad; -arguments: A0, A1; -resultat: RES; -variables_temporaires: TOTO; -#V_IND_TRAIT = 4; -afficher_erreur "truc\n" indenter(2); -TOTO = 1; -iterer -: variable I -: entre A0 .. A1 increment 1 -: dans ( - si I = A0 alors - RES = 1; - sinon - RES = 2 * RES + TOTO; - finsi - afficher_erreur (I) ": " (RES) "\n"; -) -afficher_erreur indenter(-2); - -cible test_boucle: -application: iliad; -arguments: I0, I1; -variables_temporaires: TOTO; -TOTO = 0; -iterer -: variable I -: entre I0 .. I1 increment 0.7 -: entre 2 .. 1 increment -1 -: dans ( - iterer - : variable J - : entre -3 .. -1 increment 1 - : entre 1 .. 0 increment -1 - : dans ( - afficher_erreur nom(I) " = " (I) ", " nom(J) " = " (J) "\n"; - ) -) -TOTO = truc(TOTO, truc(4, truc(7, 9))); -afficher_erreur "truc: " (TOTO) "\n"; - -cible afficher_evenement: -application: iliad; -arguments: I; -afficher_erreur (I) ": "; -si (present(champ_evenement(I, numero))) alors afficher_erreur (champ_evenement(I, numero)); finsi -afficher_erreur "/"; -si (present(champ_evenement(I, rappel))) alors afficher_erreur (champ_evenement(I, rappel)); finsi -afficher_erreur "/" alias(champ_evenement(I, code)) "," nom(champ_evenement(I, code)) "/"; -si (present(champ_evenement(I, montant))) alors afficher_erreur (champ_evenement(I, montant)); finsi -afficher_erreur "/"; -si (present(champ_evenement(I, sens))) alors - si (champ_evenement(I, sens) = 0) alors - afficher_erreur "R"; - sinon_si (champ_evenement(I, sens) = 1) alors - afficher_erreur "C"; - sinon_si (champ_evenement(I, sens) = 2) alors - afficher_erreur "M"; - sinon_si (champ_evenement(I, sens) = 3) alors - afficher_erreur "P"; - finsi -finsi -afficher_erreur "/"; -si (present(champ_evenement(I, penalite))) alors afficher_erreur (champ_evenement(I, penalite)); finsi -afficher_erreur "/"; -si (present(champ_evenement(I, base_tl))) alors afficher_erreur (champ_evenement(I, base_tl)); finsi -afficher_erreur "/"; -si (present(champ_evenement(I, date))) alors afficher_erreur (champ_evenement(I, date)); finsi -afficher_erreur "/"; -si (present(champ_evenement(I, 2042_rect))) alors afficher_erreur (champ_evenement(I, 2042_rect)); finsi - -cible afficher_evenements: -application: iliad; -iterer -: variable I -: entre 0 .. (nb_evenements() - 1) increment 1 -: dans ( - calculer cible afficher_evenement : avec I; - afficher_erreur "\n"; -) - -cible test_evenements: -application: iliad; -variables_temporaires: A0, A1, EVT; -A0 = 1.6; -A1 = 3.6; -calculer cible test_boucle : avec A0, A1; -afficher_erreur "\n"; -afficher_erreur "nb_evenements() = " (nb_evenements()) "\n"; -afficher_erreur "\n"; -calculer cible afficher_evenements; -afficher_erreur "\n"; -si nb_evenements() > 0 alors - afficher_erreur "0: " nom(champ_evenement(0, code)) " = " (champ_evenement(0, code)) "\n"; - champ_evenement(0, code) = 456; - afficher_erreur "1: " nom(champ_evenement(0, code)) " = " (champ_evenement(0, code)) "\n"; - afficher_erreur "0: montant " (champ_evenement(0, montant)) "\n"; - champ_evenement(0, montant) = 123.456; - afficher_erreur "1: montant " (champ_evenement(0, montant)) "\n"; -sinon - afficher_erreur "!!! AUCUN EVENEMENT !!!\n"; -finsi -afficher_erreur "\n"; -arranger_evenements -: trier I, J : avec - champ_evenement(I, rappel) <= champ_evenement(J, rappel) - ou ( - champ_evenement(I, rappel) = champ_evenement(J, rappel) - et champ_evenement(I, montant) <= champ_evenement(J, montant) - ) -: filtrer I : avec 32 <= champ_evenement(I, rappel) et champ_evenement(I, rappel) <= 55 -: ajouter 3 -: dans ( - champ_evenement(0, code) reference COD1AM; - champ_evenement(1, code) reference COD1AR; - champ_evenement(2, code) reference COD1AV; - calculer cible afficher_evenements; -) -afficher_erreur "\n"; -arranger_evenements -: trier I, J : avec champ_evenement(I, rappel) <= champ_evenement(J, rappel) -: dans ( - EVT = 25; - afficher_erreur "nb_evenements() = " (nb_evenements()) "\n"; - afficher_erreur "0: "; - calculer cible afficher_evenement : avec EVT; - afficher_erreur "\n"; - iterer : variable I : entre 0 .. nb_evenements() increment 1 : dans ( - si inf(champ_evenement(I, rappel) % 2) = 0 alors - afficher_erreur "0: "; - calculer cible afficher_evenement : avec I; - afficher_erreur "\n"; - finsi - ) - afficher_erreur "\n"; - restaurer - : evenements EVT - : evenement I : avec inf(champ_evenement(I, rappel) % 2) = 0 - : apres ( - champ_evenement(EVT, montant) = 111111.111111; - afficher_erreur "1: "; - calculer cible afficher_evenement : avec EVT; - afficher_erreur "\n"; - iterer : variable I : entre 0 .. nb_evenements() increment 1 : dans ( - si inf(champ_evenement(I, rappel) % 2) = 0 alors - champ_evenement(I, montant) = 111111.111111; - afficher_erreur "1: "; - calculer cible afficher_evenement : avec I; - afficher_erreur "\n"; - finsi - ) - ) - afficher_erreur "\n"; - afficher_erreur "2: "; - calculer cible afficher_evenement : avec EVT; - afficher_erreur "\n"; - iterer : variable I : entre 0 .. nb_evenements() increment 1 : dans ( - si inf(champ_evenement(I, rappel) % 2) = 0 alors - afficher_erreur "2: "; - calculer cible afficher_evenement : avec I; - afficher_erreur "\n"; - finsi - ) -) -afficher_erreur "\n"; -EVT = 25; -afficher_erreur "0: "; -calculer cible afficher_evenement : avec EVT; -afficher_erreur "\n"; -restaurer -: evenements EVT -: apres ( - champ_evenement(EVT, code) reference COD1AV; - afficher_erreur "1: "; - calculer cible afficher_evenement : avec EVT; - afficher_erreur "\n"; -) -afficher_erreur "2: "; -calculer cible afficher_evenement : avec EVT; -afficher_erreur "\n"; -afficher_erreur "taille(" nom(champ_evenement(EVT, code)) ") = " (taille(champ_evenement(EVT, code))) "\n"; -afficher_erreur "taille(" nom(champ_evenement(1000, code)) ") = " (taille(champ_evenement(1000, code))) "\n"; -afficher_erreur "\n"; -champ_evenement(EVT, code) reference COD1AV; -afficher_erreur "attribut(" nom(COD1AV) ") = " (attribut(COD1AV, primrest)) "\n"; -afficher_erreur - "attribut(" nom(champ_evenement(EVT, code)) ", primrest) = " - (attribut(champ_evenement(EVT, code), primrest)) "\n"; -afficher_erreur - "attribut(" nom(champ_evenement(1000, code)) ", primrest) = " - (attribut(champ_evenement(1000, code), primrest)) "\n"; -afficher_erreur "\n"; - -TAILLE_TOTO : const = 3; - -cible test_tableaux: -application : iliad; -variables_temporaires: TOTO tableau[TAILLE_TOTO], NB; -NB = TAILLE_TOTO - 1; -afficher_erreur "test_tableaux\n" indenter(2); -TOTO[0] = 1; -iterer : variable I : entre 1..NB increment 1 : dans ( - TOTO[I] = 1 + TOTO[I - 1]; -) -iterer : variable I : entre 0..NB increment 1 : dans ( - afficher_erreur "TOTO[" (I) "] = " (TOTO[I]) "\n"; -) -afficher_erreur "\n"; -restaurer : TOTO : apres ( - iterer : variable I : entre 0..NB increment 1 : dans ( - TOTO[I] = indefini; - afficher_erreur "TOTO[" (I) "] = " (TOTO[I]) "\n"; - ) -) -afficher_erreur "\n"; -iterer : variable I : entre 0..NB increment 1 : dans ( - afficher_erreur "TOTO[" (I) "] = " (TOTO[I]) "\n"; -) -afficher_erreur indenter(-2) "test_tableaux\n\n"; - -cible test: -application: iliad; -calculer cible test_evenements; -calculer cible test_tableaux; - cible enchainement_primitif: application: iliad; variables_temporaires: EXPORTE_ERREUR; @@ -1037,86 +1074,166 @@ puis_quand nb_anomalies() = 0 faire calculer cible trace_out; #afficher_erreur "]traite_double_liquidation2\n"; -# correctif +# ??? -cible enchainement_correctif: +cible traite_double_liquidation_2_prim: application: iliad; -neant; +calculer cible traite_double_liquidation_2 : espace GLOBAL; -# iterpréteur +cible traite_double_liquidation_2_corr: +application: iliad; +nettoie_erreurs; +calculer cible traite_double_liquidation_2 : espace CORR; -cible enchainement_primitif_interpreteur: +cible sauve_base_initial_prim: application: iliad; -si V_IND_TRAIT = 4 alors # primitif - calculer cible enchainement_primitif; -sinon_si V_IND_TRAIT = 5 alors # correctif - calculer cible enchainement_correctif; -finsi -#calculer cible test; +calculer cible sauve_base_initial : espace GLOBAL; -#{ +cible sauve_base_initial_corr: +application: iliad; +calculer cible sauve_base_initial : espace CORR; -# debug +cible sauve_base_1728_prim: +application: iliad; +calculer cible sauve_base_1728 : espace GLOBAL; -cible toto: +cible sauve_base_1728_corr: application: iliad; -afficher "toto " "FLAG_PVRO=" (FLAG_PVRO) " tutu" "\n"; -afficher_erreur "toto " nom(FLAG_PVRO) " " alias(FLAG_PVRO) "+27.745=" (FLAG_PVRO + 27.745) " tutu " (indefini) "\n"; -afficher_erreur "toto " "27.745=" (0 + 27.745) : 0 .. 2 " tutu " (3 * indefini) "\n"; +calculer cible sauve_base_1728 : espace CORR; -cible tutu: +cible sauve_base_anterieure_prim: application: iliad; -iterer -: variable ITC -: categorie saisie revenu -: avec attribut(ITC, acompte) = 0 -: dans ( - afficher_erreur "tutu0 " nom(ITC) " (" alias(ITC) ") = " (ITC) : 0..2 "\n"; - afficher_erreur "tutu1 attribut(" nom(ITC) ", acompte) = " (attribut(ITC, acompte)) : 0 "\n"; - afficher_erreur "tutu1 attribut(" nom(V_VAR7WZ) ", acompte) = " (attribut(V_VAR7WZ, acompte)) : 0 "\n"; -) +calculer cible sauve_base_anterieure : espace GLOBAL; -cible titi: -application : iliad; -variables_temporaires: TOTO tableau[3]; -TOTO[0] = 0; -TOTO[1] = 1 + TOTO[0]; -TOTO[2] = 2 + TOTO[1]; -afficher_erreur "titi debut\n"; -afficher_erreur "titi0 TOTO[0] = " (TOTO[0]) " TOTO[1] = " (TOTO[1]) " TOTO[2] = " (TOTO[2]) "\n"; -afficher_erreur "titi0 " nom(FLAG_PVRO) " = " (FLAG_PVRO) "\n"; -iterer -: variable ITC : categorie saisie contexte : avec present(ITC) -: dans ( - afficher_erreur "titi0 " nom(ITC) " = " (ITC) "\n"; -) -afficher_erreur "\n"; -restaurer -: variables FLAG_PVRO, TOTO -: variable RESTREV : categorie saisie contexte : avec present(RESTREV) -: apres ( - FLAG_PVRO = indefini; - afficher_erreur "titi1 " nom(FLAG_PVRO) " = " (FLAG_PVRO) "\n"; - TOTO[0] = indefini; - TOTO[1] = indefini; - TOTO[2] = indefini; - afficher_erreur "titi1 TOTO[0] = " (TOTO[0]) " TOTO[1] = " (TOTO[1]) " TOTO[2] = " (TOTO[2]) "\n"; - iterer - : variable ITC : categorie saisie contexte : avec present(ITC) - : dans ( - ITC = indefini; - afficher_erreur "titi1 " nom(ITC) " = " (ITC) "\n"; - ) -) -afficher_erreur "\n"; -afficher_erreur "toiti2 TOTO[0] = " (TOTO[0]) " TOTO[1] = " (TOTO[1]) " TOTO[2] = " (TOTO[2]) "\n"; -afficher_erreur "titi2 " nom(FLAG_PVRO) " = " (FLAG_PVRO) "\n"; -iterer -: variable ITC : categorie saisie contexte : avec present(ITC) -: dans ( - afficher_erreur "titi2 " nom(ITC) " = " (ITC) "\n"; -) -afficher_erreur "titi fin\n\n"; +cible sauve_base_anterieure_corr: +application: iliad; +calculer cible sauve_base_anterieure : espace CORR; + +cible sauve_base_anterieure_cor_prim: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace GLOBAL; + +cible sauve_base_anterieure_cor_corr: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace CORR; + +cible sauve_base_inr_inter22_prim: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace GLOBAL; + +cible sauve_base_inr_inter22_corr: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace CORR; + +cible verif_saisie_cohe_primitive_prim: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace GLOBAL; + +cible verif_saisie_cohe_primitive_corr: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace CORR; + +cible verif_saisie_cohe_corrective_prim: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace GLOBAL; + +cible verif_saisie_cohe_corrective_corr: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace CORR; + +cible verif_cohe_horizontale_corr: +application: iliad; +calculer cible verif_cohe_horizontale : espace CORR; + +cible calcul_primitif_isf_prim: +application: iliad; +calculer cible calcul_primitif_isf : espace GLOBAL; + +cible verif_calcul_primitive_isf_prim: +application: iliad; +calculer cible verif_calcul_primitive_isf : espace GLOBAL; + +cible ench_tl_corr : +application: iliad; +calculer cible ENCH_TL : espace CORR; + +cible sauve_base_inr_r9901_corr : +application: iliad; +calculer cible sauve_base_inr_r9901 : espace CORR; + +cible sauve_base_HR_corr : +application: iliad; +calculer cible sauve_base_HR : espace CORR; + +cible sauve_base_inr_ref_corr : +application: iliad; +calculer cible sauve_base_inr_ref : espace CORR; -}# +cible sauve_base_inr_ntl_corr : +application: iliad; +calculer cible sauve_base_inr_ntl : espace CORR; + +cible sauve_base_abat98_corr : +application: iliad; +calculer cible sauve_base_abat98 : espace CORR; + +cible sauve_base_abat99_corr : +application: iliad; +calculer cible sauve_base_abat99 : espace CORR; + +cible sauve_base_inr_corr : +application: iliad; +calculer cible sauve_base_inr : espace CORR; + +cible sauve_base_inr_intertl_corr : +application: iliad; +calculer cible sauve_base_inr_intertl : espace CORR; + +cible sauve_base_inr_ntl22_corr : +application: iliad; +calculer cible sauve_base_inr_ntl22 : espace CORR; + +cible sauve_base_inr_ntl24_corr : +application: iliad; +calculer cible sauve_base_inr_ntl24 : espace CORR; + +cible sauve_base_inr_tl22_corr : +application: iliad; +calculer cible sauve_base_inr_tl22 : espace CORR; + +cible sauve_base_inr_tl24_corr : +application: iliad; +calculer cible sauve_base_inr_tl24 : espace CORR; + +cible sauve_base_inr_tl_corr : +application: iliad; +calculer cible sauve_base_inr_tl : espace CORR; + +cible sauve_base_majo_corr : +application: iliad; +calculer cible sauve_base_majo : espace CORR; + +cible sauve_base_premier_corr : +application: iliad; +calculer cible sauve_base_premier : espace CORR; + +cible sauve_base_stratemajo_corr : +application: iliad; +calculer cible sauve_base_stratemajo : espace CORR; + +cible sauve_base_tl_corr : +application: iliad; +calculer cible sauve_base_tl : espace CORR; + +cible sauve_base_tl_init_corr : +application: iliad; +calculer cible sauve_base_tl_init : espace CORR; + +cible sauve_base_tl_rect_corr : +application: iliad; +calculer cible sauve_base_tl_rect : espace CORR; + +cible verif_calcul_corrective_corr : +application: iliad; +calculer cible verif_calcul_corrective : espace CORR; diff --git a/m_ext/2023/codes_1731.m b/m_ext/2023/codes_1731.m new file mode 100644 index 000000000..03f6668e9 --- /dev/null +++ b/m_ext/2023/codes_1731.m @@ -0,0 +1,949 @@ +cible range_base_corr_corrige: +application: iliad; +si present(GLOBAL.A10RFOR_1) alors CORR.A10RFOR1731 = GLOBAL.A10RFOR_1; finsi +si present(GLOBAL.ACELGS_1) alors CORR.ACELGS1731 = GLOBAL.ACELGS_1; finsi +si present(GLOBAL.ACELGU_1) alors CORR.ACELGU1731 = GLOBAL.ACELGU_1; finsi +si present(GLOBAL.ACELGX_1) alors CORR.ACELGX1731 = GLOBAL.ACELGX_1; finsi +si present(GLOBAL.ACELP1A_1) alors CORR.ACELP1A1731 = GLOBAL.ACELP1A_1; finsi +si present(GLOBAL.ACELP1B_1) alors CORR.ACELP1B1731 = GLOBAL.ACELP1B_1; finsi +si present(GLOBAL.ACELP1C_1) alors CORR.ACELP1C1731 = GLOBAL.ACELP1C_1; finsi +si present(GLOBAL.ACELP1D_1) alors CORR.ACELP1D1731 = GLOBAL.ACELP1D_1; finsi +si present(GLOBAL.ACELP1E_1) alors CORR.ACELP1E1731 = GLOBAL.ACELP1E_1; finsi +si present(GLOBAL.ACELP2A_1) alors CORR.ACELP2A1731 = GLOBAL.ACELP2A_1; finsi +si present(GLOBAL.ACELP2B_1) alors CORR.ACELP2B1731 = GLOBAL.ACELP2B_1; finsi +si present(GLOBAL.ACELP2C_1) alors CORR.ACELP2C1731 = GLOBAL.ACELP2C_1; finsi +si present(GLOBAL.ACELP2D_1) alors CORR.ACELP2D1731 = GLOBAL.ACELP2D_1; finsi +si present(GLOBAL.ACELP2E_1) alors CORR.ACELP2E1731 = GLOBAL.ACELP2E_1; finsi +si present(GLOBAL.ACELREPWT_1) alors CORR.ACELREPWT1731 = GLOBAL.ACELREPWT_1; finsi +si present(GLOBAL.ACELREPWU_1) alors CORR.ACELREPWU1731 = GLOBAL.ACELREPWU_1; finsi +si present(GLOBAL.ACELREPWV_1) alors CORR.ACELREPWV1731 = GLOBAL.ACELREPWV_1; finsi +si present(GLOBAL.ACELREPWW_1) alors CORR.ACELREPWW1731 = GLOBAL.ACELREPWW_1; finsi +si present(GLOBAL.ACELREPYT_1) alors CORR.ACELREPYT1731 = GLOBAL.ACELREPYT_1; finsi +si present(GLOBAL.ACELREPYU_1) alors CORR.ACELREPYU1731 = GLOBAL.ACELREPYU_1; finsi +si present(GLOBAL.ACELREPYV_1) alors CORR.ACELREPYV1731 = GLOBAL.ACELREPYV_1; finsi +si present(GLOBAL.ACELREPYW_1) alors CORR.ACELREPYW1731 = GLOBAL.ACELREPYW_1; finsi +si present(GLOBAL.ACELRT_1) alors CORR.ACELRT1731 = GLOBAL.ACELRT_1; finsi +si present(GLOBAL.ACELRU_1) alors CORR.ACELRU1731 = GLOBAL.ACELRU_1; finsi +si present(GLOBAL.ACELWX_1) alors CORR.ACELWX1731 = GLOBAL.ACELWX_1; finsi +si present(GLOBAL.ACELWY_1) alors CORR.ACELWY1731 = GLOBAL.ACELWY_1; finsi +si present(GLOBAL.ACELWZ_1) alors CORR.ACELWZ1731 = GLOBAL.ACELWZ_1; finsi +si present(GLOBAL.ACELZM_1) alors CORR.ACELZM1731 = GLOBAL.ACELZM_1; finsi +si present(GLOBAL.ACINE_1) alors CORR.ACINE1731 = GLOBAL.ACINE_1; finsi +si present(GLOBAL.ACODJTJU_1) alors CORR.ACODJTJU1731 = GLOBAL.ACODJTJU_1; finsi +si present(GLOBAL.ACODJZ_1) alors CORR.ACODJZ1731 = GLOBAL.ACODJZ_1; finsi +si present(GLOBAL.ACODMW_1) alors CORR.ACODMW1731 = GLOBAL.ACODMW_1; finsi +si present(GLOBAL.ACODMZ_1) alors CORR.ACODMZ1731 = GLOBAL.ACODMZ_1; finsi +si present(GLOBAL.ACODOU_1) alors CORR.ACODOU1731 = GLOBAL.ACODOU_1; finsi +si present(GLOBAL.ACODOX_1) alors CORR.ACODOX1731 = GLOBAL.ACODOX_1; finsi +si present(GLOBAL.ACODOY_1) alors CORR.ACODOY1731 = GLOBAL.ACODOY_1; finsi +si present(GLOBAL.ACODPZ_1) alors CORR.ACODPZ1731 = GLOBAL.ACODPZ_1; finsi +si present(GLOBAL.ACOLENT_1) alors CORR.ACOLENT1731 = GLOBAL.ACOLENT_1; finsi +si present(GLOBAL.ACOMP_1) alors CORR.ACOMP1731 = GLOBAL.ACOMP_1; finsi +si present(GLOBAL.ADOMSOC1_1) alors CORR.ADOMSOC11731 = GLOBAL.ADOMSOC1_1; finsi +si present(GLOBAL.ADONS_1) alors CORR.ADONS1731 = GLOBAL.ADONS_1; finsi +si present(GLOBAL.ADUFREPFR_1) alors CORR.ADUFREPFR1731 = GLOBAL.ADUFREPFR_1; finsi +si present(GLOBAL.ADUFREPFU_1) alors CORR.ADUFREPFU1731 = GLOBAL.ADUFREPFU_1; finsi +si present(GLOBAL.ADUFREPFV_1) alors CORR.ADUFREPFV1731 = GLOBAL.ADUFREPFV_1; finsi +si present(GLOBAL.ADUFREPFW_1) alors CORR.ADUFREPFW1731 = GLOBAL.ADUFREPFW_1; finsi +si present(GLOBAL.ADUFREPFX_1) alors CORR.ADUFREPFX1731 = GLOBAL.ADUFREPFX_1; finsi +si present(GLOBAL.AFIPC_1) alors CORR.AFIPC1731 = GLOBAL.AFIPC_1; finsi +si present(GLOBAL.AFIPDOM_1) alors CORR.AFIPDOM1731 = GLOBAL.AFIPDOM_1; finsi +si present(GLOBAL.AFORET_1) alors CORR.AFORET1731 = GLOBAL.AFORET_1; finsi +si present(GLOBAL.AILMHD_1) alors CORR.AILMHD1731 = GLOBAL.AILMHD_1; finsi +si present(GLOBAL.AILMHE_1) alors CORR.AILMHE1731 = GLOBAL.AILMHE_1; finsi +si present(GLOBAL.AILMHF_1) alors CORR.AILMHF1731 = GLOBAL.AILMHF_1; finsi +si present(GLOBAL.AILMHG_1) alors CORR.AILMHG1731 = GLOBAL.AILMHG_1; finsi +si present(GLOBAL.AILMHH_1) alors CORR.AILMHH1731 = GLOBAL.AILMHH_1; finsi +si present(GLOBAL.AILMHO_1) alors CORR.AILMHO1731 = GLOBAL.AILMHO_1; finsi +si present(GLOBAL.AILMHP_1) alors CORR.AILMHP1731 = GLOBAL.AILMHP_1; finsi +si present(GLOBAL.AILMHQ_1) alors CORR.AILMHQ1731 = GLOBAL.AILMHQ_1; finsi +si present(GLOBAL.AILMHR_1) alors CORR.AILMHR1731 = GLOBAL.AILMHR_1; finsi +si present(GLOBAL.AILMHS_1) alors CORR.AILMHS1731 = GLOBAL.AILMHS_1; finsi +si present(GLOBAL.AILMHT_1) alors CORR.AILMHT1731 = GLOBAL.AILMHT_1; finsi +si present(GLOBAL.AILMHU_1) alors CORR.AILMHU1731 = GLOBAL.AILMHU_1; finsi +si present(GLOBAL.AILMHV_1) alors CORR.AILMHV1731 = GLOBAL.AILMHV_1; finsi +si present(GLOBAL.AILMHW_1) alors CORR.AILMHW1731 = GLOBAL.AILMHW_1; finsi +si present(GLOBAL.AILMHX_1) alors CORR.AILMHX1731 = GLOBAL.AILMHX_1; finsi +si present(GLOBAL.AILMJV_1) alors CORR.AILMJV1731 = GLOBAL.AILMJV_1; finsi +si present(GLOBAL.AILMJW_1) alors CORR.AILMJW1731 = GLOBAL.AILMJW_1; finsi +si present(GLOBAL.AILMJX_1) alors CORR.AILMJX1731 = GLOBAL.AILMJX_1; finsi +si present(GLOBAL.AILMJY_1) alors CORR.AILMJY1731 = GLOBAL.AILMJY_1; finsi +si present(GLOBAL.AILMKE_1) alors CORR.AILMKE1731 = GLOBAL.AILMKE_1; finsi +si present(GLOBAL.AILMKF_1) alors CORR.AILMKF1731 = GLOBAL.AILMKF_1; finsi +si present(GLOBAL.AILMKG_1) alors CORR.AILMKG1731 = GLOBAL.AILMKG_1; finsi +si present(GLOBAL.AILMKH_1) alors CORR.AILMKH1731 = GLOBAL.AILMKH_1; finsi +si present(GLOBAL.AILMKI_1) alors CORR.AILMKI1731 = GLOBAL.AILMKI_1; finsi +si present(GLOBAL.AILMOA_1) alors CORR.AILMOA1731 = GLOBAL.AILMOA_1; finsi +si present(GLOBAL.AILMOB_1) alors CORR.AILMOB1731 = GLOBAL.AILMOB_1; finsi +si present(GLOBAL.AILMOC_1) alors CORR.AILMOC1731 = GLOBAL.AILMOC_1; finsi +si present(GLOBAL.AILMOD_1) alors CORR.AILMOD1731 = GLOBAL.AILMOD_1; finsi +si present(GLOBAL.AILMOE_1) alors CORR.AILMOE1731 = GLOBAL.AILMOE_1; finsi +si present(GLOBAL.AILMOK_1) alors CORR.AILMOK1731 = GLOBAL.AILMOK_1; finsi +si present(GLOBAL.AILMOL_1) alors CORR.AILMOL1731 = GLOBAL.AILMOL_1; finsi +si present(GLOBAL.AILMOM_1) alors CORR.AILMOM1731 = GLOBAL.AILMOM_1; finsi +si present(GLOBAL.AILMON_1) alors CORR.AILMON1731 = GLOBAL.AILMON_1; finsi +si present(GLOBAL.AILMOO_1) alors CORR.AILMOO1731 = GLOBAL.AILMOO_1; finsi +si present(GLOBAL.AILMOP_1) alors CORR.AILMOP1731 = GLOBAL.AILMOP_1; finsi +si present(GLOBAL.AILMOQ_1) alors CORR.AILMOQ1731 = GLOBAL.AILMOQ_1; finsi +si present(GLOBAL.AILMOR_1) alors CORR.AILMOR1731 = GLOBAL.AILMOR_1; finsi +si present(GLOBAL.AILMOS_1) alors CORR.AILMOS1731 = GLOBAL.AILMOS_1; finsi +si present(GLOBAL.AILMOT_1) alors CORR.AILMOT1731 = GLOBAL.AILMOT_1; finsi +si present(GLOBAL.AILMPF_1) alors CORR.AILMPF1731 = GLOBAL.AILMPF_1; finsi +si present(GLOBAL.AILMPG_1) alors CORR.AILMPG1731 = GLOBAL.AILMPG_1; finsi +si present(GLOBAL.AILMPH_1) alors CORR.AILMPH1731 = GLOBAL.AILMPH_1; finsi +si present(GLOBAL.AILMPI_1) alors CORR.AILMPI1731 = GLOBAL.AILMPI_1; finsi +si present(GLOBAL.AILMPJ_1) alors CORR.AILMPJ1731 = GLOBAL.AILMPJ_1; finsi +si present(GLOBAL.AILMPU_1) alors CORR.AILMPU1731 = GLOBAL.AILMPU_1; finsi +si present(GLOBAL.AILMPV_1) alors CORR.AILMPV1731 = GLOBAL.AILMPV_1; finsi +si present(GLOBAL.AILMPW_1) alors CORR.AILMPW1731 = GLOBAL.AILMPW_1; finsi +si present(GLOBAL.AILMPX_1) alors CORR.AILMPX1731 = GLOBAL.AILMPX_1; finsi +si present(GLOBAL.AILMPY_1) alors CORR.AILMPY1731 = GLOBAL.AILMPY_1; finsi +si present(GLOBAL.AILMSA_1) alors CORR.AILMSA1731 = GLOBAL.AILMSA_1; finsi +si present(GLOBAL.AILMSB_1) alors CORR.AILMSB1731 = GLOBAL.AILMSB_1; finsi +si present(GLOBAL.AILMSC_1) alors CORR.AILMSC1731 = GLOBAL.AILMSC_1; finsi +si present(GLOBAL.AILMSM_1) alors CORR.AILMSM1731 = GLOBAL.AILMSM_1; finsi +si present(GLOBAL.AILMSN_1) alors CORR.AILMSN1731 = GLOBAL.AILMSN_1; finsi +si present(GLOBAL.AILMSO_1) alors CORR.AILMSO1731 = GLOBAL.AILMSO_1; finsi +si present(GLOBAL.AILMSP_1) alors CORR.AILMSP1731 = GLOBAL.AILMSP_1; finsi +si present(GLOBAL.AILMSS_1) alors CORR.AILMSS1731 = GLOBAL.AILMSS_1; finsi +si present(GLOBAL.AILMST_1) alors CORR.AILMST1731 = GLOBAL.AILMST_1; finsi +si present(GLOBAL.ALOCENT_1) alors CORR.ALOCENT1731 = GLOBAL.ALOCENT_1; finsi +si present(GLOBAL.ALOGDOM_1) alors CORR.ALOGDOM1731 = GLOBAL.ALOGDOM_1; finsi +si present(GLOBAL.ALOGSOC_1) alors CORR.ALOGSOC1731 = GLOBAL.ALOGSOC_1; finsi +si present(GLOBAL.ANOJE_1) alors CORR.ANOJE1731 = GLOBAL.ANOJE_1; finsi +si present(GLOBAL.ANOJF_1) alors CORR.ANOJF1731 = GLOBAL.ANOJF_1; finsi +si present(GLOBAL.ANOJG_1) alors CORR.ANOJG1731 = GLOBAL.ANOJG_1; finsi +si present(GLOBAL.ANOJH_1) alors CORR.ANOJH1731 = GLOBAL.ANOJH_1; finsi +si present(GLOBAL.ANORMJA_1) alors CORR.ANORMJA1731 = GLOBAL.ANORMJA_1; finsi +si present(GLOBAL.ANORMJB_1) alors CORR.ANORMJB1731 = GLOBAL.ANORMJB_1; finsi +si present(GLOBAL.ANORMJC_1) alors CORR.ANORMJC1731 = GLOBAL.ANORMJC_1; finsi +si present(GLOBAL.ANORMJD_1) alors CORR.ANORMJD1731 = GLOBAL.ANORMJD_1; finsi +si present(GLOBAL.ANORMJR_1) alors CORR.ANORMJR1731 = GLOBAL.ANORMJR_1; finsi +si present(GLOBAL.ANORMJS_1) alors CORR.ANORMJS1731 = GLOBAL.ANORMJS_1; finsi +si present(GLOBAL.ANORMJT_1) alors CORR.ANORMJT1731 = GLOBAL.ANORMJT_1; finsi +si present(GLOBAL.ANORMJU_1) alors CORR.ANORMJU1731 = GLOBAL.ANORMJU_1; finsi +si present(GLOBAL.ANORMLG_1) alors CORR.ANORMLG1731 = GLOBAL.ANORMLG_1; finsi +si present(GLOBAL.ANORMLH_1) alors CORR.ANORMLH1731 = GLOBAL.ANORMLH_1; finsi +si present(GLOBAL.ANORMLI_1) alors CORR.ANORMLI1731 = GLOBAL.ANORMLI_1; finsi +si present(GLOBAL.ANORMLJ_1) alors CORR.ANORMLJ1731 = GLOBAL.ANORMLJ_1; finsi +si present(GLOBAL.APENTCY_1) alors CORR.APENTCY1731 = GLOBAL.APENTCY_1; finsi +si present(GLOBAL.APENTDY_1) alors CORR.APENTDY1731 = GLOBAL.APENTDY_1; finsi +si present(GLOBAL.APENTEK_1) alors CORR.APENTEK1731 = GLOBAL.APENTEK_1; finsi +si present(GLOBAL.APENTEY_1) alors CORR.APENTEY1731 = GLOBAL.APENTEY_1; finsi +si present(GLOBAL.APENTFY_1) alors CORR.APENTFY1731 = GLOBAL.APENTFY_1; finsi +si present(GLOBAL.APENTGY_1) alors CORR.APENTGY1731 = GLOBAL.APENTGY_1; finsi +si present(GLOBAL.APIJI_1) alors CORR.APIJI1731 = GLOBAL.APIJI_1; finsi +si present(GLOBAL.APIJJ_1) alors CORR.APIJJ1731 = GLOBAL.APIJJ_1; finsi +si present(GLOBAL.APIJK_1) alors CORR.APIJK1731 = GLOBAL.APIJK_1; finsi +si present(GLOBAL.APIJL_1) alors CORR.APIJL1731 = GLOBAL.APIJL_1; finsi +si present(GLOBAL.APIJV_1) alors CORR.APIJV1731 = GLOBAL.APIJV_1; finsi +si present(GLOBAL.APIJW_1) alors CORR.APIJW1731 = GLOBAL.APIJW_1; finsi +si present(GLOBAL.APIJX_1) alors CORR.APIJX1731 = GLOBAL.APIJX_1; finsi +si present(GLOBAL.APIJY_1) alors CORR.APIJY1731 = GLOBAL.APIJY_1; finsi +si present(GLOBAL.APIPK_1) alors CORR.APIPK1731 = GLOBAL.APIPK_1; finsi +si present(GLOBAL.APIPL_1) alors CORR.APIPL1731 = GLOBAL.APIPL_1; finsi +si present(GLOBAL.APIPM_1) alors CORR.APIPM1731 = GLOBAL.APIPM_1; finsi +si present(GLOBAL.APIPN_1) alors CORR.APIPN1731 = GLOBAL.APIPN_1; finsi +si present(GLOBAL.APIREPCZ_1) alors CORR.APIREPCZ1731 = GLOBAL.APIREPCZ_1; finsi +si present(GLOBAL.APIREPEZ_1) alors CORR.APIREPEZ1731 = GLOBAL.APIREPEZ_1; finsi +si present(GLOBAL.APIREPJM_1) alors CORR.APIREPJM1731 = GLOBAL.APIREPJM_1; finsi +si present(GLOBAL.APIREPJN_1) alors CORR.APIREPJN1731 = GLOBAL.APIREPJN_1; finsi +si present(GLOBAL.APIREPJO_1) alors CORR.APIREPJO1731 = GLOBAL.APIREPJO_1; finsi +si present(GLOBAL.APIREPJP_1) alors CORR.APIREPJP1731 = GLOBAL.APIREPJP_1; finsi +si present(GLOBAL.APIREPJQ_1) alors CORR.APIREPJQ1731 = GLOBAL.APIREPJQ_1; finsi +si present(GLOBAL.APIREPKM_1) alors CORR.APIREPKM1731 = GLOBAL.APIREPKM_1; finsi +si present(GLOBAL.APIREPLM_1) alors CORR.APIREPLM1731 = GLOBAL.APIREPLM_1; finsi +si present(GLOBAL.APIREPMM_1) alors CORR.APIREPMM1731 = GLOBAL.APIREPMM_1; finsi +si present(GLOBAL.APIREPRB_1) alors CORR.APIREPRB1731 = GLOBAL.APIREPRB_1; finsi +si present(GLOBAL.APIREPRD_1) alors CORR.APIREPRD1731 = GLOBAL.APIREPRD_1; finsi +si present(GLOBAL.APIREPRE_1) alors CORR.APIREPRE1731 = GLOBAL.APIREPRE_1; finsi +si present(GLOBAL.APIREPRF_1) alors CORR.APIREPRF1731 = GLOBAL.APIREPRF_1; finsi +si present(GLOBAL.APIREPRG_1) alors CORR.APIREPRG1731 = GLOBAL.APIREPRG_1; finsi +si present(GLOBAL.APIREPRH_1) alors CORR.APIREPRH1731 = GLOBAL.APIREPRH_1; finsi +si present(GLOBAL.APIREPRZ_1) alors CORR.APIREPRZ1731 = GLOBAL.APIREPRZ_1; finsi +si present(GLOBAL.APIREPTZ_1) alors CORR.APIREPTZ1731 = GLOBAL.APIREPTZ_1; finsi +si present(GLOBAL.APIRI_1) alors CORR.APIRI1731 = GLOBAL.APIRI_1; finsi +si present(GLOBAL.APIRJ_1) alors CORR.APIRJ1731 = GLOBAL.APIRJ_1; finsi +si present(GLOBAL.APIUY_1) alors CORR.APIUY1731 = GLOBAL.APIUY_1; finsi +si present(GLOBAL.APIUZ_1) alors CORR.APIUZ1731 = GLOBAL.APIUZ_1; finsi +si present(GLOBAL.APRESSE_1) alors CORR.APRESSE1731 = GLOBAL.APRESSE_1; finsi +si present(GLOBAL.AREHAB_1) alors CORR.AREHAB1731 = GLOBAL.AREHAB_1; finsi +si present(GLOBAL.ARESTIMO1_1) alors CORR.ARESTIMO11731 = GLOBAL.ARESTIMO1_1; finsi +si present(GLOBAL.ARESTIMO_1) alors CORR.ARESTIMO1731 = GLOBAL.ARESTIMO_1; finsi +si present(GLOBAL.ASC601_1) alors CORR.ASC6011731 = GLOBAL.ASC601_1; finsi +si present(GLOBAL.ASC602_1) alors CORR.ASC6021731 = GLOBAL.ASC602_1; finsi +si present(GLOBAL.ASC603_1) alors CORR.ASC6031731 = GLOBAL.ASC603_1; finsi +si present(GLOBAL.ASC604_1) alors CORR.ASC6041731 = GLOBAL.ASC604_1; finsi +si present(GLOBAL.ASC605_1) alors CORR.ASC6051731 = GLOBAL.ASC605_1; finsi +si present(GLOBAL.ASC606_1) alors CORR.ASC6061731 = GLOBAL.ASC606_1; finsi +si present(GLOBAL.ASC607_1) alors CORR.ASC6071731 = GLOBAL.ASC607_1; finsi +si present(GLOBAL.ASC608_1) alors CORR.ASC6081731 = GLOBAL.ASC608_1; finsi +si present(GLOBAL.ASC609_1) alors CORR.ASC6091731 = GLOBAL.ASC609_1; finsi +si present(GLOBAL.ASC610_1) alors CORR.ASC6101731 = GLOBAL.ASC610_1; finsi +si present(GLOBAL.ASC611_1) alors CORR.ASC6111731 = GLOBAL.ASC611_1; finsi +si present(GLOBAL.ASC612_1) alors CORR.ASC6121731 = GLOBAL.ASC612_1; finsi +si present(GLOBAL.ASC613_1) alors CORR.ASC6131731 = GLOBAL.ASC613_1; finsi +si present(GLOBAL.ASC614_1) alors CORR.ASC6141731 = GLOBAL.ASC614_1; finsi +si present(GLOBAL.ASC615_1) alors CORR.ASC6151731 = GLOBAL.ASC615_1; finsi +si present(GLOBAL.ASC616_1) alors CORR.ASC6161731 = GLOBAL.ASC616_1; finsi +si present(GLOBAL.ASC617_1) alors CORR.ASC6171731 = GLOBAL.ASC617_1; finsi +si present(GLOBAL.ASC618_1) alors CORR.ASC6181731 = GLOBAL.ASC618_1; finsi +si present(GLOBAL.ASC619_1) alors CORR.ASC6191731 = GLOBAL.ASC619_1; finsi +si present(GLOBAL.ASC620_1) alors CORR.ASC6201731 = GLOBAL.ASC620_1; finsi +si present(GLOBAL.ASC621_1) alors CORR.ASC6211731 = GLOBAL.ASC621_1; finsi +si present(GLOBAL.ASC622_1) alors CORR.ASC6221731 = GLOBAL.ASC622_1; finsi +si present(GLOBAL.ASC623_1) alors CORR.ASC6231731 = GLOBAL.ASC623_1; finsi +si present(GLOBAL.ASC624_1) alors CORR.ASC6241731 = GLOBAL.ASC624_1; finsi +si present(GLOBAL.ASC625_1) alors CORR.ASC6251731 = GLOBAL.ASC625_1; finsi +si present(GLOBAL.ASC626_1) alors CORR.ASC6261731 = GLOBAL.ASC626_1; finsi +si present(GLOBAL.ASC901_1) alors CORR.ASC9011731 = GLOBAL.ASC901_1; finsi +si present(GLOBAL.ASC902_1) alors CORR.ASC9021731 = GLOBAL.ASC902_1; finsi +si present(GLOBAL.ASC903_1) alors CORR.ASC9031731 = GLOBAL.ASC903_1; finsi +si present(GLOBAL.ASC904_1) alors CORR.ASC9041731 = GLOBAL.ASC904_1; finsi +si present(GLOBAL.ASC905_1) alors CORR.ASC9051731 = GLOBAL.ASC905_1; finsi +si present(GLOBAL.ASC906_1) alors CORR.ASC9061731 = GLOBAL.ASC906_1; finsi +si present(GLOBAL.ASC907_1) alors CORR.ASC9071731 = GLOBAL.ASC907_1; finsi +si present(GLOBAL.ASC908_1) alors CORR.ASC9081731 = GLOBAL.ASC908_1; finsi +si present(GLOBAL.ASC909_1) alors CORR.ASC9091731 = GLOBAL.ASC909_1; finsi +si present(GLOBAL.ASOFON_1) alors CORR.ASOFON1731 = GLOBAL.ASOFON_1; finsi +si present(GLOBAL.ASOUFIP_1) alors CORR.ASOUFIP1731 = GLOBAL.ASOUFIP_1; finsi +si present(GLOBAL.ATOUREPA_1) alors CORR.ATOUREPA1731 = GLOBAL.ATOUREPA_1; finsi +si present(GLOBAL.ATOURREP_1) alors CORR.ATOURREP1731 = GLOBAL.ATOURREP_1; finsi +si present(GLOBAL.BA1) alors CORR.BA11731 = GLOBAL.BA1; finsi +si present(GLOBAL.BAALIM) alors CORR.BAALIM1731 = GLOBAL.BAALIM; finsi +si present(GLOBAL.BACIFBIS) alors CORR.BACIFBIS1731 = GLOBAL.BACIFBIS; finsi +si present(GLOBAL.BADONJ) alors CORR.BADONJ1731 = GLOBAL.BADONJ; finsi +si present(GLOBAL.BAEMV) alors CORR.BAEMV1731 = GLOBAL.BAEMV; finsi +si present(GLOBAL.BAEP) alors CORR.BAEP1731 = GLOBAL.BAEP; finsi +si present(GLOBAL.BAEV) alors CORR.BAEV1731 = GLOBAL.BAEV; finsi +si present(GLOBAL.BAH) alors CORR.BAH1731 = GLOBAL.BAH; finsi +si present(GLOBAL.BAHQNODEFF) alors CORR.BAHQNODEFF1731 = GLOBAL.BAHQNODEFF; finsi +si present(GLOBAL.BANOR) alors CORR.BANOR1731 = GLOBAL.BANOR; finsi +si present(GLOBAL.BAQNODEFF) alors CORR.BAQNODEFF1731 = GLOBAL.BAQNODEFF; finsi +si present(GLOBAL.BDIFAGRI) alors CORR.BDIFAGRI1731 = GLOBAL.BDIFAGRI; finsi +si present(GLOBAL.BICIFBIS) alors CORR.BICIFBIS1731 = GLOBAL.BICIFBIS; finsi +si present(GLOBAL.BICNPF) alors CORR.BICNPF1731 = GLOBAL.BICNPF; finsi +si present(GLOBAL.BICNPOCF) alors CORR.BICNPOCF1731 = GLOBAL.BICNPOCF; finsi +si present(GLOBAL.BICNPQCF) alors CORR.BICNPQCF1731 = GLOBAL.BICNPQCF; finsi +si present(GLOBAL.BICPROOF) alors CORR.BICPROOF1731 = GLOBAL.BICPROOF; finsi +si present(GLOBAL.BICPROQF) alors CORR.BICPROQF1731 = GLOBAL.BICPROQF; finsi +si present(GLOBAL.BNCDF7) alors CORR.BNCDF71731 = GLOBAL.BNCDF7; finsi +si present(GLOBAL.BNCDF) alors CORR.BNCDF1731 = GLOBAL.BNCDF; finsi +si present(GLOBAL.BNCIFBIS) alors CORR.BNCIFBIS1731 = GLOBAL.BNCIFBIS; finsi +si present(GLOBAL.BNCNPHQCF) alors CORR.BNCNPHQCF1731 = GLOBAL.BNCNPHQCF; finsi +si present(GLOBAL.BNCNPQCF) alors CORR.BNCNPQCF1731 = GLOBAL.BNCNPQCF; finsi +si present(GLOBAL.BNCPHQCF) alors CORR.BNCPHQCF1731 = GLOBAL.BNCPHQCF; finsi +si present(GLOBAL.BNCPQCF) alors CORR.BNCPQCF1731 = GLOBAL.BNCPQCF; finsi +si present(GLOBAL.BNCPROPVC) alors CORR.BNCPROPVC1731 = GLOBAL.BNCPROPVC; finsi +si present(GLOBAL.BNCPROPVP) alors CORR.BNCPROPVP1731 = GLOBAL.BNCPROPVP; finsi +si present(GLOBAL.BNCPROPVV) alors CORR.BNCPROPVV1731 = GLOBAL.BNCPROPVV; finsi +si present(GLOBAL.BPRESCOMP) alors CORR.BPRESCOMP1731 = GLOBAL.BPRESCOMP; finsi +si present(GLOBAL.BRCMBIS) alors CORR.BRCM1731 = GLOBAL.BRCMBIS; finsi +si present(GLOBAL.BRCMBISB) alors CORR.BRCMBISB1731 = GLOBAL.BRCMBISB; finsi +si present(GLOBAL.BRCMBISQ) alors CORR.BRCMBISQ1731 = GLOBAL.BRCMBISQ; finsi +si present(GLOBAL.BRCMQ) alors CORR.BRCMQ1731 = GLOBAL.BRCMQ; finsi +si present(GLOBAL.BRENOV) alors CORR.BRENOV1731 = GLOBAL.BRENOV; finsi +si present(GLOBAL.BSN1) alors CORR.BSN11731 = GLOBAL.BSN1; finsi +si present(GLOBAL.BSN2) alors CORR.BSN21731 = GLOBAL.BSN2; finsi +si present(GLOBAL.BSOCREP) alors CORR.BSOCREP1731 = GLOBAL.BSOCREP; finsi +si present(GLOBAL.BSURV) alors CORR.BSURV1731 = GLOBAL.BSURV; finsi +si present(GLOBAL.COD2TT) alors CORR.COD2TT1731 = GLOBAL.COD2TT; finsi +si present(GLOBAL.DABNCNP1) alors CORR.DABNCNP11731 = GLOBAL.DABNCNP1; finsi +si present(GLOBAL.DABNCNP2) alors CORR.DABNCNP21731 = GLOBAL.DABNCNP2; finsi +si present(GLOBAL.DABNCNP3) alors CORR.DABNCNP31731 = GLOBAL.DABNCNP3; finsi +si present(GLOBAL.DABNCNP4) alors CORR.DABNCNP41731 = GLOBAL.DABNCNP4; finsi +si present(GLOBAL.DABNCNP5) alors CORR.DABNCNP51731 = GLOBAL.DABNCNP5; finsi +si present(GLOBAL.DABNCNP6) alors CORR.DABNCNP61731 = GLOBAL.DABNCNP6; finsi +si present(GLOBAL.DABNCNP) alors CORR.DABNCNP1731 = GLOBAL.DABNCNP; finsi +si present(GLOBAL.DAGRI1) alors CORR.DAGRI11731 = GLOBAL.DAGRI1; finsi +si present(GLOBAL.DAGRI2) alors CORR.DAGRI21731 = GLOBAL.DAGRI2; finsi +si present(GLOBAL.DAGRI3) alors CORR.DAGRI31731 = GLOBAL.DAGRI3; finsi +si present(GLOBAL.DAGRI4) alors CORR.DAGRI41731 = GLOBAL.DAGRI4; finsi +si present(GLOBAL.DAGRI5) alors CORR.DAGRI51731 = GLOBAL.DAGRI5; finsi +si present(GLOBAL.DAGRI6) alors CORR.DAGRI61731 = GLOBAL.DAGRI6; finsi +si present(GLOBAL.DAGRI) alors CORR.DAGRI1731 = GLOBAL.DAGRI; finsi +si present(GLOBAL.DAGRIIMP) alors CORR.DAGRIIMP1731 = GLOBAL.DAGRIIMP; finsi +si present(GLOBAL.DBAIP) alors CORR.DBAIP1731 = GLOBAL.DBAIP; finsi +si present(GLOBAL.DEF4BB) alors CORR.DEF4BB1731 = GLOBAL.DEF4BB; finsi +si present(GLOBAL.DEF4BC) alors CORR.DEF4BC1731 = GLOBAL.DEF4BC; finsi +si present(GLOBAL.DEF4BD) alors CORR.DEF4BD1731 = GLOBAL.DEF4BD; finsi +si present(GLOBAL.DEFAA0) alors CORR.DEFAA01731 = GLOBAL.DEFAA0; finsi +si present(GLOBAL.DEFAA1) alors CORR.DEFAA11731 = GLOBAL.DEFAA1; finsi +si present(GLOBAL.DEFAA2) alors CORR.DEFAA21731 = GLOBAL.DEFAA2; finsi +si present(GLOBAL.DEFAA3) alors CORR.DEFAA31731 = GLOBAL.DEFAA3; finsi +si present(GLOBAL.DEFAA4) alors CORR.DEFAA41731 = GLOBAL.DEFAA4; finsi +si present(GLOBAL.DEFAA5) alors CORR.DEFAA51731 = GLOBAL.DEFAA5; finsi +si present(GLOBAL.DEFBA7) alors CORR.DEFBA71731 = GLOBAL.DEFBA7; finsi +si present(GLOBAL.DEFBA) alors CORR.DEFBA1731 = GLOBAL.DEFBA; finsi +si present(GLOBAL.DEFBANI470) alors CORR.DEFBANI4701731 = GLOBAL.DEFBANI470; finsi +si present(GLOBAL.DEFBANI470BIS) alors CORR.DEFBANI470BIS1731 = GLOBAL.DEFBANI470BIS; finsi +si present(GLOBAL.DEFBANI) alors CORR.DEFBANI1731 = GLOBAL.DEFBANI; finsi +si present(GLOBAL.DEFBANIH470) alors CORR.DEFBANIH4701731 = GLOBAL.DEFBANIH470; finsi +si present(GLOBAL.DEFBIC1) alors CORR.DEFBIC11731 = GLOBAL.DEFBIC1; finsi +si present(GLOBAL.DEFBIC2) alors CORR.DEFBIC21731 = GLOBAL.DEFBIC2; finsi +si present(GLOBAL.DEFBIC3) alors CORR.DEFBIC31731 = GLOBAL.DEFBIC3; finsi +si present(GLOBAL.DEFBIC4) alors CORR.DEFBIC41731 = GLOBAL.DEFBIC4; finsi +si present(GLOBAL.DEFBIC5) alors CORR.DEFBIC51731 = GLOBAL.DEFBIC5; finsi +si present(GLOBAL.DEFBIC6) alors CORR.DEFBIC61731 = GLOBAL.DEFBIC6; finsi +si present(GLOBAL.DEFBICNP470) alors CORR.DEFBICNP4701731 = GLOBAL.DEFBICNP470; finsi +si present(GLOBAL.DEFBICNPH470) alors CORR.DEFBICNPH4701731 = GLOBAL.DEFBICNPH470; finsi +si present(GLOBAL.DEFBNCNP470) alors CORR.DEFBNCNP4701731 = GLOBAL.DEFBNCNP470; finsi +si present(GLOBAL.DEFBNCNP) alors CORR.DEFBNCNP1731 = GLOBAL.DEFBNCNP; finsi +si present(GLOBAL.DEFBNCNPH470) alors CORR.DEFBNCNPH4701731 = GLOBAL.DEFBNCNPH470; finsi +si present(GLOBAL.DEFIBA) alors CORR.DEFIBA1731 = GLOBAL.DEFIBA; finsi +si present(GLOBAL.DEFLOC11) alors CORR.DEFLOC111731 = GLOBAL.DEFLOC11; finsi +si present(GLOBAL.DEFLOC) alors CORR.DEFLOC1731 = GLOBAL.DEFLOC; finsi +si present(GLOBAL.DEFLOCNP) alors CORR.DEFLOCNP1731 = GLOBAL.DEFLOCNP; finsi +si present(GLOBAL.DEFLOCNPBIS) alors CORR.BIDON1731 = GLOBAL.DEFLOCNPBIS; finsi +si present(GLOBAL.DEFNPI) alors CORR.DEFNPI1731 = GLOBAL.DEFNPI; finsi +si present(GLOBAL.DEFRCM2) alors CORR.DEFRCM21731 = GLOBAL.DEFRCM2; finsi +si present(GLOBAL.DEFRCM3) alors CORR.DEFRCM31731 = GLOBAL.DEFRCM3; finsi +si present(GLOBAL.DEFRCM4) alors CORR.DEFRCM41731 = GLOBAL.DEFRCM4; finsi +si present(GLOBAL.DEFRCM5) alors CORR.DEFRCM51731 = GLOBAL.DEFRCM5; finsi +si present(GLOBAL.DEFRCM6) alors CORR.DEFRCM61731 = GLOBAL.DEFRCM6; finsi +si present(GLOBAL.DEFRCM) alors CORR.DEFRCM1731 = GLOBAL.DEFRCM; finsi +si present(GLOBAL.DEFRCMI) alors CORR.DEFRCMI1731 = GLOBAL.DEFRCMI; finsi +si present(GLOBAL.DEFRFNONIBIS) alors CORR.DEFRFNONI1731 = GLOBAL.DEFRFNONIBIS; finsi +si present(GLOBAL.DEFZU) alors CORR.DEFZU1731 = GLOBAL.DEFZU; finsi +si present(GLOBAL.DFANTPROV) alors CORR.DFANTPROV1731 = GLOBAL.DFANTPROV; finsi +si present(GLOBAL.DFBICNPF) alors CORR.DFBICNPF1731 = GLOBAL.DFBICNPF; finsi +si present(GLOBAL.DFCE) alors CORR.DFCE1731 = GLOBAL.DFCE; finsi +si present(GLOBAL.DFCG) alors CORR.DFCG1731 = GLOBAL.DFCG; finsi +si present(GLOBAL.DFRCM1) alors CORR.DFRCM11731 = GLOBAL.DFRCM1; finsi +si present(GLOBAL.DFRCM2) alors CORR.DFRCM21731 = GLOBAL.DFRCM2; finsi +si present(GLOBAL.DFRCM3) alors CORR.DFRCM31731 = GLOBAL.DFRCM3; finsi +si present(GLOBAL.DFRCM4) alors CORR.DFRCM41731 = GLOBAL.DFRCM4; finsi +si present(GLOBAL.DFRCM5) alors CORR.DFRCM51731 = GLOBAL.DFRCM5; finsi +si present(GLOBAL.DFRCMN) alors CORR.DFRCMN1731 = GLOBAL.DFRCMN; finsi +si present(GLOBAL.DIDABNCNP1) alors CORR.DIDABNCNP11731 = GLOBAL.DIDABNCNP1; finsi +si present(GLOBAL.DLMRN7) alors CORR.DLMRN71731 = GLOBAL.DLMRN7; finsi +si present(GLOBAL.DLMRNT) alors CORR.DLMRN1731 = GLOBAL.DLMRNT; finsi +si present(GLOBAL.DMOND) alors CORR.DMOND1731 = GLOBAL.DMOND; finsi +si present(GLOBAL.DNPLOCIMPU) alors CORR.DNPLOCIMPU1731 = GLOBAL.DNPLOCIMPU; finsi +si present(GLOBAL.DRCF) alors CORR.DRCF1731 = GLOBAL.DRCF; finsi +si present(GLOBAL.DRFRP) alors CORR.DRFRP1731 = GLOBAL.DRFRP; finsi +si present(GLOBAL.FRD1) alors CORR.FRD11731 = GLOBAL.FRD1; finsi +si present(GLOBAL.FRD2) alors CORR.FRD21731 = GLOBAL.FRD2; finsi +si present(GLOBAL.FRD3) alors CORR.FRD31731 = GLOBAL.FRD3; finsi +si present(GLOBAL.FRD4) alors CORR.FRD41731 = GLOBAL.FRD4; finsi +si present(GLOBAL.FRDC) alors CORR.FRDC1731 = GLOBAL.FRDC; finsi +si present(GLOBAL.FRDV) alors CORR.FRDV1731 = GLOBAL.FRDV; finsi +si present(GLOBAL.IFIACT) alors CORR.IFIACT1731 = GLOBAL.IFIACT; finsi +si present(GLOBAL.INDSEUILBA) alors CORR.INDSEUILBA1731 = GLOBAL.INDSEUILBA; finsi +si present(GLOBAL.IPTEFN) alors CORR.IPTEFN1731 = GLOBAL.IPTEFN; finsi +si present(GLOBAL.LOCNPCF) alors CORR.LOCNPCF1731 = GLOBAL.LOCNPCF; finsi +si present(GLOBAL.MIBPVC) alors CORR.MIBPVC1731 = GLOBAL.MIBPVC; finsi +si present(GLOBAL.MIBPVP) alors CORR.MIBPVP1731 = GLOBAL.MIBPVP; finsi +si present(GLOBAL.MIBPVV) alors CORR.MIBPVV1731 = GLOBAL.MIBPVV; finsi +si present(GLOBAL.MIBRNETC) alors CORR.MIBRNETC1731 = GLOBAL.MIBRNETC; finsi +si present(GLOBAL.MIBRNETP) alors CORR.MIBRNETP1731 = GLOBAL.MIBRNETP; finsi +si present(GLOBAL.MIBRNETV) alors CORR.MIBRNETV1731 = GLOBAL.MIBRNETV; finsi +si present(GLOBAL.MLOCNET) alors CORR.MLOCNET1731 = GLOBAL.MLOCNET; finsi +si present(GLOBAL.NPLOCNETBIS) alors CORR.NPLOCNETBIS1731 = GLOBAL.NPLOCNETBIS; finsi +si present(GLOBAL.NPLOCNETC) alors CORR.NPLOCNETC1731 = GLOBAL.NPLOCNETC; finsi +si present(GLOBAL.NPLOCNETPAC) alors CORR.NPLOCNETPAC1731 = GLOBAL.NPLOCNETPAC; finsi +si present(GLOBAL.NPLOCNETV) alors CORR.NPLOCNETV1731 = GLOBAL.NPLOCNETV; finsi +si present(GLOBAL.PREREV) alors CORR.PREREV1731 = GLOBAL.PREREV; finsi +si present(GLOBAL.R1649) alors CORR.R16491731 = GLOBAL.R1649; finsi +si present(GLOBAL.RCELGS_1) alors CORR.RCELGS1731 = GLOBAL.RCELGS_1; finsi +si present(GLOBAL.RCELGU_1) alors CORR.RCELGU1731 = GLOBAL.RCELGU_1; finsi +si present(GLOBAL.RCELGX_1) alors CORR.RCELGX1731 = GLOBAL.RCELGX_1; finsi +si present(GLOBAL.RCELHZ_1) alors CORR.RCELHZ1731 = GLOBAL.RCELHZ_1; finsi +si present(GLOBAL.RCELIV_1) alors CORR.RCELIV1731 = GLOBAL.RCELIV_1; finsi +si present(GLOBAL.RCELIX_1) alors CORR.RCELIX1731 = GLOBAL.RCELIX_1; finsi +si present(GLOBAL.RCELIY_1) alors CORR.RCELIY1731 = GLOBAL.RCELIY_1; finsi +si present(GLOBAL.RCELIZ_1) alors CORR.RCELIZ1731 = GLOBAL.RCELIZ_1; finsi +si present(GLOBAL.RCELKC_1) alors CORR.RCELKC1731 = GLOBAL.RCELKC_1; finsi +si present(GLOBAL.RCELKD_1) alors CORR.RCELKD1731 = GLOBAL.RCELKD_1; finsi +si present(GLOBAL.RCELKJ_1) alors CORR.RCELKJ1731 = GLOBAL.RCELKJ_1; finsi +si present(GLOBAL.RCELKO_1) alors CORR.RCELKO1731 = GLOBAL.RCELKO_1; finsi +si present(GLOBAL.RCELKS_1) alors CORR.RCELKS1731 = GLOBAL.RCELKS_1; finsi +si present(GLOBAL.RCELKT_1) alors CORR.RCELKT1731 = GLOBAL.RCELKT_1; finsi +si present(GLOBAL.RCELKU_1) alors CORR.RCELKU1731 = GLOBAL.RCELKU_1; finsi +si present(GLOBAL.RCELKV_1) alors CORR.RCELKV1731 = GLOBAL.RCELKV_1; finsi +si present(GLOBAL.RCELLA_1) alors CORR.RCELLA1731 = GLOBAL.RCELLA_1; finsi +si present(GLOBAL.RCELLB_1) alors CORR.RCELLB1731 = GLOBAL.RCELLB_1; finsi +si present(GLOBAL.RCELLC_1) alors CORR.RCELLC1731 = GLOBAL.RCELLC_1; finsi +si present(GLOBAL.RCELLK_1) alors CORR.RCELLK1731 = GLOBAL.RCELLK_1; finsi +si present(GLOBAL.RCELLL_1) alors CORR.RCELLL1731 = GLOBAL.RCELLL_1; finsi +si present(GLOBAL.RCELLO_1) alors CORR.RCELLO1731 = GLOBAL.RCELLO_1; finsi +si present(GLOBAL.RCELLP_1) alors CORR.RCELLP1731 = GLOBAL.RCELLP_1; finsi +si present(GLOBAL.RCELLY_1) alors CORR.RCELLY1731 = GLOBAL.RCELLY_1; finsi +si present(GLOBAL.RCELMA_1) alors CORR.RCELMA1731 = GLOBAL.RCELMA_1; finsi +si present(GLOBAL.RCELMB_1) alors CORR.RCELMB1731 = GLOBAL.RCELMB_1; finsi +si present(GLOBAL.RCELMC_1) alors CORR.RCELMC1731 = GLOBAL.RCELMC_1; finsi +si present(GLOBAL.RCELMD_1) alors CORR.RCELMD1731 = GLOBAL.RCELMD_1; finsi +si present(GLOBAL.RCELMI_1) alors CORR.RCELMI1731 = GLOBAL.RCELMI_1; finsi +si present(GLOBAL.RCELMJ_1) alors CORR.RCELMJ1731 = GLOBAL.RCELMJ_1; finsi +si present(GLOBAL.RCELMK_1) alors CORR.RCELMK1731 = GLOBAL.RCELMK_1; finsi +si present(GLOBAL.RCELML_1) alors CORR.RCELML1731 = GLOBAL.RCELML_1; finsi +si present(GLOBAL.RCELMO_1) alors CORR.RCELMO1731 = GLOBAL.RCELMO_1; finsi +si present(GLOBAL.RCELMP_1) alors CORR.RCELMP1731 = GLOBAL.RCELMP_1; finsi +si present(GLOBAL.RCELMQ_1) alors CORR.RCELMQ1731 = GLOBAL.RCELMQ_1; finsi +si present(GLOBAL.RCELMR_1) alors CORR.RCELMR1731 = GLOBAL.RCELMR_1; finsi +si present(GLOBAL.RCELMS_1) alors CORR.RCELMS1731 = GLOBAL.RCELMS_1; finsi +si present(GLOBAL.RCELMT_1) alors CORR.RCELMT1731 = GLOBAL.RCELMT_1; finsi +si present(GLOBAL.RCELMU_1) alors CORR.RCELMU1731 = GLOBAL.RCELMU_1; finsi +si present(GLOBAL.RCELMV_1) alors CORR.RCELMV1731 = GLOBAL.RCELMV_1; finsi +si present(GLOBAL.RCELNS_1) alors CORR.RCELNS1731 = GLOBAL.RCELNS_1; finsi +si present(GLOBAL.RCELNT_1) alors CORR.RCELNT1731 = GLOBAL.RCELNT_1; finsi +si present(GLOBAL.RCELNU_1) alors CORR.RCELNU1731 = GLOBAL.RCELNU_1; finsi +si present(GLOBAL.RCELNV_1) alors CORR.RCELNV1731 = GLOBAL.RCELNV_1; finsi +si present(GLOBAL.RCELP1A_1) alors CORR.RCELP1A1731 = GLOBAL.RCELP1A_1; finsi +si present(GLOBAL.RCELP1B_1) alors CORR.RCELP1B1731 = GLOBAL.RCELP1B_1; finsi +si present(GLOBAL.RCELP1C_1) alors CORR.RCELP1C1731 = GLOBAL.RCELP1C_1; finsi +si present(GLOBAL.RCELP1D_1) alors CORR.RCELP1D1731 = GLOBAL.RCELP1D_1; finsi +si present(GLOBAL.RCELP1E_1) alors CORR.RCELP1E1731 = GLOBAL.RCELP1E_1; finsi +si present(GLOBAL.RCELPC_1) alors CORR.RCELPC1731 = GLOBAL.RCELPC_1; finsi +si present(GLOBAL.RCELPD_1) alors CORR.RCELPD1731 = GLOBAL.RCELPD_1; finsi +si present(GLOBAL.RCELPE_1) alors CORR.RCELPE1731 = GLOBAL.RCELPE_1; finsi +si present(GLOBAL.RCELREPWT_1) alors CORR.RCELREPWT1731 = GLOBAL.RCELREPWT_1; finsi +si present(GLOBAL.RCELREPWU_1) alors CORR.RCELREPWU1731 = GLOBAL.RCELREPWU_1; finsi +si present(GLOBAL.RCELREPWV_1) alors CORR.RCELREPWV1731 = GLOBAL.RCELREPWV_1; finsi +si present(GLOBAL.RCELREPWW_1) alors CORR.RCELREPWW1731 = GLOBAL.RCELREPWW_1; finsi +si present(GLOBAL.RCELREPYT_1) alors CORR.RCELREPYT1731 = GLOBAL.RCELREPYT_1; finsi +si present(GLOBAL.RCELREPYU_1) alors CORR.RCELREPYU1731 = GLOBAL.RCELREPYU_1; finsi +si present(GLOBAL.RCELREPYV_1) alors CORR.RCELREPYV1731 = GLOBAL.RCELREPYV_1; finsi +si present(GLOBAL.RCELREPYW_1) alors CORR.RCELREPYW1731 = GLOBAL.RCELREPYW_1; finsi +si present(GLOBAL.RCELRK_1) alors CORR.RCELRK1731 = GLOBAL.RCELRK_1; finsi +si present(GLOBAL.RCELRL_1) alors CORR.RCELRL1731 = GLOBAL.RCELRL_1; finsi +si present(GLOBAL.RCELRM_1) alors CORR.RCELRM1731 = GLOBAL.RCELRM_1; finsi +si present(GLOBAL.RCELRN_1) alors CORR.RCELRN1731 = GLOBAL.RCELRN_1; finsi +si present(GLOBAL.RCELRT_1) alors CORR.RCELRT1731 = GLOBAL.RCELRT_1; finsi +si present(GLOBAL.RCELRU_1) alors CORR.RCELRU1731 = GLOBAL.RCELRU_1; finsi +si present(GLOBAL.RCELUU_1) alors CORR.RCELUU1731 = GLOBAL.RCELUU_1; finsi +si present(GLOBAL.RCELUV_1) alors CORR.RCELUV1731 = GLOBAL.RCELUV_1; finsi +si present(GLOBAL.RCELUW_1) alors CORR.RCELUW1731 = GLOBAL.RCELUW_1; finsi +si present(GLOBAL.RCELUX_1) alors CORR.RCELUX1731 = GLOBAL.RCELUX_1; finsi +si present(GLOBAL.RCELWX_1) alors CORR.RCELWX1731 = GLOBAL.RCELWX_1; finsi +si present(GLOBAL.RCELWY_1) alors CORR.RCELWY1731 = GLOBAL.RCELWY_1; finsi +si present(GLOBAL.RCELWZ_1) alors CORR.RCELWZ1731 = GLOBAL.RCELWZ_1; finsi +si present(GLOBAL.RCELXO_1) alors CORR.RCELXO1731 = GLOBAL.RCELXO_1; finsi +si present(GLOBAL.RCELXP_1) alors CORR.RCELXP1731 = GLOBAL.RCELXP_1; finsi +si present(GLOBAL.RCELXQ_1) alors CORR.RCELXQ1731 = GLOBAL.RCELXQ_1; finsi +si present(GLOBAL.RCELYI_1) alors CORR.RCELYI1731 = GLOBAL.RCELYI_1; finsi +si present(GLOBAL.RCELYJ_1) alors CORR.RCELYJ1731 = GLOBAL.RCELYJ_1; finsi +si present(GLOBAL.RCELYK_1) alors CORR.RCELYK1731 = GLOBAL.RCELYK_1; finsi +si present(GLOBAL.RCELYL_1) alors CORR.RCELYL1731 = GLOBAL.RCELYL_1; finsi +si present(GLOBAL.RCELZI_1) alors CORR.RCELZI1731 = GLOBAL.RCELZI_1; finsi +si present(GLOBAL.RCELZJ_1) alors CORR.RCELZJ1731 = GLOBAL.RCELZJ_1; finsi +si present(GLOBAL.RCELZK_1) alors CORR.RCELZK1731 = GLOBAL.RCELZK_1; finsi +si present(GLOBAL.RCELZL_1) alors CORR.RCELZL1731 = GLOBAL.RCELZL_1; finsi +si present(GLOBAL.RCELZM_1) alors CORR.RCELZM1731 = GLOBAL.RCELZM_1; finsi +si present(GLOBAL.RCINE_1) alors CORR.RCINE1731 = GLOBAL.RCINE_1; finsi +si present(GLOBAL.RCM1) alors CORR.RCM1731 = GLOBAL.RCM1; finsi +si present(GLOBAL.RCMFR) alors CORR.RCMFR1731 = GLOBAL.RCMFR; finsi +si present(GLOBAL.RCMFRNET) alors CORR.RCMFRNET1731 = GLOBAL.RCMFRNET; finsi +si present(GLOBAL.RCOD7KW_1) alors CORR.RCOD7KW1731 = GLOBAL.RCOD7KW_1; finsi +si present(GLOBAL.RCOD7KX_1) alors CORR.RCOD7KX1731 = GLOBAL.RCOD7KX_1; finsi +si present(GLOBAL.RCOD7KY_1) alors CORR.RCOD7KY1731 = GLOBAL.RCOD7KY_1; finsi +si present(GLOBAL.RCOD7KZ_1) alors CORR.RCOD7KZ1731 = GLOBAL.RCOD7KZ_1; finsi +si present(GLOBAL.RCODJT_1) alors CORR.RCODJT1731 = GLOBAL.RCODJT_1; finsi +si present(GLOBAL.RCODJZ_1) alors CORR.RCODJZ1731 = GLOBAL.RCODJZ_1; finsi +si present(GLOBAL.RCODMW_1) alors CORR.RCODMW1731 = GLOBAL.RCODMW_1; finsi +si present(GLOBAL.RCODMZ_1) alors CORR.RCODMZ1731 = GLOBAL.RCODMZ_1; finsi +si present(GLOBAL.RCODOU_1) alors CORR.RCODOU1731 = GLOBAL.RCODOU_1; finsi +si present(GLOBAL.RCODOX_1) alors CORR.RCODOX1731 = GLOBAL.RCODOX_1; finsi +si present(GLOBAL.RCODOY_1) alors CORR.RCODOY1731 = GLOBAL.RCODOY_1; finsi +si present(GLOBAL.RCODPZ_1) alors CORR.RCODPZ1731 = GLOBAL.RCODPZ_1; finsi +si present(GLOBAL.RCOLENT) alors CORR.RCOLENT1731 = GLOBAL.RCOLENT; finsi +si present(GLOBAL.RCOMP_1) alors CORR.RCOMP1731 = GLOBAL.RCOMP_1; finsi +si present(GLOBAL.RDIFAGRI_1) alors CORR.RDIFAGRI1731 = GLOBAL.RDIFAGRI_1; finsi +si present(GLOBAL.RDOMSOC1) alors CORR.RDOMSOC11731 = GLOBAL.RDOMSOC1; finsi +si present(GLOBAL.RDONDJ_1) alors CORR.RDONDJ1731 = GLOBAL.RDONDJ_1; finsi +si present(GLOBAL.RDONIFI_1) alors CORR.RDONIFI11731 = GLOBAL.RDONIFI_1; finsi +si present(GLOBAL.RDONIFI2_1) alors CORR.RDONIFI21731 = GLOBAL.RDONIFI2_1; finsi +si present(GLOBAL.RDONS_1) alors CORR.RDONS1731 = GLOBAL.RDONS_1; finsi +si present(GLOBAL.RDUFREP_1) alors CORR.RDUFREP1731 = GLOBAL.RDUFREP_1; finsi +si present(GLOBAL.REB) alors CORR.REB1731 = GLOBAL.REB; finsi +si present(GLOBAL.RED_1) alors CORR.RED1731 = GLOBAL.RED_1; finsi +si present(GLOBAL.REPRCMB) alors CORR.REPRCMB1731 = GLOBAL.REPRCMB; finsi +si present(GLOBAL.REVDON) alors CORR.REVDON1731 = GLOBAL.REVDON; finsi +si present(GLOBAL.REVQTOTQHT) alors CORR.REVQTOTQHT1731 = GLOBAL.REVQTOTQHT; finsi +si present(GLOBAL.REVTP) alors CORR.REVTP1731 = GLOBAL.REVTP; finsi +si present(GLOBAL.RFCD) alors CORR.RFCD1731 = GLOBAL.RFCD; finsi +si present(GLOBAL.RFCE) alors CORR.RFCE1731 = GLOBAL.RFCE; finsi +si present(GLOBAL.RFCF) alors CORR.RFCF1731 = GLOBAL.RFCF; finsi +si present(GLOBAL.RFCG) alors CORR.RFCG1731 = GLOBAL.RFCG; finsi +si present(GLOBAL.RFDANT) alors CORR.RFDANT1731 = GLOBAL.RFDANT; finsi +si present(GLOBAL.RFDORD) alors CORR.RFDORD1731 = GLOBAL.RFDORD; finsi +si present(GLOBAL.RFIPC_1) alors CORR.RFIPC1731 = GLOBAL.RFIPC_1; finsi +si present(GLOBAL.RFIPDOM_1) alors CORR.RFIPDOM1731 = GLOBAL.RFIPDOM_1; finsi +si present(GLOBAL.RFON) alors CORR.RFON1731 = GLOBAL.RFON; finsi +si present(GLOBAL.RFORET_1) alors CORR.RFORET1731 = GLOBAL.RFORET_1; finsi +si present(GLOBAL.RFREVENU) alors CORR.RFREVENU1731 = GLOBAL.RFREVENU; finsi +si present(GLOBAL.RGPROV) alors CORR.RGPROV1731 = GLOBAL.RGPROV; finsi +si present(GLOBAL.RHEBE_1) alors CORR.RHEBE1731 = GLOBAL.RHEBE_1; finsi +si present(GLOBAL.RIDEFRI) alors CORR.RIDEFRI1731 = GLOBAL.RIDEFRI; finsi +si present(GLOBAL.RILMHD_1) alors CORR.RILMHD1731 = GLOBAL.RILMHD_1; finsi +si present(GLOBAL.RILMHE_1) alors CORR.RILMHE1731 = GLOBAL.RILMHE_1; finsi +si present(GLOBAL.RILMHF_1) alors CORR.RILMHF1731 = GLOBAL.RILMHF_1; finsi +si present(GLOBAL.RILMHG_1) alors CORR.RILMHG1731 = GLOBAL.RILMHG_1; finsi +si present(GLOBAL.RILMHH_1) alors CORR.RILMHH1731 = GLOBAL.RILMHH_1; finsi +si present(GLOBAL.RILMHO_1) alors CORR.RILMHO1731 = GLOBAL.RILMHO_1; finsi +si present(GLOBAL.RILMHP_1) alors CORR.RILMHP1731 = GLOBAL.RILMHP_1; finsi +si present(GLOBAL.RILMHQ_1) alors CORR.RILMHQ1731 = GLOBAL.RILMHQ_1; finsi +si present(GLOBAL.RILMHR_1) alors CORR.RILMHR1731 = GLOBAL.RILMHR_1; finsi +si present(GLOBAL.RILMHS_1) alors CORR.RILMHS1731 = GLOBAL.RILMHS_1; finsi +si present(GLOBAL.RILMHT_1) alors CORR.RILMHT1731 = GLOBAL.RILMHT_1; finsi +si present(GLOBAL.RILMHU_1) alors CORR.RILMHU1731 = GLOBAL.RILMHU_1; finsi +si present(GLOBAL.RILMHV_1) alors CORR.RILMHV1731 = GLOBAL.RILMHV_1; finsi +si present(GLOBAL.RILMHW_1) alors CORR.RILMHW1731 = GLOBAL.RILMHW_1; finsi +si present(GLOBAL.RILMHX_1) alors CORR.RILMHX1731 = GLOBAL.RILMHX_1; finsi +si present(GLOBAL.RILMJV_1) alors CORR.RILMJV1731 = GLOBAL.RILMJV_1; finsi +si present(GLOBAL.RILMJW_1) alors CORR.RILMJW1731 = GLOBAL.RILMJW_1; finsi +si present(GLOBAL.RILMJX_1) alors CORR.RILMJX1731 = GLOBAL.RILMJX_1; finsi +si present(GLOBAL.RILMJY_1) alors CORR.RILMJY1731 = GLOBAL.RILMJY_1; finsi +si present(GLOBAL.RILMKE_1) alors CORR.RILMKE1731 = GLOBAL.RILMKE_1; finsi +si present(GLOBAL.RILMKF_1) alors CORR.RILMKF1731 = GLOBAL.RILMKF_1; finsi +si present(GLOBAL.RILMKG_1) alors CORR.RILMKG1731 = GLOBAL.RILMKG_1; finsi +si present(GLOBAL.RILMKH_1) alors CORR.RILMKH1731 = GLOBAL.RILMKH_1; finsi +si present(GLOBAL.RILMKI_1) alors CORR.RILMKI1731 = GLOBAL.RILMKI_1; finsi +si present(GLOBAL.RILMOA_1) alors CORR.RILMOA1731 = GLOBAL.RILMOA_1; finsi +si present(GLOBAL.RILMOB_1) alors CORR.RILMOB1731 = GLOBAL.RILMOB_1; finsi +si present(GLOBAL.RILMOC_1) alors CORR.RILMOC1731 = GLOBAL.RILMOC_1; finsi +si present(GLOBAL.RILMOD_1) alors CORR.RILMOD1731 = GLOBAL.RILMOD_1; finsi +si present(GLOBAL.RILMOE_1) alors CORR.RILMOE1731 = GLOBAL.RILMOE_1; finsi +si present(GLOBAL.RILMOK_1) alors CORR.RILMOK1731 = GLOBAL.RILMOK_1; finsi +si present(GLOBAL.RILMOL_1) alors CORR.RILMOL1731 = GLOBAL.RILMOL_1; finsi +si present(GLOBAL.RILMOM_1) alors CORR.RILMOM1731 = GLOBAL.RILMOM_1; finsi +si present(GLOBAL.RILMON_1) alors CORR.RILMON1731 = GLOBAL.RILMON_1; finsi +si present(GLOBAL.RILMOO_1) alors CORR.RILMOO1731 = GLOBAL.RILMOO_1; finsi +si present(GLOBAL.RILMOP_1) alors CORR.RILMOP1731 = GLOBAL.RILMOP_1; finsi +si present(GLOBAL.RILMOQ_1) alors CORR.RILMOQ1731 = GLOBAL.RILMOQ_1; finsi +si present(GLOBAL.RILMOR_1) alors CORR.RILMOR1731 = GLOBAL.RILMOR_1; finsi +si present(GLOBAL.RILMOS_1) alors CORR.RILMOS1731 = GLOBAL.RILMOS_1; finsi +si present(GLOBAL.RILMOT_1) alors CORR.RILMOT1731 = GLOBAL.RILMOT_1; finsi +si present(GLOBAL.RILMPF_1) alors CORR.RILMPF1731 = GLOBAL.RILMPF_1; finsi +si present(GLOBAL.RILMPG_1) alors CORR.RILMPG1731 = GLOBAL.RILMPG_1; finsi +si present(GLOBAL.RILMPH_1) alors CORR.RILMPH1731 = GLOBAL.RILMPH_1; finsi +si present(GLOBAL.RILMPI_1) alors CORR.RILMPI1731 = GLOBAL.RILMPI_1; finsi +si present(GLOBAL.RILMPJ_1) alors CORR.RILMPJ1731 = GLOBAL.RILMPJ_1; finsi +si present(GLOBAL.RILMPU_1) alors CORR.RILMPU1731 = GLOBAL.RILMPU_1; finsi +si present(GLOBAL.RILMPV_1) alors CORR.RILMPV1731 = GLOBAL.RILMPV_1; finsi +si present(GLOBAL.RILMPW_1) alors CORR.RILMPW1731 = GLOBAL.RILMPW_1; finsi +si present(GLOBAL.RILMPX_1) alors CORR.RILMPX1731 = GLOBAL.RILMPX_1; finsi +si present(GLOBAL.RILMPY_1) alors CORR.RILMPY1731 = GLOBAL.RILMPY_1; finsi +si present(GLOBAL.RILMSA_1) alors CORR.RILMSA1731 = GLOBAL.RILMSA_1; finsi +si present(GLOBAL.RILMSB_1) alors CORR.RILMSB1731 = GLOBAL.RILMSB_1; finsi +si present(GLOBAL.RILMSC_1) alors CORR.RILMSC1731 = GLOBAL.RILMSC_1; finsi +si present(GLOBAL.RILMSM_1) alors CORR.RILMSM1731 = GLOBAL.RILMSM_1; finsi +si present(GLOBAL.RILMSN_1) alors CORR.RILMSN1731 = GLOBAL.RILMSN_1; finsi +si present(GLOBAL.RILMSO_1) alors CORR.RILMSO1731 = GLOBAL.RILMSO_1; finsi +si present(GLOBAL.RILMSP_1) alors CORR.RILMSP1731 = GLOBAL.RILMSP_1; finsi +si present(GLOBAL.RILMSS_1) alors CORR.RILMSS1731 = GLOBAL.RILMSS_1; finsi +si present(GLOBAL.RILMST_1) alors CORR.RILMST1731 = GLOBAL.RILMST_1; finsi +si present(GLOBAL.RINNO_1) alors CORR.RINNO1731 = GLOBAL.RINNO_1; finsi +si present(GLOBAL.RLOCANAH_1) alors CORR.RLOCANAH1731 = GLOBAL.RLOCANAH_1; finsi +si present(GLOBAL.RLOCENT_1) alors CORR.RLOCENT1731 = GLOBAL.RLOCENT_1; finsi +si present(GLOBAL.RLOCHEN_1) alors CORR.RLOCHEN1731 = GLOBAL.RLOCHEN_1; finsi +si present(GLOBAL.RLOCHENR_1) alors CORR.RLOCHENR1731 = GLOBAL.RLOCHENR_1; finsi +si present(GLOBAL.RLOCHEO_1) alors CORR.RLOCHEO1731 = GLOBAL.RLOCHEO_1; finsi +si present(GLOBAL.RLOCHEOR_1) alors CORR.RLOCHEOR1731 = GLOBAL.RLOCHEOR_1; finsi +si present(GLOBAL.RLOCHEP_1) alors CORR.RLOCHEP1731 = GLOBAL.RLOCHEP_1; finsi +si present(GLOBAL.RLOCHER_1) alors CORR.RLOCHER1731 = GLOBAL.RLOCHER_1; finsi +si present(GLOBAL.RLOCHES_1) alors CORR.RLOCHES1731 = GLOBAL.RLOCHES_1; finsi +si present(GLOBAL.RLOCHESR_1) alors CORR.RLOCHESR1731 = GLOBAL.RLOCHESR_1; finsi +si present(GLOBAL.RLOCHET_1) alors CORR.RLOCHET1731 = GLOBAL.RLOCHET_1; finsi +si present(GLOBAL.RLOCHETR_1) alors CORR.RLOCHETR1731 = GLOBAL.RLOCHETR_1; finsi +si present(GLOBAL.RLOCHEU_1) alors CORR.RLOCHEU1731 = GLOBAL.RLOCHEU_1; finsi +si present(GLOBAL.RLOCHEW_1) alors CORR.RLOCHEW1731 = GLOBAL.RLOCHEW_1; finsi +si present(GLOBAL.RLOCHFN_1) alors CORR.RLOCHFN1731 = GLOBAL.RLOCHFN_1; finsi +si present(GLOBAL.RLOCHFNR_1) alors CORR.RLOCHFNR1731 = GLOBAL.RLOCHFNR_1; finsi +si present(GLOBAL.RLOCHFO_1) alors CORR.RLOCHFO1731 = GLOBAL.RLOCHFO_1; finsi +si present(GLOBAL.RLOCHFOR_1) alors CORR.RLOCHFOR1731 = GLOBAL.RLOCHFOR_1; finsi +si present(GLOBAL.RLOCHFP_1) alors CORR.RLOCHFP1731 = GLOBAL.RLOCHFP_1; finsi +si present(GLOBAL.RLOCHFR_1) alors CORR.RLOCHFR1731 = GLOBAL.RLOCHFR_1; finsi +si present(GLOBAL.RLOCHFS_1) alors CORR.RLOCHFS1731 = GLOBAL.RLOCHFS_1; finsi +si present(GLOBAL.RLOCHFSR_1) alors CORR.RLOCHFSR1731 = GLOBAL.RLOCHFSR_1; finsi +si present(GLOBAL.RLOCHFT_1) alors CORR.RLOCHFT1731 = GLOBAL.RLOCHFT_1; finsi +si present(GLOBAL.RLOCHFTR_1) alors CORR.RLOCHFTR1731 = GLOBAL.RLOCHFTR_1; finsi +si present(GLOBAL.RLOCHFU_1) alors CORR.RLOCHFU1731 = GLOBAL.RLOCHFU_1; finsi +si present(GLOBAL.RLOCHFW_1) alors CORR.RLOCHFW1731 = GLOBAL.RLOCHFW_1; finsi +si present(GLOBAL.RLOCHGS_1) alors CORR.RLOCHGS1731 = GLOBAL.RLOCHGS_1; finsi +si present(GLOBAL.RLOCHGSR_1) alors CORR.RLOCHGSR1731 = GLOBAL.RLOCHGSR_1; finsi +si present(GLOBAL.RLOCHGT_1) alors CORR.RLOCHGT1731 = GLOBAL.RLOCHGT_1; finsi +si present(GLOBAL.RLOCHGTR_1) alors CORR.RLOCHGTR1731 = GLOBAL.RLOCHGTR_1; finsi +si present(GLOBAL.RLOCHGU_1) alors CORR.RLOCHGU1731 = GLOBAL.RLOCHGU_1; finsi +si present(GLOBAL.RLOCHGW_1) alors CORR.RLOCHGW1731 = GLOBAL.RLOCHGW_1; finsi +si present(GLOBAL.RLOCHHS_1) alors CORR.RLOCHHS1731 = GLOBAL.RLOCHHS_1; finsi +si present(GLOBAL.RLOCHHSR_1) alors CORR.RLOCHHSR1731 = GLOBAL.RLOCHHSR_1; finsi +si present(GLOBAL.RLOCHHT_1) alors CORR.RLOCHHT1731 = GLOBAL.RLOCHHT_1; finsi +si present(GLOBAL.RLOCHHTR_1) alors CORR.RLOCHHTR1731 = GLOBAL.RLOCHHTR_1; finsi +si present(GLOBAL.RLOCHHU_1) alors CORR.RLOCHHU1731 = GLOBAL.RLOCHHU_1; finsi +si present(GLOBAL.RLOCHHW_1) alors CORR.RLOCHHW1731 = GLOBAL.RLOCHHW_1; finsi +si present(GLOBAL.RLOCHIS_1) alors CORR.RLOCHIS1731 = GLOBAL.RLOCHIS_1; finsi +si present(GLOBAL.RLOCHISR_1) alors CORR.RLOCHISR1731 = GLOBAL.RLOCHISR_1; finsi +si present(GLOBAL.RLOCHIT_1) alors CORR.RLOCHIT1731 = GLOBAL.RLOCHIT_1; finsi +si present(GLOBAL.RLOCHITR_1) alors CORR.RLOCHITR1731 = GLOBAL.RLOCHITR_1; finsi +si present(GLOBAL.RLOCHIU_1) alors CORR.RLOCHIU1731 = GLOBAL.RLOCHIU_1; finsi +si present(GLOBAL.RLOCHIW_1) alors CORR.RLOCHIW1731 = GLOBAL.RLOCHIW_1; finsi +si present(GLOBAL.RLOCHJS_1) alors CORR.RLOCHJS1731 = GLOBAL.RLOCHJS_1; finsi +si present(GLOBAL.RLOCHJSR_1) alors CORR.RLOCHJSR1731 = GLOBAL.RLOCHJSR_1; finsi +si present(GLOBAL.RLOCHJT_1) alors CORR.RLOCHJT1731 = GLOBAL.RLOCHJT_1; finsi +si present(GLOBAL.RLOCHJTR_1) alors CORR.RLOCHJTR1731 = GLOBAL.RLOCHJTR_1; finsi +si present(GLOBAL.RLOCHJU_1) alors CORR.RLOCHJU1731 = GLOBAL.RLOCHJU_1; finsi +si present(GLOBAL.RLOCHJW_1) alors CORR.RLOCHJW1731 = GLOBAL.RLOCHJW_1; finsi +si present(GLOBAL.RLOG01_1) alors CORR.RLOG011731 = GLOBAL.RLOG01_1; finsi +si present(GLOBAL.RLOG01_1) alors CORR.RLOG031731 = GLOBAL.RLOG01_1; finsi +si present(GLOBAL.RLOG02_1) alors CORR.RLOG021731 = GLOBAL.RLOG02_1; finsi +si present(GLOBAL.RLOG04_1) alors CORR.RLOG041731 = GLOBAL.RLOG04_1; finsi +si present(GLOBAL.RLOG05_1) alors CORR.RLOG051731 = GLOBAL.RLOG05_1; finsi +si present(GLOBAL.RLOG06_1) alors CORR.RLOG061731 = GLOBAL.RLOG06_1; finsi +si present(GLOBAL.RLOG07_1) alors CORR.RLOG071731 = GLOBAL.RLOG07_1; finsi +si present(GLOBAL.RLOG08_1) alors CORR.RLOG081731 = GLOBAL.RLOG08_1; finsi +si present(GLOBAL.RLOG09_1) alors CORR.RLOG091731 = GLOBAL.RLOG09_1; finsi +si present(GLOBAL.RLOG10_1) alors CORR.RLOG101731 = GLOBAL.RLOG10_1; finsi +si present(GLOBAL.RLOG11_1) alors CORR.RLOG111731 = GLOBAL.RLOG11_1; finsi +si present(GLOBAL.RLOG12_1) alors CORR.RLOG121731 = GLOBAL.RLOG12_1; finsi +si present(GLOBAL.RLOG13_1) alors CORR.RLOG131731 = GLOBAL.RLOG13_1; finsi +si present(GLOBAL.RLOG14_1) alors CORR.RLOG141731 = GLOBAL.RLOG14_1; finsi +si present(GLOBAL.RLOG15_1) alors CORR.RLOG151731 = GLOBAL.RLOG15_1; finsi +si present(GLOBAL.RLOG16_1) alors CORR.RLOG161731 = GLOBAL.RLOG16_1; finsi +si present(GLOBAL.RLOG17_1) alors CORR.RLOG171731 = GLOBAL.RLOG17_1; finsi +si present(GLOBAL.RLOG18_1) alors CORR.RLOG181731 = GLOBAL.RLOG18_1; finsi +si present(GLOBAL.RLOG19_1) alors CORR.RLOG191731 = GLOBAL.RLOG19_1; finsi +si present(GLOBAL.RLOG20_1) alors CORR.RLOG201731 = GLOBAL.RLOG20_1; finsi +si present(GLOBAL.RLOG21_1) alors CORR.RLOG211731 = GLOBAL.RLOG21_1; finsi +si present(GLOBAL.RLOG22_1) alors CORR.RLOG221731 = GLOBAL.RLOG22_1; finsi +si present(GLOBAL.RLOG23_1) alors CORR.RLOG231731 = GLOBAL.RLOG23_1; finsi +si present(GLOBAL.RLOG24_1) alors CORR.RLOG241731 = GLOBAL.RLOG24_1; finsi +si present(GLOBAL.RLOG25_1) alors CORR.RLOG251731 = GLOBAL.RLOG25_1; finsi +si present(GLOBAL.RLOG26_1) alors CORR.RLOG261731 = GLOBAL.RLOG26_1; finsi +si present(GLOBAL.RLOG27_1) alors CORR.RLOG271731 = GLOBAL.RLOG27_1; finsi +si present(GLOBAL.RLOG28_1) alors CORR.RLOG281731 = GLOBAL.RLOG28_1; finsi +si present(GLOBAL.RLOG29_1) alors CORR.RLOG291731 = GLOBAL.RLOG29_1; finsi +si present(GLOBAL.RLOG30_1) alors CORR.RLOG301731 = GLOBAL.RLOG30_1; finsi +si present(GLOBAL.RLOG31_1) alors CORR.RLOG311731 = GLOBAL.RLOG31_1; finsi +si present(GLOBAL.RLOG32_1) alors CORR.RLOG321731 = GLOBAL.RLOG32_1; finsi +si present(GLOBAL.RLOG33_1) alors CORR.RLOG331731 = GLOBAL.RLOG33_1; finsi +si present(GLOBAL.RLOG34_1) alors CORR.RLOG341731 = GLOBAL.RLOG34_1; finsi +si present(GLOBAL.RLOG35_1) alors CORR.RLOG351731 = GLOBAL.RLOG35_1; finsi +si present(GLOBAL.RLOG36_1) alors CORR.RLOG361731 = GLOBAL.RLOG36_1; finsi +si present(GLOBAL.RLOG37_1) alors CORR.RLOG371731 = GLOBAL.RLOG37_1; finsi +si present(GLOBAL.RLOG38_1) alors CORR.RLOG381731 = GLOBAL.RLOG38_1; finsi +si present(GLOBAL.RLOG39_1) alors CORR.RLOG391731 = GLOBAL.RLOG39_1; finsi +si present(GLOBAL.RLOG40_1) alors CORR.RLOG401731 = GLOBAL.RLOG40_1; finsi +si present(GLOBAL.RLOG41_1) alors CORR.RLOG411731 = GLOBAL.RLOG41_1; finsi +si present(GLOBAL.RLOG42_1) alors CORR.RLOG421731 = GLOBAL.RLOG42_1; finsi +si present(GLOBAL.RLOG43_1) alors CORR.RLOG431731 = GLOBAL.RLOG43_1; finsi +si present(GLOBAL.RLOG44_1) alors CORR.RLOG441731 = GLOBAL.RLOG44_1; finsi +si present(GLOBAL.RLOG45_1) alors CORR.RLOG451731 = GLOBAL.RLOG45_1; finsi +si present(GLOBAL.RLOG46_1) alors CORR.RLOG461731 = GLOBAL.RLOG46_1; finsi +si present(GLOBAL.RLOG47_1) alors CORR.RLOG471731 = GLOBAL.RLOG47_1; finsi +si present(GLOBAL.RLOG48_1) alors CORR.RLOG481731 = GLOBAL.RLOG48_1; finsi +si present(GLOBAL.RLOG49_1) alors CORR.RLOG491731 = GLOBAL.RLOG49_1; finsi +si present(GLOBAL.RLOG50_1) alors CORR.RLOG501731 = GLOBAL.RLOG50_1; finsi +si present(GLOBAL.RLOG51_1) alors CORR.RLOG511731 = GLOBAL.RLOG51_1; finsi +si present(GLOBAL.RLOG52_1) alors CORR.RLOG521731 = GLOBAL.RLOG52_1; finsi +si present(GLOBAL.RLOG53_1) alors CORR.RLOG531731 = GLOBAL.RLOG53_1; finsi +si present(GLOBAL.RLOG54_1) alors CORR.RLOG541731 = GLOBAL.RLOG54_1; finsi +si present(GLOBAL.RLOG55_1) alors CORR.RLOG551731 = GLOBAL.RLOG55_1; finsi +si present(GLOBAL.RLOG56_1) alors CORR.RLOG561731 = GLOBAL.RLOG56_1; finsi +si present(GLOBAL.RLOG57_1) alors CORR.RLOG571731 = GLOBAL.RLOG57_1; finsi +si present(GLOBAL.RLOG58_1) alors CORR.RLOG581731 = GLOBAL.RLOG58_1; finsi +si present(GLOBAL.RLOG59_1) alors CORR.RLOG591731 = GLOBAL.RLOG59_1; finsi +si present(GLOBAL.RLOG60_1) alors CORR.RLOG601731 = GLOBAL.RLOG60_1; finsi +si present(GLOBAL.RLOGDOM) alors CORR.RLOGDOM1731 = GLOBAL.RLOGDOM; finsi +si present(GLOBAL.RLOGHVH_1) alors CORR.RLOGHVH1731 = GLOBAL.RLOGHVH_1; finsi +si present(GLOBAL.RLOGHVI_1) alors CORR.RLOGHVI1731 = GLOBAL.RLOGHVI_1; finsi +si present(GLOBAL.RLOGHVJ_1) alors CORR.RLOGHVJ1731 = GLOBAL.RLOGHVJ_1; finsi +si present(GLOBAL.RLOGHVK_1) alors CORR.RLOGHVK1731 = GLOBAL.RLOGHVK_1; finsi +si present(GLOBAL.RLOGHVL_1) alors CORR.RLOGHVL1731 = GLOBAL.RLOGHVL_1; finsi +si present(GLOBAL.RLOGHVM_1) alors CORR.RLOGHVM1731 = GLOBAL.RLOGHVM_1; finsi +si present(GLOBAL.RLOGSOC) alors CORR.RLOGSOC1731 = GLOBAL.RLOGSOC; finsi +si present(GLOBAL.RMF) alors CORR.RMF1731 = GLOBAL.RMF; finsi +si present(GLOBAL.RNIDF) alors CORR.RNIDF1731 = GLOBAL.RNIDF; finsi +si present(GLOBAL.RNOJE_1) alors CORR.RNOJE1731 = GLOBAL.RNOJE_1; finsi +si present(GLOBAL.RNOJF_1) alors CORR.RNOJF1731 = GLOBAL.RNOJF_1; finsi +si present(GLOBAL.RNOJG_1) alors CORR.RNOJG1731 = GLOBAL.RNOJG_1; finsi +si present(GLOBAL.RNOJH_1) alors CORR.RNOJH1731 = GLOBAL.RNOJH_1; finsi +si present(GLOBAL.RNONE_1) alors CORR.RNONE1731 = GLOBAL.RNONE_1; finsi +si present(GLOBAL.RNONF_1) alors CORR.RNONF1731 = GLOBAL.RNONF_1; finsi +si present(GLOBAL.RNONG_1) alors CORR.RNONG1731 = GLOBAL.RNONG_1; finsi +si present(GLOBAL.RNONH_1) alors CORR.RNONH1731 = GLOBAL.RNONH_1; finsi +si present(GLOBAL.RNONI_1) alors CORR.RNONI1731 = GLOBAL.RNONI_1; finsi +si present(GLOBAL.RNONJ_1) alors CORR.RNONJ1731 = GLOBAL.RNONJ_1; finsi +si present(GLOBAL.RNONK_1) alors CORR.RNONK1731 = GLOBAL.RNONK_1; finsi +si present(GLOBAL.RNONL_1) alors CORR.RNONL1731 = GLOBAL.RNONL_1; finsi +si present(GLOBAL.RNONM_1) alors CORR.RNONM1731 = GLOBAL.RNONM_1; finsi +si present(GLOBAL.RNONN_1) alors CORR.RNONN1731 = GLOBAL.RNONN_1; finsi +si present(GLOBAL.RNONO_1) alors CORR.RNONO1731 = GLOBAL.RNONO_1; finsi +si present(GLOBAL.RNONP_1) alors CORR.RNONP1731 = GLOBAL.RNONP_1; finsi +si present(GLOBAL.RNONQ_1) alors CORR.RNONQ1731 = GLOBAL.RNONQ_1; finsi +si present(GLOBAL.RNONR_1) alors CORR.RNONR1731 = GLOBAL.RNONR_1; finsi +si present(GLOBAL.RNOPF_1) alors CORR.RNOPF1731 = GLOBAL.RNOPF_1; finsi +si present(GLOBAL.RNOPG_1) alors CORR.RNOPG1731 = GLOBAL.RNOPG_1; finsi +si present(GLOBAL.RNORMAB_1) alors CORR.RNORMAB1731 = GLOBAL.RNORMAB_1; finsi +si present(GLOBAL.RNORMCD_1) alors CORR.RNORMCD1731 = GLOBAL.RNORMCD_1; finsi +si present(GLOBAL.RNORMEF_1) alors CORR.RNORMEF1731 = GLOBAL.RNORMEF_1; finsi +si present(GLOBAL.RNORMGH_1) alors CORR.RNORMGH1731 = GLOBAL.RNORMGH_1; finsi +si present(GLOBAL.RNORMJA_1) alors CORR.RNORMJA1731 = GLOBAL.RNORMJA_1; finsi +si present(GLOBAL.RNORMJB_1) alors CORR.RNORMJB1731 = GLOBAL.RNORMJB_1; finsi +si present(GLOBAL.RNORMJC_1) alors CORR.RNORMJC1731 = GLOBAL.RNORMJC_1; finsi +si present(GLOBAL.RNORMJD_1) alors CORR.RNORMJD1731 = GLOBAL.RNORMJD_1; finsi +si present(GLOBAL.RNORMJR_1) alors CORR.RNORMJR1731 = GLOBAL.RNORMJR_1; finsi +si present(GLOBAL.RNORMJS_1) alors CORR.RNORMJS1731 = GLOBAL.RNORMJS_1; finsi +si present(GLOBAL.RNORMJT_1) alors CORR.RNORMJT1731 = GLOBAL.RNORMJT_1; finsi +si present(GLOBAL.RNORMJU_1) alors CORR.RNORMJU1731 = GLOBAL.RNORMJU_1; finsi +si present(GLOBAL.RNORMLG_1) alors CORR.RNORMLG1731 = GLOBAL.RNORMLG_1; finsi +si present(GLOBAL.RNORMLH_1) alors CORR.RNORMLH1731 = GLOBAL.RNORMLH_1; finsi +si present(GLOBAL.RNORMLI_1) alors CORR.RNORMLI1731 = GLOBAL.RNORMLI_1; finsi +si present(GLOBAL.RNORMLJ_1) alors CORR.RNORMLJ1731 = GLOBAL.RNORMLJ_1; finsi +si present(GLOBAL.RNOUV_1) alors CORR.RNOUV1731 = GLOBAL.RNOUV_1; finsi +si present(GLOBAL.RPATNAT) alors CORR.RPATNAT1731 = GLOBAL.RPATNAT; finsi +si present(GLOBAL.RPENTCY_1) alors CORR.RPENTCY1731 = GLOBAL.RPENTCY_1; finsi +si present(GLOBAL.RPENTDY_1) alors CORR.RPENTDY1731 = GLOBAL.RPENTDY_1; finsi +si present(GLOBAL.RPENTEK_1) alors CORR.RPENTEK1731 = GLOBAL.RPENTEK_1; finsi +si present(GLOBAL.RPENTEY_1) alors CORR.RPENTEY1731 = GLOBAL.RPENTEY_1; finsi +si present(GLOBAL.RPENTFY_1) alors CORR.RPENTFY1731 = GLOBAL.RPENTFY_1; finsi +si present(GLOBAL.RPENTGY_1) alors CORR.RPENTGY1731 = GLOBAL.RPENTGY_1; finsi +si present(GLOBAL.RPIJI_1) alors CORR.RPIJI1731 = GLOBAL.RPIJI_1; finsi +si present(GLOBAL.RPIJJ_1) alors CORR.RPIJJ1731 = GLOBAL.RPIJJ_1; finsi +si present(GLOBAL.RPIJK_1) alors CORR.RPIJK1731 = GLOBAL.RPIJK_1; finsi +si present(GLOBAL.RPIJL_1) alors CORR.RPIJL1731 = GLOBAL.RPIJL_1; finsi +si present(GLOBAL.RPIJN_1) alors CORR.RPIJN1731 = GLOBAL.RPIJN_1; finsi +si present(GLOBAL.RPIJO_1) alors CORR.RPIJO1731 = GLOBAL.RPIJO_1; finsi +si present(GLOBAL.RPIJP_1) alors CORR.RPIJP1731 = GLOBAL.RPIJP_1; finsi +si present(GLOBAL.RPIJQ_1) alors CORR.RPIJQ1731 = GLOBAL.RPIJQ_1; finsi +si present(GLOBAL.RPIJV_1) alors CORR.RPIJV1731 = GLOBAL.RPIJV_1; finsi +si present(GLOBAL.RPIJW_1) alors CORR.RPIJW1731 = GLOBAL.RPIJW_1; finsi +si present(GLOBAL.RPIJX_1) alors CORR.RPIJX1731 = GLOBAL.RPIJX_1; finsi +si present(GLOBAL.RPIJY_1) alors CORR.RPIJY1731 = GLOBAL.RPIJY_1; finsi +si present(GLOBAL.RPIPK_1) alors CORR.RPIPK1731 = GLOBAL.RPIPK_1; finsi +si present(GLOBAL.RPIPL_1) alors CORR.RPIPL1731 = GLOBAL.RPIPL_1; finsi +si present(GLOBAL.RPIPM_1) alors CORR.RPIPM1731 = GLOBAL.RPIPM_1; finsi +si present(GLOBAL.RPIPN_1) alors CORR.RPIPN1731 = GLOBAL.RPIPN_1; finsi +si present(GLOBAL.RPIQA_1) alors CORR.RPIQA1731 = GLOBAL.RPIQA_1; finsi +si present(GLOBAL.RPIQB_1) alors CORR.RPIQB1731 = GLOBAL.RPIQB_1; finsi +si present(GLOBAL.RPIQC_1) alors CORR.RPIQC1731 = GLOBAL.RPIQC_1; finsi +si present(GLOBAL.RPIQD_1) alors CORR.RPIQD1731 = GLOBAL.RPIQD_1; finsi +si present(GLOBAL.RPIQI_1) alors CORR.RPIQI1731 = GLOBAL.RPIQI_1; finsi +si present(GLOBAL.RPIQJ_1) alors CORR.RPIQJ1731 = GLOBAL.RPIQJ_1; finsi +si present(GLOBAL.RPIQK_1) alors CORR.RPIQK1731 = GLOBAL.RPIQK_1; finsi +si present(GLOBAL.RPIQL_1) alors CORR.RPIQL1731 = GLOBAL.RPIQL_1; finsi +si present(GLOBAL.RPIQM_1) alors CORR.RPIQM1731 = GLOBAL.RPIQM_1; finsi +si present(GLOBAL.RPIQN_1) alors CORR.RPIQN1731 = GLOBAL.RPIQN_1; finsi +si present(GLOBAL.RPIQO_1) alors CORR.RPIQO1731 = GLOBAL.RPIQO_1; finsi +si present(GLOBAL.RPIQP_1) alors CORR.RPIQP1731 = GLOBAL.RPIQP_1; finsi +si present(GLOBAL.RPIQQ_1) alors CORR.RPIQQ1731 = GLOBAL.RPIQQ_1; finsi +si present(GLOBAL.RPIQR_1) alors CORR.RPIQR1731 = GLOBAL.RPIQR_1; finsi +si present(GLOBAL.RPIQS_1) alors CORR.RPIQS1731 = GLOBAL.RPIQS_1; finsi +si present(GLOBAL.RPIQT_1) alors CORR.RPIQT1731 = GLOBAL.RPIQT_1; finsi +si present(GLOBAL.RPIQU_1) alors CORR.RPIQU1731 = GLOBAL.RPIQU_1; finsi +si present(GLOBAL.RPIQW_1) alors CORR.RPIQW1731 = GLOBAL.RPIQW_1; finsi +si present(GLOBAL.RPIQX_1) alors CORR.RPIQX1731 = GLOBAL.RPIQX_1; finsi +si present(GLOBAL.RPIQY_1) alors CORR.RPIQY1731 = GLOBAL.RPIQY_1; finsi +si present(GLOBAL.RPIREPCZ_1) alors CORR.RPIREPCZ1731 = GLOBAL.RPIREPCZ_1; finsi +si present(GLOBAL.RPIREPEZ_1) alors CORR.RPIREPEZ1731 = GLOBAL.RPIREPEZ_1; finsi +si present(GLOBAL.RPIREPJM_1) alors CORR.RPIREPJM1731 = GLOBAL.RPIREPJM_1; finsi +si present(GLOBAL.RPIREPKM_1) alors CORR.RPIREPKM1731 = GLOBAL.RPIREPKM_1; finsi +si present(GLOBAL.RPIREPLM_1) alors CORR.RPIREPLM1731 = GLOBAL.RPIREPLM_1; finsi +si present(GLOBAL.RPIREPMM_1) alors CORR.RPIREPMM1731 = GLOBAL.RPIREPMM_1; finsi +si present(GLOBAL.RPIREPRB_1) alors CORR.RPIREPRB1731 = GLOBAL.RPIREPRB_1; finsi +si present(GLOBAL.RPIREPRD_1) alors CORR.RPIREPRD1731 = GLOBAL.RPIREPRD_1; finsi +si present(GLOBAL.RPIREPRE_1) alors CORR.RPIREPRE1731 = GLOBAL.RPIREPRE_1; finsi +si present(GLOBAL.RPIREPRF_1) alors CORR.RPIREPRF1731 = GLOBAL.RPIREPRF_1; finsi +si present(GLOBAL.RPIREPRG_1) alors CORR.RPIREPRG1731 = GLOBAL.RPIREPRG_1; finsi +si present(GLOBAL.RPIREPRH_1) alors CORR.RPIREPRH1731 = GLOBAL.RPIREPRH_1; finsi +si present(GLOBAL.RPIREPRZ_1) alors CORR.RPIREPRZ1731 = GLOBAL.RPIREPRZ_1; finsi +si present(GLOBAL.RPIREPTZ_1) alors CORR.RPIREPTZ1731 = GLOBAL.RPIREPTZ_1; finsi +si present(GLOBAL.RPIRI_1) alors CORR.RPIRI1731 = GLOBAL.RPIRI_1; finsi +si present(GLOBAL.RPIRJ_1) alors CORR.RPIRJ1731 = GLOBAL.RPIRJ_1; finsi +si present(GLOBAL.RPIRP_1) alors CORR.RPIRP1731 = GLOBAL.RPIRP_1; finsi +si present(GLOBAL.RPIRQ_1) alors CORR.RPIRQ1731 = GLOBAL.RPIRQ_1; finsi +si present(GLOBAL.RPIRR_1) alors CORR.RPIRR1731 = GLOBAL.RPIRR_1; finsi +si present(GLOBAL.RPIRS_1) alors CORR.RPIRS1731 = GLOBAL.RPIRS_1; finsi +si present(GLOBAL.RPIRV_1) alors CORR.RPIRV1731 = GLOBAL.RPIRV_1; finsi +si present(GLOBAL.RPIRW_1) alors CORR.RPIRW1731 = GLOBAL.RPIRW_1; finsi +si present(GLOBAL.RPIUY_1) alors CORR.RPIUY1731 = GLOBAL.RPIUY_1; finsi +si present(GLOBAL.RPIUZ_1) alors CORR.RPIUZ1731 = GLOBAL.RPIUZ_1; finsi +si present(GLOBAL.RPIVD_1) alors CORR.RPIVD1731 = GLOBAL.RPIVD_1; finsi +si present(GLOBAL.RPIVE_1) alors CORR.RPIVE1731 = GLOBAL.RPIVE_1; finsi +si present(GLOBAL.RPIVF_1) alors CORR.RPIVF1731 = GLOBAL.RPIVF_1; finsi +si present(GLOBAL.RPIVG_1) alors CORR.RPIVG1731 = GLOBAL.RPIVG_1; finsi +si present(GLOBAL.RPIWA_1) alors CORR.RPIWA1731 = GLOBAL.RPIWA_1; finsi +si present(GLOBAL.RPIWB_1) alors CORR.RPIWB1731 = GLOBAL.RPIWB_1; finsi +si present(GLOBAL.RPRESSE_1) alors CORR.RPRESSE1731 = GLOBAL.RPRESSE_1; finsi +si present(GLOBAL.RRBGPROV) alors CORR.RRBGPROV1731 = GLOBAL.RRBGPROV; finsi +si present(GLOBAL.RREHAB_1) alors CORR.RREHAB1731 = GLOBAL.RREHAB_1; finsi +si present(GLOBAL.RREPA_1) alors CORR.RREPA1731 = GLOBAL.RREPA_1; finsi +si present(GLOBAL.RRESTIMO1_1) alors CORR.RRESTIMO11731 = GLOBAL.RRESTIMO1_1; finsi +si present(GLOBAL.RRESTIMO_1) alors CORR.RRESTIMO1731 = GLOBAL.RRESTIMO_1; finsi +si present(GLOBAL.RRESTIMONX_1) alors CORR.RRESTIMONX1731 = GLOBAL.RRESTIMONX_1; finsi +si present(GLOBAL.RRESTIMONY_1) alors CORR.RRESTIMONY1731 = GLOBAL.RRESTIMONY_1; finsi +si present(GLOBAL.RRETU_1) alors CORR.RRETU1731 = GLOBAL.RRETU_1; finsi +si present(GLOBAL.RRIRENOV_1) alors CORR.RRIRENOV1731 = GLOBAL.RRIRENOV_1; finsi +si present(GLOBAL.RRIREP_1) alors CORR.RRIREP1731 = GLOBAL.RRIREP_1; finsi +si present(GLOBAL.RRPRESCOMP_1) alors CORR.RRPRESCOMP1731 = GLOBAL.RRPRESCOMP_1; finsi +si present(GLOBAL.RRSOFON_1) alors CORR.RRSOFON1731 = GLOBAL.RRSOFON_1; finsi +si present(GLOBAL.RSC301_1) alors CORR.RSC3011731 = GLOBAL.RSC301_1; finsi +si present(GLOBAL.RSC302_1) alors CORR.RSC3021731 = GLOBAL.RSC302_1; finsi +si present(GLOBAL.RSC303_1) alors CORR.RSC3031731 = GLOBAL.RSC303_1; finsi +si present(GLOBAL.RSC304_1) alors CORR.RSC3041731 = GLOBAL.RSC304_1; finsi +si present(GLOBAL.RSC305_1) alors CORR.RSC3051731 = GLOBAL.RSC305_1; finsi +si present(GLOBAL.RSC306_1) alors CORR.RSC3061731 = GLOBAL.RSC306_1; finsi +si present(GLOBAL.RSC307_1) alors CORR.RSC3071731 = GLOBAL.RSC307_1; finsi +si present(GLOBAL.RSC308_1) alors CORR.RSC3081731 = GLOBAL.RSC308_1; finsi +si present(GLOBAL.RSC309_1) alors CORR.RSC3091731 = GLOBAL.RSC309_1; finsi +si present(GLOBAL.RSC310_1) alors CORR.RSC3101731 = GLOBAL.RSC310_1; finsi +si present(GLOBAL.RSC311_1) alors CORR.RSC3111731 = GLOBAL.RSC311_1; finsi +si present(GLOBAL.RSC312_1) alors CORR.RSC3121731 = GLOBAL.RSC312_1; finsi +si present(GLOBAL.RSC313_1) alors CORR.RSC3131731 = GLOBAL.RSC313_1; finsi +si present(GLOBAL.RSC314_1) alors CORR.RSC3141731 = GLOBAL.RSC314_1; finsi +si present(GLOBAL.RSC315_1) alors CORR.RSC3151731 = GLOBAL.RSC315_1; finsi +si present(GLOBAL.RSC316_1) alors CORR.RSC3161731 = GLOBAL.RSC316_1; finsi +si present(GLOBAL.RSC317_1) alors CORR.RSC3171731 = GLOBAL.RSC317_1; finsi +si present(GLOBAL.RSC318_1) alors CORR.RSC3181731 = GLOBAL.RSC318_1; finsi +si present(GLOBAL.RSC319_1) alors CORR.RSC3191731 = GLOBAL.RSC319_1; finsi +si present(GLOBAL.RSC320_1) alors CORR.RSC3201731 = GLOBAL.RSC320_1; finsi +si present(GLOBAL.RSC321_1) alors CORR.RSC3211731 = GLOBAL.RSC321_1; finsi +si present(GLOBAL.RSC322_1) alors CORR.RSC3221731 = GLOBAL.RSC322_1; finsi +si present(GLOBAL.RSC323_1) alors CORR.RSC3231731 = GLOBAL.RSC323_1; finsi +si present(GLOBAL.RSC324_1) alors CORR.RSC3241731 = GLOBAL.RSC324_1; finsi +si present(GLOBAL.RSC325_1) alors CORR.RSC3251731 = GLOBAL.RSC325_1; finsi +si present(GLOBAL.RSC326_1) alors CORR.RSC3261731 = GLOBAL.RSC326_1; finsi +si present(GLOBAL.RSC327_1) alors CORR.RSC3271731 = GLOBAL.RSC327_1; finsi +si present(GLOBAL.RSC328_1) alors CORR.RSC3281731 = GLOBAL.RSC328_1; finsi +si present(GLOBAL.RSC601_1) alors CORR.RSC6011731 = GLOBAL.RSC601_1; finsi +si present(GLOBAL.RSC602_1) alors CORR.RSC6021731 = GLOBAL.RSC602_1; finsi +si present(GLOBAL.RSC603_1) alors CORR.RSC6031731 = GLOBAL.RSC603_1; finsi +si present(GLOBAL.RSC604_1) alors CORR.RSC6041731 = GLOBAL.RSC604_1; finsi +si present(GLOBAL.RSC605_1) alors CORR.RSC6051731 = GLOBAL.RSC605_1; finsi +si present(GLOBAL.RSC606_1) alors CORR.RSC6061731 = GLOBAL.RSC606_1; finsi +si present(GLOBAL.RSC607_1) alors CORR.RSC6071731 = GLOBAL.RSC607_1; finsi +si present(GLOBAL.RSC608_1) alors CORR.RSC6081731 = GLOBAL.RSC608_1; finsi +si present(GLOBAL.RSC609_1) alors CORR.RSC6091731 = GLOBAL.RSC609_1; finsi +si present(GLOBAL.RSC610_1) alors CORR.RSC6101731 = GLOBAL.RSC610_1; finsi +si present(GLOBAL.RSC611_1) alors CORR.RSC6111731 = GLOBAL.RSC611_1; finsi +si present(GLOBAL.RSC612_1) alors CORR.RSC6121731 = GLOBAL.RSC612_1; finsi +si present(GLOBAL.RSC613_1) alors CORR.RSC6131731 = GLOBAL.RSC613_1; finsi +si present(GLOBAL.RSC614_1) alors CORR.RSC6141731 = GLOBAL.RSC614_1; finsi +si present(GLOBAL.RSC615_1) alors CORR.RSC6151731 = GLOBAL.RSC615_1; finsi +si present(GLOBAL.RSC616_1) alors CORR.RSC6161731 = GLOBAL.RSC616_1; finsi +si present(GLOBAL.RSC617_1) alors CORR.RSC6171731 = GLOBAL.RSC617_1; finsi +si present(GLOBAL.RSC618_1) alors CORR.RSC6181731 = GLOBAL.RSC618_1; finsi +si present(GLOBAL.RSC619_1) alors CORR.RSC6191731 = GLOBAL.RSC619_1; finsi +si present(GLOBAL.RSC620_1) alors CORR.RSC6201731 = GLOBAL.RSC620_1; finsi +si present(GLOBAL.RSC621_1) alors CORR.RSC6211731 = GLOBAL.RSC621_1; finsi +si present(GLOBAL.RSC622_1) alors CORR.RSC6221731 = GLOBAL.RSC622_1; finsi +si present(GLOBAL.RSC623_1) alors CORR.RSC6231731 = GLOBAL.RSC623_1; finsi +si present(GLOBAL.RSC624_1) alors CORR.RSC6241731 = GLOBAL.RSC624_1; finsi +si present(GLOBAL.RSC625_1) alors CORR.RSC6251731 = GLOBAL.RSC625_1; finsi +si present(GLOBAL.RSC626_1) alors CORR.RSC6261731 = GLOBAL.RSC626_1; finsi +si present(GLOBAL.RSC901_1) alors CORR.RSC9011731 = GLOBAL.RSC901_1; finsi +si present(GLOBAL.RSC902_1) alors CORR.RSC9021731 = GLOBAL.RSC902_1; finsi +si present(GLOBAL.RSC903_1) alors CORR.RSC9031731 = GLOBAL.RSC903_1; finsi +si present(GLOBAL.RSC904_1) alors CORR.RSC9041731 = GLOBAL.RSC904_1; finsi +si present(GLOBAL.RSC905_1) alors CORR.RSC9051731 = GLOBAL.RSC905_1; finsi +si present(GLOBAL.RSC906_1) alors CORR.RSC9061731 = GLOBAL.RSC906_1; finsi +si present(GLOBAL.RSC907_1) alors CORR.RSC9071731 = GLOBAL.RSC907_1; finsi +si present(GLOBAL.RSC908_1) alors CORR.RSC9081731 = GLOBAL.RSC908_1; finsi +si present(GLOBAL.RSC909_1) alors CORR.RSC9091731 = GLOBAL.RSC909_1; finsi +si present(GLOBAL.RSNBS_1) alors CORR.RSNBS1731 = GLOBAL.RSNBS_1; finsi +si present(GLOBAL.RSNBT_1) alors CORR.RSNBT1731 = GLOBAL.RSNBT_1; finsi +si present(GLOBAL.RSNBU_1) alors CORR.RSNBU1731 = GLOBAL.RSNBU_1; finsi +si present(GLOBAL.RSNCA_1) alors CORR.RSNCA1731 = GLOBAL.RSNCA_1; finsi +si present(GLOBAL.RSNCH_1) alors CORR.RSNCH1731 = GLOBAL.RSNCH_1; finsi +si present(GLOBAL.RSNCI_1) alors CORR.RSNCI1731 = GLOBAL.RSNCI_1; finsi +si present(GLOBAL.RSNCS_1) alors CORR.RSNCS1731 = GLOBAL.RSNCS_1; finsi +si present(GLOBAL.RSNCT_1) alors CORR.RSNCT1731 = GLOBAL.RSNCT_1; finsi +si present(GLOBAL.RSNCU_1) alors CORR.RSNCU1731 = GLOBAL.RSNCU_1; finsi +si present(GLOBAL.RSNCV_1) alors CORR.RSNCV1731 = GLOBAL.RSNCV_1; finsi +si present(GLOBAL.RSNCW_1) alors CORR.RSNCW1731 = GLOBAL.RSNCW_1; finsi +si present(GLOBAL.RSNCX_1) alors CORR.RSNCX1731 = GLOBAL.RSNCX_1; finsi +si present(GLOBAL.RSNDC_1) alors CORR.RSNDC1731 = GLOBAL.RSNDC_1; finsi +si present(GLOBAL.RSNGW_1) alors CORR.RSNGW1731 = GLOBAL.RSNGW_1; finsi +si present(GLOBAL.RSOC35_1) alors CORR.RSOC351731 = GLOBAL.RSOC35_1; finsi +si present(GLOBAL.RSOC36_1) alors CORR.RSOC361731 = GLOBAL.RSOC36_1; finsi +si present(GLOBAL.RSOC37_1) alors CORR.RSOC371731 = GLOBAL.RSOC37_1; finsi +si present(GLOBAL.RSOC38_1) alors CORR.RSOC381731 = GLOBAL.RSOC38_1; finsi +si present(GLOBAL.RSOC39_1) alors CORR.RSOC391731 = GLOBAL.RSOC39_1; finsi +si present(GLOBAL.RSOC40_1) alors CORR.RSOC401731 = GLOBAL.RSOC40_1; finsi +si present(GLOBAL.RSOC41_1) alors CORR.RSOC411731 = GLOBAL.RSOC41_1; finsi +si present(GLOBAL.RSOC42_1) alors CORR.RSOC421731 = GLOBAL.RSOC42_1; finsi +si present(GLOBAL.RSOC43_1) alors CORR.RSOC431731 = GLOBAL.RSOC43_1; finsi +si present(GLOBAL.RSOC44_1) alors CORR.RSOC441731 = GLOBAL.RSOC44_1; finsi +si present(GLOBAL.RSOC45_1) alors CORR.RSOC451731 = GLOBAL.RSOC45_1; finsi +si present(GLOBAL.RSOC46_1) alors CORR.RSOC461731 = GLOBAL.RSOC46_1; finsi +si present(GLOBAL.RSOC47_1) alors CORR.RSOC471731 = GLOBAL.RSOC47_1; finsi +si present(GLOBAL.RSOC48_1) alors CORR.RSOC481731 = GLOBAL.RSOC48_1; finsi +si present(GLOBAL.RSOC49_1) alors CORR.RSOC491731 = GLOBAL.RSOC49_1; finsi +si present(GLOBAL.RSOC50_1) alors CORR.RSOC501731 = GLOBAL.RSOC50_1; finsi +si present(GLOBAL.RSOC51_1) alors CORR.RSOC511731 = GLOBAL.RSOC51_1; finsi +si present(GLOBAL.RSOC52_1) alors CORR.RSOC521731 = GLOBAL.RSOC52_1; finsi +si present(GLOBAL.RSOC53_1) alors CORR.RSOC531731 = GLOBAL.RSOC53_1; finsi +si present(GLOBAL.RSOC54_1) alors CORR.RSOC541731 = GLOBAL.RSOC54_1; finsi +si present(GLOBAL.RSOCHYA_1) alors CORR.RSOCHYA1731 = GLOBAL.RSOCHYA_1; finsi +si present(GLOBAL.RSOCHYAR_1) alors CORR.RSOCHYAR1731 = GLOBAL.RSOCHYAR_1; finsi +si present(GLOBAL.RSOCHYB_1) alors CORR.RSOCHYB1731 = GLOBAL.RSOCHYB_1; finsi +si present(GLOBAL.RSOCHYBR_1) alors CORR.RSOCHYBR1731 = GLOBAL.RSOCHYBR_1; finsi +si present(GLOBAL.RSOCHYC_1) alors CORR.RSOCHYC1731 = GLOBAL.RSOCHYC_1; finsi +si present(GLOBAL.RSOCHYCR_1) alors CORR.RSOCHYCR1731 = GLOBAL.RSOCHYCR_1; finsi +si present(GLOBAL.RSOCHYD_1) alors CORR.RSOCHYD1731 = GLOBAL.RSOCHYD_1; finsi +si present(GLOBAL.RSOCHYDR_1) alors CORR.RSOCHYDR1731 = GLOBAL.RSOCHYDR_1; finsi +si present(GLOBAL.RSOCHYE_1) alors CORR.RSOCHYE1731 = GLOBAL.RSOCHYE_1; finsi +si present(GLOBAL.RSOCHYER_1) alors CORR.RSOCHYER1731 = GLOBAL.RSOCHYER_1; finsi +si present(GLOBAL.RSOCHYF_1) alors CORR.RSOCHYF1731 = GLOBAL.RSOCHYF_1; finsi +si present(GLOBAL.RSOCHYFR_1) alors CORR.RSOCHYFR1731 = GLOBAL.RSOCHYFR_1; finsi +si present(GLOBAL.RSOCHYG_1) alors CORR.RSOCHYG1731 = GLOBAL.RSOCHYG_1; finsi +si present(GLOBAL.RSOCHYGR_1) alors CORR.RSOCHYGR1731 = GLOBAL.RSOCHYGR_1; finsi +si present(GLOBAL.RSOCHYH_1) alors CORR.RSOCHYH1731 = GLOBAL.RSOCHYH_1; finsi +si present(GLOBAL.RSOCHYHR_1) alors CORR.RSOCHYHR1731 = GLOBAL.RSOCHYHR_1; finsi +si present(GLOBAL.RSOCREPR_1) alors CORR.RSOCREPR1731 = GLOBAL.RSOCREPR_1; finsi +si present(GLOBAL.RSOUFIP_1) alors CORR.RSOUFIP1731 = GLOBAL.RSOUFIP_1; finsi +si present(GLOBAL.RSURV_1) alors CORR.RSURV1731 = GLOBAL.RSURV_1; finsi +si present(GLOBAL.RTOUREPA_1) alors CORR.RTOUREPA1731 = GLOBAL.RTOUREPA_1; finsi +si present(GLOBAL.RTOURREP_1) alors CORR.RTOURREP1731 = GLOBAL.RTOURREP_1; finsi +si present(GLOBAL.SFDEFBANI470) alors CORR.SFDEFBANI4701731 = GLOBAL.SFDEFBANI470; finsi +si present(GLOBAL.SFDEFBANI) alors CORR.SFDEFBANI1731 = GLOBAL.SFDEFBANI; finsi +si present(GLOBAL.SFDEFBANIH470) alors CORR.SFDEFBANIH4701731 = GLOBAL.SFDEFBANIH470; finsi +si present(GLOBAL.SFDFANTPROV) alors CORR.SFDFANTPROV1731 = GLOBAL.SFDFANTPROV; finsi +si present(GLOBAL.SHBA) alors CORR.SHBA1731 = GLOBAL.SHBA; finsi +si present(GLOBAL.SOMBADF) alors CORR.SOMBADF1731 = GLOBAL.SOMBADF; finsi +si present(GLOBAL.SOMBICDF) alors CORR.SOMBICDF1731 = GLOBAL.SOMBICDF; finsi +si present(GLOBAL.SOMBNCDF) alors CORR.SOMBNCDF1731 = GLOBAL.SOMBNCDF; finsi +si present(GLOBAL.SOMDBIC) alors CORR.SOMDBIC1731 = GLOBAL.SOMDBIC; finsi +si present(GLOBAL.SOMDBNC) alors CORR.SOMDBNC1731 = GLOBAL.SOMDBNC; finsi +si present(GLOBAL.SOMDEFLOC) alors CORR.DEFLOC1731 = GLOBAL.SOMDEFLOC; finsi +si present(GLOBAL.SOMDLOC) alors CORR.SOMDLOC1731 = GLOBAL.SOMDLOC; finsi +si present(GLOBAL.SOMLOCDF) alors CORR.SOMLOCDF1731 = GLOBAL.SOMLOCDF; finsi +si present(GLOBAL.SOMMEBA) alors CORR.SOMMEBA1731 = GLOBAL.SOMMEBA; finsi +si present(GLOBAL.SOMMEBIC) alors CORR.SOMMEBIC1731 = GLOBAL.SOMMEBIC; finsi +si present(GLOBAL.SOMMEBNC) alors CORR.SOMMEBNC1731 = GLOBAL.SOMMEBNC; finsi +si present(GLOBAL.SOMMELOC) alors CORR.SOMMELOC1731 = GLOBAL.SOMMELOC; finsi +si present(GLOBAL.SOMMERCM) alors CORR.SOMMERCM1731 = GLOBAL.SOMMERCM; finsi +si present(GLOBAL.SOMMERF) alors CORR.SOMMERF1731 = GLOBAL.SOMMERF; finsi +si present(GLOBAL.SPENETPC) alors CORR.SPENETPC1731 = GLOBAL.SPENETPC; finsi +si present(GLOBAL.SPENETPP) alors CORR.SPENETPP1731 = GLOBAL.SPENETPP; finsi +si present(GLOBAL.SPENETPV) alors CORR.SPENETPV1731 = GLOBAL.SPENETPV; finsi +si present(GLOBAL.TDEFBANI) alors CORR.TDEFBANI1731 = GLOBAL.TDEFBANI; finsi +si present(GLOBAL.TDEFBNCNP) alors CORR.TDEFBNCNP1731 = GLOBAL.TDEFBNCNP; finsi +si present(GLOBAL.TDEFNPI) alors CORR.TDEFNPI1731 = GLOBAL.TDEFNPI; finsi +si present(GLOBAL.TDFANTPROV) alors CORR.TDFANTPROV1731 = GLOBAL.TDFANTPROV; finsi +si present(GLOBAL.TDFBICNPF) alors CORR.TDFBICNPF1731 = GLOBAL.TDFBICNPF; finsi +si present(GLOBAL.TDIDABNCNP1) alors CORR.TDIDABNCNP11731 = GLOBAL.TDIDABNCNP1; finsi +si present(GLOBAL.TFRD1) alors CORR.TFRD11731 = GLOBAL.TFRD1; finsi +si present(GLOBAL.TFRD2) alors CORR.TFRD21731 = GLOBAL.TFRD2; finsi +si present(GLOBAL.TFRD3) alors CORR.TFRD31731 = GLOBAL.TFRD3; finsi +si present(GLOBAL.TFRD4) alors CORR.TFRD41731 = GLOBAL.TFRD4; finsi +si present(GLOBAL.TFRDC) alors CORR.TFRDC1731 = GLOBAL.TFRDC; finsi +si present(GLOBAL.TFRDV) alors CORR.TFRDV1731 = GLOBAL.TFRDV; finsi +si present(GLOBAL.TOTALQUO) alors CORR.TOTALQUO1731 = GLOBAL.TOTALQUO; finsi +si present(GLOBAL.TSB1) alors CORR.TSB11731 = GLOBAL.TSB1; finsi +si present(GLOBAL.TSB2) alors CORR.TSB21731 = GLOBAL.TSB2; finsi +si present(GLOBAL.TSB3) alors CORR.TSB31731 = GLOBAL.TSB3; finsi +si present(GLOBAL.TSB4) alors CORR.TSB41731 = GLOBAL.TSB4; finsi +si present(GLOBAL.TSBC) alors CORR.TSBC1731 = GLOBAL.TSBC; finsi +si present(GLOBAL.TSBP) alors CORR.TSBP1731 = GLOBAL.TSBP; finsi +si present(GLOBAL.TSBV) alors CORR.TSBV1731 = GLOBAL.TSBV; finsi +si present(GLOBAL.TSHBA) alors CORR.TSHBA1731 = GLOBAL.TSHBA; finsi +si present(GLOBAL.TSPRC) alors CORR.TSPRC1731 = GLOBAL.TSPRC; finsi +si present(GLOBAL.TSPRP) alors CORR.TSPRP1731 = GLOBAL.TSPRP; finsi +si present(GLOBAL.TSPRT) alors CORR.TSPRT1731 = GLOBAL.TSPRT; finsi +si present(GLOBAL.TSPRV) alors CORR.TSPRV1731 = GLOBAL.TSPRV; finsi +si present(GLOBAL.TTSPRC) alors CORR.TTSPRC1731 = GLOBAL.TTSPRC; finsi +si present(GLOBAL.TTSPRP) alors CORR.TTSPRP1731 = GLOBAL.TTSPRP; finsi +si present(GLOBAL.TTSPRT) alors CORR.TTSPRT1731 = GLOBAL.TTSPRT; finsi +si present(GLOBAL.TTSPRV) alors CORR.TTSPRV1731 = GLOBAL.TTSPRV; finsi + diff --git a/m_ext/2023/commence_par_5.m b/m_ext/2023/commence_par_5.m new file mode 100644 index 000000000..5703666c8 --- /dev/null +++ b/m_ext/2023/commence_par_5.m @@ -0,0 +1,129 @@ +cible alias_commence_par_5: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 5UB) ou meme_variable(VAR, 5VB) ou meme_variable(VAR, 5TB) + ou meme_variable(VAR, 5UA) ou meme_variable(VAR, 5VA) ou meme_variable(VAR, 5TA) + ou meme_variable(VAR, 5UE) ou meme_variable(VAR, 5VE) ou meme_variable(VAR, 5TE) + ou meme_variable(VAR, 5IE) ou meme_variable(VAR, 5JE) ou meme_variable(VAR, 5HE) + ou meme_variable(VAR, 5IF) ou meme_variable(VAR, 5JF) ou meme_variable(VAR, 5HF) + ou meme_variable(VAR, 5IC) ou meme_variable(VAR, 5JC) ou meme_variable(VAR, 5HC) + ou meme_variable(VAR, 5IB) ou meme_variable(VAR, 5JB) ou meme_variable(VAR, 5HB) + ou meme_variable(VAR, 5IX) ou meme_variable(VAR, 5JX) ou meme_variable(VAR, 5HX) + ou meme_variable(VAR, 5ID) ou meme_variable(VAR, 5JD) ou meme_variable(VAR, 5HD) + ou meme_variable(VAR, 5IW) ou meme_variable(VAR, 5JW) ou meme_variable(VAR, 5HW) + ou meme_variable(VAR, 5IM) ou meme_variable(VAR, 5JM) ou meme_variable(VAR, 5HM) + ou meme_variable(VAR, 5LE) ou meme_variable(VAR, 5ME) ou meme_variable(VAR, 5KE) + ou meme_variable(VAR, 5OE) ou meme_variable(VAR, 5PE) ou meme_variable(VAR, 5NE) + ou meme_variable(VAR, 5OF) ou meme_variable(VAR, 5PF) ou meme_variable(VAR, 5NF) + ou meme_variable(VAR, 5LF) ou meme_variable(VAR, 5MF) ou meme_variable(VAR, 5KF) + ou meme_variable(VAR, 5LB) ou meme_variable(VAR, 5MB) ou meme_variable(VAR, 5KB) + ou meme_variable(VAR, 5LC) ou meme_variable(VAR, 5MC) ou meme_variable(VAR, 5KC) + ou meme_variable(VAR, 5OB) ou meme_variable(VAR, 5PB) ou meme_variable(VAR, 5NB) + ou meme_variable(VAR, 5LJ) ou meme_variable(VAR, 5MJ) ou meme_variable(VAR, 5KJ) + ou meme_variable(VAR, 5OC) ou meme_variable(VAR, 5PC) ou meme_variable(VAR, 5NC) + ou meme_variable(VAR, 5RD) ou meme_variable(VAR, 5SD) ou meme_variable(VAR, 5QD) + ou meme_variable(VAR, 5RF) ou meme_variable(VAR, 5SF) ou meme_variable(VAR, 5JG) + ou meme_variable(VAR, 5RG) ou meme_variable(VAR, 5SG) ou meme_variable(VAR, 5JJ) + ou meme_variable(VAR, 5RL) ou meme_variable(VAR, 5SW) ou meme_variable(VAR, 5SX) + ou meme_variable(VAR, 5SV) ou meme_variable(VAR, 5SL) ou meme_variable(VAR, 5QL) + ou meme_variable(VAR, 5RE) ou meme_variable(VAR, 5SE) ou meme_variable(VAR, 5QE) + ou meme_variable(VAR, 5RB) ou meme_variable(VAR, 5SB) ou meme_variable(VAR, 5QB) + ou meme_variable(VAR, 5LV) ou meme_variable(VAR, 5MV) ou meme_variable(VAR, 5KV) + ou meme_variable(VAR, 5LU) ou meme_variable(VAR, 5JU) ou meme_variable(VAR, 5LW) + ou meme_variable(VAR, 5MW) ou meme_variable(VAR, 5KW) ou meme_variable(VAR, 5MU) + ou meme_variable(VAR, 5LY) ou meme_variable(VAR, 5MY) ou meme_variable(VAR, 5KY) + ou meme_variable(VAR, 5JK) ou meme_variable(VAR, 5LK) ou meme_variable(VAR, 5HK) + ou meme_variable(VAR, 5KU) ou meme_variable(VAR, 5LZ) ou meme_variable(VAR, 5MZ) + ou meme_variable(VAR, 5KZ) ou meme_variable(VAR, 5IR) ou meme_variable(VAR, 5JR) + ou meme_variable(VAR, 5HR) ou meme_variable(VAR, 5IQ) ou meme_variable(VAR, 5IS) + ou meme_variable(VAR, 5JS) ou meme_variable(VAR, 5HS) ou meme_variable(VAR, 5IP) + ou meme_variable(VAR, 5JP) ou meme_variable(VAR, 5HP) ou meme_variable(VAR, 5JQ) + ou meme_variable(VAR, 5IV) ou meme_variable(VAR, 5JV) ou meme_variable(VAR, 5HV) + ou meme_variable(VAR, 5HQ) ou meme_variable(VAR, 5RC) ou meme_variable(VAR, 5SC) + ou meme_variable(VAR, 5QC) ou meme_variable(VAR, 5RM) ou meme_variable(VAR, 5QM) + ou meme_variable(VAR, 5AC) ou meme_variable(VAR, 5AD) ou meme_variable(VAR, 5AE) + ou meme_variable(VAR, 5AF) ou meme_variable(VAR, 5AG) ou meme_variable(VAR, 5AH) + ou meme_variable(VAR, 5AI) ou meme_variable(VAR, 5AK) ou meme_variable(VAR, 5AN) + ou meme_variable(VAR, 5AO) ou meme_variable(VAR, 5AP) ou meme_variable(VAR, 5AQ) + ou meme_variable(VAR, 5AT) ou meme_variable(VAR, 5AX) ou meme_variable(VAR, 5AY) + ou meme_variable(VAR, 5BC) ou meme_variable(VAR, 5BD) ou meme_variable(VAR, 5BE) + ou meme_variable(VAR, 5BF) ou meme_variable(VAR, 5BG) ou meme_variable(VAR, 5BH) + ou meme_variable(VAR, 5BI) ou meme_variable(VAR, 5BK) ou meme_variable(VAR, 5BN) + ou meme_variable(VAR, 5BO) ou meme_variable(VAR, 5BP) ou meme_variable(VAR, 5BQ) + ou meme_variable(VAR, 5BT) ou meme_variable(VAR, 5BX) ou meme_variable(VAR, 5BY) + ou meme_variable(VAR, 5CC) ou meme_variable(VAR, 5CD) ou meme_variable(VAR, 5CE) + ou meme_variable(VAR, 5CF) ou meme_variable(VAR, 5CG) ou meme_variable(VAR, 5CI) + ou meme_variable(VAR, 5CK) ou meme_variable(VAR, 5CM) ou meme_variable(VAR, 5CN) + ou meme_variable(VAR, 5CQ) ou meme_variable(VAR, 5CR) ou meme_variable(VAR, 5CT) + ou meme_variable(VAR, 5CU) ou meme_variable(VAR, 5CV) ou meme_variable(VAR, 5CX) + ou meme_variable(VAR, 5DB) ou meme_variable(VAR, 5DD) ou meme_variable(VAR, 5DF) + ou meme_variable(VAR, 5DK) ou meme_variable(VAR, 5DM) ou meme_variable(VAR, 5EA) + ou meme_variable(VAR, 5EB) ou meme_variable(VAR, 5ED) ou meme_variable(VAR, 5EF) + ou meme_variable(VAR, 5EI) ou meme_variable(VAR, 5EK) ou meme_variable(VAR, 5EM) + ou meme_variable(VAR, 5EU) ou meme_variable(VAR, 5EY) ou meme_variable(VAR, 5FA) + ou meme_variable(VAR, 5FB) ou meme_variable(VAR, 5FD) ou meme_variable(VAR, 5FF) + ou meme_variable(VAR, 5FK) ou meme_variable(VAR, 5FM) ou meme_variable(VAR, 5FY) + ou meme_variable(VAR, 5GY) ou meme_variable(VAR, 5HA) ou meme_variable(VAR, 5IA) + ou meme_variable(VAR, 5JA) ou meme_variable(VAR, 5LD) ou meme_variable(VAR, 5MD) + ou meme_variable(VAR, 5NW) ou meme_variable(VAR, 5OW) ou meme_variable(VAR, 5PW) + ou meme_variable(VAR, 5QA) ou meme_variable(VAR, 5QJ) ou meme_variable(VAR, 5QS) + ou meme_variable(VAR, 5QT) ou meme_variable(VAR, 5RA) ou meme_variable(VAR, 5RJ) + ou meme_variable(VAR, 5RS) ou meme_variable(VAR, 5RT) ou meme_variable(VAR, 5RZ) + ou meme_variable(VAR, 5SA) ou meme_variable(VAR, 5SJ) ou meme_variable(VAR, 5SS) + ou meme_variable(VAR, 5ST) ou meme_variable(VAR, 5SZ) ou meme_variable(VAR, 5TF) + ou meme_variable(VAR, 5TP) ou meme_variable(VAR, 5UF) ou meme_variable(VAR, 5UI) + ou meme_variable(VAR, 5UP) ou meme_variable(VAR, 5UR) ou meme_variable(VAR, 5UT) + ou meme_variable(VAR, 5UY) ou meme_variable(VAR, 5VF) ou meme_variable(VAR, 5VI) + ou meme_variable(VAR, 5VM) ou meme_variable(VAR, 5VP) ou meme_variable(VAR, 5VQ) + ou meme_variable(VAR, 5VR) ou meme_variable(VAR, 5VT) ou meme_variable(VAR, 5VV) + ou meme_variable(VAR, 5VY) ou meme_variable(VAR, 5WE) ou meme_variable(VAR, 5WI) + ou meme_variable(VAR, 5WM) ou meme_variable(VAR, 5WR) ou meme_variable(VAR, 5XA) + ou meme_variable(VAR, 5XB) ou meme_variable(VAR, 5XE) ou meme_variable(VAR, 5XH) + ou meme_variable(VAR, 5XI) ou meme_variable(VAR, 5XJ) ou meme_variable(VAR, 5XM) + ou meme_variable(VAR, 5XN) ou meme_variable(VAR, 5XO) ou meme_variable(VAR, 5XP) + ou meme_variable(VAR, 5XR) ou meme_variable(VAR, 5XS) ou meme_variable(VAR, 5XT) + ou meme_variable(VAR, 5XU) ou meme_variable(VAR, 5XY) ou meme_variable(VAR, 5YA) + ou meme_variable(VAR, 5YB) ou meme_variable(VAR, 5YE) ou meme_variable(VAR, 5YH) + ou meme_variable(VAR, 5YI) ou meme_variable(VAR, 5YJ) ou meme_variable(VAR, 5YM) + ou meme_variable(VAR, 5YN) ou meme_variable(VAR, 5YO) ou meme_variable(VAR, 5YP) + ou meme_variable(VAR, 5YR) ou meme_variable(VAR, 5YS) ou meme_variable(VAR, 5YT) + ou meme_variable(VAR, 5YU) ou meme_variable(VAR, 5YY) ou meme_variable(VAR, 5ZA) + ou meme_variable(VAR, 5ZB) ou meme_variable(VAR, 5ZH) ou meme_variable(VAR, 5ZI) + ou meme_variable(VAR, 5ZJ) ou meme_variable(VAR, 5ZM) ou meme_variable(VAR, 5ZN) + ou meme_variable(VAR, 5ZO) ou meme_variable(VAR, 5ZP) ou meme_variable(VAR, 5ZR) + ou meme_variable(VAR, 5ZS) ou meme_variable(VAR, 5ZT) ou meme_variable(VAR, 5ZU) + ou meme_variable(VAR, 5ZY) ou meme_variable(VAR, 5MT) ou meme_variable(VAR, 5LT) + ou meme_variable(VAR, 5KT) ou meme_variable(VAR, 5JT) ou meme_variable(VAR, 5IT) + ou meme_variable(VAR, 5HT) ou meme_variable(VAR, 5QQ) ou meme_variable(VAR, 5QP) + ou meme_variable(VAR, 5QO) ou meme_variable(VAR, 5QN) ou meme_variable(VAR, 5QG) + ou meme_variable(VAR, 5QF) ou meme_variable(VAR, 5RW) ou meme_variable(VAR, 5RR) + ou meme_variable(VAR, 5RQ) ou meme_variable(VAR, 5RP) ou meme_variable(VAR, 5RO) + ou meme_variable(VAR, 5RN) ou meme_variable(VAR, 5UC) ou meme_variable(VAR, 5VC) + ou meme_variable(VAR, 5TC) ou meme_variable(VAR, 5GJ) ou meme_variable(VAR, 5GA) + ou meme_variable(VAR, 5GI) ou meme_variable(VAR, 5GH) ou meme_variable(VAR, 5GG) + ou meme_variable(VAR, 5GF) ou meme_variable(VAR, 5GE) ou meme_variable(VAR, 5GD) + ou meme_variable(VAR, 5GC) ou meme_variable(VAR, 5GB) ou meme_variable(VAR, 5OY) + ou meme_variable(VAR, 5PY) ou meme_variable(VAR, 5NY) ou meme_variable(VAR, 5OJ) + ou meme_variable(VAR, 5OM) ou meme_variable(VAR, 5PM) ou meme_variable(VAR, 5NM) + ou meme_variable(VAR, 5PJ) ou meme_variable(VAR, 5NJ) ou meme_variable(VAR, 5OA) + ou meme_variable(VAR, 5PA) ou meme_variable(VAR, 5NA) ou meme_variable(VAR, 5LQ) + ou meme_variable(VAR, 5MQ) ou meme_variable(VAR, 5KQ) ou meme_variable(VAR, 5LR) + ou meme_variable(VAR, 5MR) ou meme_variable(VAR, 5KR) ou meme_variable(VAR, 5LN) + ou meme_variable(VAR, 5MN) ou meme_variable(VAR, 5KN) ou meme_variable(VAR, 5OG) + ou meme_variable(VAR, 5PG) ou meme_variable(VAR, 5NG) ou meme_variable(VAR, 5OD) + ou meme_variable(VAR, 5PD) ou meme_variable(VAR, 5ND) ou meme_variable(VAR, 5OQ) + ou meme_variable(VAR, 5PQ) ou meme_variable(VAR, 5NQ) ou meme_variable(VAR, 5IU) + ou meme_variable(VAR, 5OR) ou meme_variable(VAR, 5PR) ou meme_variable(VAR, 5NR) + ou meme_variable(VAR, 5ON) ou meme_variable(VAR, 5PN) ou meme_variable(VAR, 5NN) + ou meme_variable(VAR, 5OP) ou meme_variable(VAR, 5PP) ou meme_variable(VAR, 5NP) + ou meme_variable(VAR, 5OX) ou meme_variable(VAR, 5PX) ou meme_variable(VAR, 5NX) + ou meme_variable(VAR, 5OO) ou meme_variable(VAR, 5PO) ou meme_variable(VAR, 5NO) + ou meme_variable(VAR, 5LP) ou meme_variable(VAR, 5MP) ou meme_variable(VAR, 5KP) + ou meme_variable(VAR, 5LX) ou meme_variable(VAR, 5MX) ou meme_variable(VAR, 5KX) + ou meme_variable(VAR, 5LO) ou meme_variable(VAR, 5MO) ou meme_variable(VAR, 5KO) + ou meme_variable(VAR, 5NT) ou meme_variable(VAR, 5OT) ou meme_variable(VAR, 5SO) + ou meme_variable(VAR, 5IG) ou meme_variable(VAR, 5HG) ou meme_variable(VAR, 5IY) + ou meme_variable(VAR, 5JY) ou meme_variable(VAR, 5HY) ou meme_variable(VAR, 5UH) + ou meme_variable(VAR, 5VH) ou meme_variable(VAR, 5TH); + diff --git a/m_ext/2023/commence_par_7.m b/m_ext/2023/commence_par_7.m new file mode 100644 index 000000000..c60bfc817 --- /dev/null +++ b/m_ext/2023/commence_par_7.m @@ -0,0 +1,167 @@ +cible alias_commence_par_7: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 7DL) ou meme_variable(VAR, 7WT) ou meme_variable(VAR, 7WU) + ou meme_variable(VAR, 7WV) ou meme_variable(VAR, 7WW) ou meme_variable(VAR, 7YT) + ou meme_variable(VAR, 7YU) ou meme_variable(VAR, 7YV) ou meme_variable(VAR, 7YW) + ou meme_variable(VAR, 7GN) ou meme_variable(VAR, 7FN) ou meme_variable(VAR, 7AA) + ou meme_variable(VAR, 7AB) ou meme_variable(VAR, 7AD) ou meme_variable(VAR, 7AF) + ou meme_variable(VAR, 7AH) ou meme_variable(VAR, 7AI) ou meme_variable(VAR, 7AK) + ou meme_variable(VAR, 7AL) ou meme_variable(VAR, 7AM) ou meme_variable(VAR, 7AN) + ou meme_variable(VAR, 7AO) ou meme_variable(VAR, 7AP) ou meme_variable(VAR, 7AR) + ou meme_variable(VAR, 7AS) ou meme_variable(VAR, 7AT) ou meme_variable(VAR, 7AU) + ou meme_variable(VAR, 7AV) ou meme_variable(VAR, 7AW) ou meme_variable(VAR, 7AX) + ou meme_variable(VAR, 7AY) ou meme_variable(VAR, 7AZ) ou meme_variable(VAR, 7BA) + ou meme_variable(VAR, 7BB) ou meme_variable(VAR, 7BC) ou meme_variable(VAR, 7BD) + ou meme_variable(VAR, 7BE) ou meme_variable(VAR, 7BF) ou meme_variable(VAR, 7BG) + ou meme_variable(VAR, 7BH) ou meme_variable(VAR, 7BJ) ou meme_variable(VAR, 7BK) + ou meme_variable(VAR, 7BL) ou meme_variable(VAR, 7BM) ou meme_variable(VAR, 7BN) + ou meme_variable(VAR, 7BO) ou meme_variable(VAR, 7BP) ou meme_variable(VAR, 7BR) + ou meme_variable(VAR, 7BS) ou meme_variable(VAR, 7BT) ou meme_variable(VAR, 7BU) + ou meme_variable(VAR, 7BV) ou meme_variable(VAR, 7CA) ou meme_variable(VAR, 7CB) + ou meme_variable(VAR, 7CC) ou meme_variable(VAR, 7CF) ou meme_variable(VAR, 7CG) + ou meme_variable(VAR, 7CH) ou meme_variable(VAR, 7CI) ou meme_variable(VAR, 7CJ) + ou meme_variable(VAR, 7CK) ou meme_variable(VAR, 7CL) ou meme_variable(VAR, 7CM) + ou meme_variable(VAR, 7CN) ou meme_variable(VAR, 7CS) ou meme_variable(VAR, 7CT) + ou meme_variable(VAR, 7CU) ou meme_variable(VAR, 7CV) ou meme_variable(VAR, 7CW) + ou meme_variable(VAR, 7CX) ou meme_variable(VAR, 7CY) ou meme_variable(VAR, 7DA) + ou meme_variable(VAR, 7DC) ou meme_variable(VAR, 7DD) ou meme_variable(VAR, 7DE) + ou meme_variable(VAR, 7DF) ou meme_variable(VAR, 7DH) ou meme_variable(VAR, 7DJ) + ou meme_variable(VAR, 7DK) ou meme_variable(VAR, 7DM) ou meme_variable(VAR, 7DN) + ou meme_variable(VAR, 7DR) ou meme_variable(VAR, 7DY) ou meme_variable(VAR, 7EK) + ou meme_variable(VAR, 7EN) ou meme_variable(VAR, 7EY) ou meme_variable(VAR, 7FT) + ou meme_variable(VAR, 7FU) ou meme_variable(VAR, 7FW) ou meme_variable(VAR, 7FX) + ou meme_variable(VAR, 7FY) ou meme_variable(VAR, 7GH) ou meme_variable(VAR, 7GI) + ou meme_variable(VAR, 7GJ) ou meme_variable(VAR, 7GR) ou meme_variable(VAR, 7GS) + ou meme_variable(VAR, 7GU) ou meme_variable(VAR, 7GW) ou meme_variable(VAR, 7GX) + ou meme_variable(VAR, 7GY) ou meme_variable(VAR, 7HB) ou meme_variable(VAR, 7HD) + ou meme_variable(VAR, 7HE) ou meme_variable(VAR, 7HF) ou meme_variable(VAR, 7HG) + ou meme_variable(VAR, 7HH) ou meme_variable(VAR, 7HI) ou meme_variable(VAR, 7HL) + ou meme_variable(VAR, 7HM) ou meme_variable(VAR, 7HO) ou meme_variable(VAR, 7HP) + ou meme_variable(VAR, 7HQ) ou meme_variable(VAR, 7HR) ou meme_variable(VAR, 7HS) + ou meme_variable(VAR, 7HT) ou meme_variable(VAR, 7HU) ou meme_variable(VAR, 7HV) + ou meme_variable(VAR, 7HW) ou meme_variable(VAR, 7HX) ou meme_variable(VAR, 7HZ) + ou meme_variable(VAR, 7IK) ou meme_variable(VAR, 7IL) ou meme_variable(VAR, 7IR) + ou meme_variable(VAR, 7IS) ou meme_variable(VAR, 7IT) ou meme_variable(VAR, 7IU) + ou meme_variable(VAR, 7IV) ou meme_variable(VAR, 7IX) ou meme_variable(VAR, 7IY) + ou meme_variable(VAR, 7IZ) ou meme_variable(VAR, 7JA) ou meme_variable(VAR, 7JB) + ou meme_variable(VAR, 7JC) ou meme_variable(VAR, 7JD) ou meme_variable(VAR, 7JE) + ou meme_variable(VAR, 7JF) ou meme_variable(VAR, 7JG) ou meme_variable(VAR, 7JH) + ou meme_variable(VAR, 7JI) ou meme_variable(VAR, 7JJ) ou meme_variable(VAR, 7JK) + ou meme_variable(VAR, 7JL) ou meme_variable(VAR, 7JM) ou meme_variable(VAR, 7JN) + ou meme_variable(VAR, 7JO) ou meme_variable(VAR, 7JP) ou meme_variable(VAR, 7JQ) + ou meme_variable(VAR, 7JR) ou meme_variable(VAR, 7JS) ou meme_variable(VAR, 7JT) + ou meme_variable(VAR, 7JU) ou meme_variable(VAR, 7JV) ou meme_variable(VAR, 7JW) + ou meme_variable(VAR, 7JX) ou meme_variable(VAR, 7JY) ou meme_variable(VAR, 7JZ) + ou meme_variable(VAR, 7KC) ou meme_variable(VAR, 7KD) ou meme_variable(VAR, 7KE) + ou meme_variable(VAR, 7KF) ou meme_variable(VAR, 7KG) ou meme_variable(VAR, 7KH) + ou meme_variable(VAR, 7KI) ou meme_variable(VAR, 7KJ) ou meme_variable(VAR, 7KL) + ou meme_variable(VAR, 7KM) ou meme_variable(VAR, 7KN) ou meme_variable(VAR, 7KO) + ou meme_variable(VAR, 7KQ) ou meme_variable(VAR, 7KR) ou meme_variable(VAR, 7KS) + ou meme_variable(VAR, 7KT) ou meme_variable(VAR, 7KU) ou meme_variable(VAR, 7KV) + ou meme_variable(VAR, 7KW) ou meme_variable(VAR, 7KY) ou meme_variable(VAR, 7KZ) + ou meme_variable(VAR, 7LA) ou meme_variable(VAR, 7LB) ou meme_variable(VAR, 7LC) + ou meme_variable(VAR, 7LG) ou meme_variable(VAR, 7LH) ou meme_variable(VAR, 7LI) + ou meme_variable(VAR, 7LJ) ou meme_variable(VAR, 7LK) ou meme_variable(VAR, 7LL) + ou meme_variable(VAR, 7LM) ou meme_variable(VAR, 7LO) ou meme_variable(VAR, 7LP) + ou meme_variable(VAR, 7LY) ou meme_variable(VAR, 7MA) ou meme_variable(VAR, 7MB) + ou meme_variable(VAR, 7MC) ou meme_variable(VAR, 7MD) ou meme_variable(VAR, 7MI) + ou meme_variable(VAR, 7MJ) ou meme_variable(VAR, 7MK) ou meme_variable(VAR, 7ML) + ou meme_variable(VAR, 7MM) ou meme_variable(VAR, 7MN) ou meme_variable(VAR, 7MO) + ou meme_variable(VAR, 7MP) ou meme_variable(VAR, 7MQ) ou meme_variable(VAR, 7MR) + ou meme_variable(VAR, 7MS) ou meme_variable(VAR, 7MT) ou meme_variable(VAR, 7MU) + ou meme_variable(VAR, 7MV) ou meme_variable(VAR, 7MW) ou meme_variable(VAR, 7MX) + ou meme_variable(VAR, 7MY) ou meme_variable(VAR, 7MZ) ou meme_variable(VAR, 7NE) + ou meme_variable(VAR, 7NF) ou meme_variable(VAR, 7NG) ou meme_variable(VAR, 7NH) + ou meme_variable(VAR, 7NI) ou meme_variable(VAR, 7NJ) ou meme_variable(VAR, 7NK) + ou meme_variable(VAR, 7NL) ou meme_variable(VAR, 7NM) ou meme_variable(VAR, 7NN) + ou meme_variable(VAR, 7NO) ou meme_variable(VAR, 7NP) ou meme_variable(VAR, 7NQ) + ou meme_variable(VAR, 7NR) ou meme_variable(VAR, 7NS) ou meme_variable(VAR, 7NT) + ou meme_variable(VAR, 7NU) ou meme_variable(VAR, 7NV) ou meme_variable(VAR, 7NX) + ou meme_variable(VAR, 7NY) ou meme_variable(VAR, 7OA) ou meme_variable(VAR, 7OB) + ou meme_variable(VAR, 7OC) ou meme_variable(VAR, 7OD) ou meme_variable(VAR, 7OE) + ou meme_variable(VAR, 7OK) ou meme_variable(VAR, 7OL) ou meme_variable(VAR, 7OM) + ou meme_variable(VAR, 7ON) ou meme_variable(VAR, 7OO) ou meme_variable(VAR, 7OP) + ou meme_variable(VAR, 7OQ) ou meme_variable(VAR, 7OR) ou meme_variable(VAR, 7OS) + ou meme_variable(VAR, 7OT) ou meme_variable(VAR, 7OX) ou meme_variable(VAR, 7OY) + ou meme_variable(VAR, 7OZ) ou meme_variable(VAR, 7PC) ou meme_variable(VAR, 7PD) + ou meme_variable(VAR, 7PE) ou meme_variable(VAR, 7PF) ou meme_variable(VAR, 7PG) + ou meme_variable(VAR, 7PI) ou meme_variable(VAR, 7PJ) ou meme_variable(VAR, 7PK) + ou meme_variable(VAR, 7PL) ou meme_variable(VAR, 7PM) ou meme_variable(VAR, 7PN) + ou meme_variable(VAR, 7PU) ou meme_variable(VAR, 7PV) ou meme_variable(VAR, 7PW) + ou meme_variable(VAR, 7PX) ou meme_variable(VAR, 7PY) ou meme_variable(VAR, 7PZ) + ou meme_variable(VAR, 7QA) ou meme_variable(VAR, 7QB) ou meme_variable(VAR, 7QC) + ou meme_variable(VAR, 7QD) ou meme_variable(VAR, 7QE) ou meme_variable(VAR, 7QF) + ou meme_variable(VAR, 7QH) ou meme_variable(VAR, 7QI) ou meme_variable(VAR, 7QJ) + ou meme_variable(VAR, 7QK) ou meme_variable(VAR, 7QL) ou meme_variable(VAR, 7QM) + ou meme_variable(VAR, 7QN) ou meme_variable(VAR, 7QO) ou meme_variable(VAR, 7QP) + ou meme_variable(VAR, 7QQ) ou meme_variable(VAR, 7QR) ou meme_variable(VAR, 7QS) + ou meme_variable(VAR, 7QT) ou meme_variable(VAR, 7QU) ou meme_variable(VAR, 7QV) + ou meme_variable(VAR, 7QW) ou meme_variable(VAR, 7QX) ou meme_variable(VAR, 7QY) + ou meme_variable(VAR, 7RB) ou meme_variable(VAR, 7RD) ou meme_variable(VAR, 7RE) + ou meme_variable(VAR, 7RF) ou meme_variable(VAR, 7RG) ou meme_variable(VAR, 7RH) + ou meme_variable(VAR, 7RI) ou meme_variable(VAR, 7RJ) ou meme_variable(VAR, 7RK) + ou meme_variable(VAR, 7RL) ou meme_variable(VAR, 7RM) ou meme_variable(VAR, 7RN) + ou meme_variable(VAR, 7RP) ou meme_variable(VAR, 7RQ) ou meme_variable(VAR, 7RR) + ou meme_variable(VAR, 7RS) ou meme_variable(VAR, 7RT) ou meme_variable(VAR, 7RU) + ou meme_variable(VAR, 7RV) ou meme_variable(VAR, 7RW) ou meme_variable(VAR, 7SA) + ou meme_variable(VAR, 7SB) ou meme_variable(VAR, 7SC) ou meme_variable(VAR, 7SM) + ou meme_variable(VAR, 7SN) ou meme_variable(VAR, 7SO) ou meme_variable(VAR, 7SP) + ou meme_variable(VAR, 7SS) ou meme_variable(VAR, 7ST) ou meme_variable(VAR, 7SU) + ou meme_variable(VAR, 7SV) ou meme_variable(VAR, 7SW) ou meme_variable(VAR, 7TA) + ou meme_variable(VAR, 7TB) ou meme_variable(VAR, 7TE) ou meme_variable(VAR, 7TF) + ou meme_variable(VAR, 7TH) ou meme_variable(VAR, 7TI) ou meme_variable(VAR, 7TM) + ou meme_variable(VAR, 7TO) ou meme_variable(VAR, 7TP) ou meme_variable(VAR, 7TQ) + ou meme_variable(VAR, 7TR) ou meme_variable(VAR, 7TS) ou meme_variable(VAR, 7TT) + ou meme_variable(VAR, 7TU) ou meme_variable(VAR, 7TV) ou meme_variable(VAR, 7TW) + ou meme_variable(VAR, 7TX) ou meme_variable(VAR, 7TY) ou meme_variable(VAR, 7UH) + ou meme_variable(VAR, 7UJ) ou meme_variable(VAR, 7UU) ou meme_variable(VAR, 7UV) + ou meme_variable(VAR, 7UW) ou meme_variable(VAR, 7UX) ou meme_variable(VAR, 7UY) + ou meme_variable(VAR, 7UZ) ou meme_variable(VAR, 7VD) ou meme_variable(VAR, 7VE) + ou meme_variable(VAR, 7VF) ou meme_variable(VAR, 7VG) ou meme_variable(VAR, 7VH) + ou meme_variable(VAR, 7VI) ou meme_variable(VAR, 7VM) ou meme_variable(VAR, 7VN) + ou meme_variable(VAR, 7VQ) ou meme_variable(VAR, 7VR) ou meme_variable(VAR, 7VS) + ou meme_variable(VAR, 7VU) ou meme_variable(VAR, 7WA) ou meme_variable(VAR, 7WB) + ou meme_variable(VAR, 7WC) ou meme_variable(VAR, 7WD) ou meme_variable(VAR, 7WE) + ou meme_variable(VAR, 7WF) ou meme_variable(VAR, 7WG) ou meme_variable(VAR, 7WH) + ou meme_variable(VAR, 7WI) ou meme_variable(VAR, 7WK) ou meme_variable(VAR, 7WQ) + ou meme_variable(VAR, 7WS) ou meme_variable(VAR, 7WX) ou meme_variable(VAR, 7WY) + ou meme_variable(VAR, 7WZ) ou meme_variable(VAR, 7XG) ou meme_variable(VAR, 7XH) + ou meme_variable(VAR, 7XI) ou meme_variable(VAR, 7XJ) ou meme_variable(VAR, 7XK) + ou meme_variable(VAR, 7XO) ou meme_variable(VAR, 7XP) ou meme_variable(VAR, 7XQ) + ou meme_variable(VAR, 7XR) ou meme_variable(VAR, 7XV) ou meme_variable(VAR, 7XX) + ou meme_variable(VAR, 7XZ) ou meme_variable(VAR, 7YB) ou meme_variable(VAR, 7YD) + ou meme_variable(VAR, 7YE) ou meme_variable(VAR, 7YF) ou meme_variable(VAR, 7YI) + ou meme_variable(VAR, 7YJ) ou meme_variable(VAR, 7YK) ou meme_variable(VAR, 7YL) + ou meme_variable(VAR, 7YX) ou meme_variable(VAR, 7YY) ou meme_variable(VAR, 7YZ) + ou meme_variable(VAR, 7ZA) ou meme_variable(VAR, 7ZB) ou meme_variable(VAR, 7ZC) + ou meme_variable(VAR, 7ZD) ou meme_variable(VAR, 7ZE) ou meme_variable(VAR, 7ZF) + ou meme_variable(VAR, 7ZG) ou meme_variable(VAR, 7ZH) ou meme_variable(VAR, 7ZI) + ou meme_variable(VAR, 7ZJ) ou meme_variable(VAR, 7ZK) ou meme_variable(VAR, 7ZL) + ou meme_variable(VAR, 7ZM) ou meme_variable(VAR, 7ZN) ou meme_variable(VAR, 7ZQ) + ou meme_variable(VAR, 7ZR) ou meme_variable(VAR, 7ZS) ou meme_variable(VAR, 7ZT) + ou meme_variable(VAR, 7ZU) ou meme_variable(VAR, 7ZV) ou meme_variable(VAR, 7ZW) + ou meme_variable(VAR, 7ZX) ou meme_variable(VAR, 7ZY) ou meme_variable(VAR, 7ZZ) + ou meme_variable(VAR, 7UL) ou meme_variable(VAR, 7DB) ou meme_variable(VAR, 7VC) + ou meme_variable(VAR, 7VA) ou meme_variable(VAR, 7FR) ou meme_variable(VAR, 7FV) + ou meme_variable(VAR, 7GQ) ou meme_variable(VAR, 7FQ) ou meme_variable(VAR, 7FM) + ou meme_variable(VAR, 7FL) ou meme_variable(VAR, 7UC) ou meme_variable(VAR, 7DG) + ou meme_variable(VAR, 7UM) ou meme_variable(VAR, 7II) ou meme_variable(VAR, 7FG) + ou meme_variable(VAR, 7CZ) ou meme_variable(VAR, 7EZ) ou meme_variable(VAR, 7RZ) + ou meme_variable(VAR, 7TZ) ou meme_variable(VAR, 7DQ) ou meme_variable(VAR, 7WN) + ou meme_variable(VAR, 7WO) ou meme_variable(VAR, 7CE) ou meme_variable(VAR, 7FF) + ou meme_variable(VAR, 7UF) ou meme_variable(VAR, 7EC) ou meme_variable(VAR, 7ED) + ou meme_variable(VAR, 7EA) ou meme_variable(VAR, 7EB) ou meme_variable(VAR, 7EF) + ou meme_variable(VAR, 7EG) ou meme_variable(VAR, 7WJ) ou meme_variable(VAR, 7UN) + ou meme_variable(VAR, 7UP) ou meme_variable(VAR, 7GA) ou meme_variable(VAR, 7GE) + ou meme_variable(VAR, 7GB) ou meme_variable(VAR, 7GF) ou meme_variable(VAR, 7GC) + ou meme_variable(VAR, 7GG) ou meme_variable(VAR, 7GD) ou meme_variable(VAR, 7GM) + ou meme_variable(VAR, 7US) ou meme_variable(VAR, 7WP) ou meme_variable(VAR, 7UD) + ou meme_variable(VAR, 7GZ) ou meme_variable(VAR, 7AE) ou meme_variable(VAR, 7AG) + ou meme_variable(VAR, 7AC) ou meme_variable(VAR, 7WL) ou meme_variable(VAR, 7XS) + ou meme_variable(VAR, 7XT) ou meme_variable(VAR, 7XU) ou meme_variable(VAR, 7XW) + ou meme_variable(VAR, 7XY) ou meme_variable(VAR, 7NZ) ou meme_variable(VAR, 7WR) + ou meme_variable(VAR, 7FH) ou meme_variable(VAR, 7CD) ou meme_variable(VAR, 7UT) + ou meme_variable(VAR, 7WM); + diff --git a/m_ext/2023/commence_par_H.m b/m_ext/2023/commence_par_H.m new file mode 100644 index 000000000..d85948b0a --- /dev/null +++ b/m_ext/2023/commence_par_H.m @@ -0,0 +1,43 @@ +cible alias_commence_par_H: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, HEN) ou meme_variable(VAR, HEO) ou meme_variable(VAR, HEP) + ou meme_variable(VAR, HER) ou meme_variable(VAR, HES) ou meme_variable(VAR, HET) + ou meme_variable(VAR, HEU) ou meme_variable(VAR, HEW) ou meme_variable(VAR, HFN) + ou meme_variable(VAR, HFO) ou meme_variable(VAR, HFP) ou meme_variable(VAR, HFR) + ou meme_variable(VAR, HFS) ou meme_variable(VAR, HFT) ou meme_variable(VAR, HFU) + ou meme_variable(VAR, HFW) ou meme_variable(VAR, HGS) ou meme_variable(VAR, HGT) + ou meme_variable(VAR, HGU) ou meme_variable(VAR, HGW) ou meme_variable(VAR, HHS) + ou meme_variable(VAR, HHT) ou meme_variable(VAR, HHU) ou meme_variable(VAR, HHW) + ou meme_variable(VAR, HIC) ou meme_variable(VAR, HIS) ou meme_variable(VAR, HIT) + ou meme_variable(VAR, HIU) ou meme_variable(VAR, HIW) ou meme_variable(VAR, HJA) + ou meme_variable(VAR, HJC) ou meme_variable(VAR, HJS) ou meme_variable(VAR, HJT) + ou meme_variable(VAR, HJU) ou meme_variable(VAR, HJV) ou meme_variable(VAR, HJW) + ou meme_variable(VAR, HKC) ou meme_variable(VAR, HOD) ou meme_variable(VAR, HOE) + ou meme_variable(VAR, HOF) ou meme_variable(VAR, HOG) ou meme_variable(VAR, HOX) + ou meme_variable(VAR, HOY) ou meme_variable(VAR, HOZ) ou meme_variable(VAR, HUA) + ou meme_variable(VAR, HUB) ou meme_variable(VAR, HUC) ou meme_variable(VAR, HUD) + ou meme_variable(VAR, HUE) ou meme_variable(VAR, HUF) ou meme_variable(VAR, HUG) + ou meme_variable(VAR, HUH) ou meme_variable(VAR, HUI) ou meme_variable(VAR, HUJ) + ou meme_variable(VAR, HUK) ou meme_variable(VAR, HUL) ou meme_variable(VAR, HUM) + ou meme_variable(VAR, HUN) ou meme_variable(VAR, HUO) ou meme_variable(VAR, HUP) + ou meme_variable(VAR, HUQ) ou meme_variable(VAR, HUR) ou meme_variable(VAR, HUS) + ou meme_variable(VAR, HUT) ou meme_variable(VAR, HUU) ou meme_variable(VAR, HVA) + ou meme_variable(VAR, HVB) ou meme_variable(VAR, HVC) ou meme_variable(VAR, HVD) + ou meme_variable(VAR, HVE) ou meme_variable(VAR, HVF) ou meme_variable(VAR, HVG) + ou meme_variable(VAR, HVH) ou meme_variable(VAR, HVI) ou meme_variable(VAR, HVJ) + ou meme_variable(VAR, HVK) ou meme_variable(VAR, HVL) ou meme_variable(VAR, HVM) + ou meme_variable(VAR, HYA) ou meme_variable(VAR, HYB) ou meme_variable(VAR, HYC) + ou meme_variable(VAR, HYD) ou meme_variable(VAR, HYE) ou meme_variable(VAR, HYF) + ou meme_variable(VAR, HYG) ou meme_variable(VAR, HYH) ou meme_variable(VAR, HQL) + ou meme_variable(VAR, HQT) ou meme_variable(VAR, HQC) ou meme_variable(VAR, HQM) + ou meme_variable(VAR, HQB) ou meme_variable(VAR, HQD) ou meme_variable(VAR, HOA) + ou meme_variable(VAR, HOB) ou meme_variable(VAR, HOC) ou meme_variable(VAR, HOH) + ou meme_variable(VAR, HOI) ou meme_variable(VAR, HOJ) ou meme_variable(VAR, HOK) + ou meme_variable(VAR, HOL) ou meme_variable(VAR, HOM) ou meme_variable(VAR, HON) + ou meme_variable(VAR, HOO) ou meme_variable(VAR, HOP) ou meme_variable(VAR, HOQ) + ou meme_variable(VAR, HOR) ou meme_variable(VAR, HOS) ou meme_variable(VAR, HOT) + ou meme_variable(VAR, HOU) ou meme_variable(VAR, HOV) ou meme_variable(VAR, HOW) + ou meme_variable(VAR, HQA); + diff --git a/m_ext/2023/correctif.m b/m_ext/2023/correctif.m new file mode 100644 index 000000000..2d14c024c --- /dev/null +++ b/m_ext/2023/correctif.m @@ -0,0 +1,7006 @@ +# correctif + +MAX_ID_EVT: calculee primrest = 0 : "" ; + +TMP_ARG1 : calculee primrest = 0 : "" ; +TMP_ARG2 : calculee primrest = 0 : "" ; +TMP_ARG3 : calculee primrest = 0 : "" ; +TMP_ARG4 : calculee primrest = 0 : "" ; +TMP_ARG5 : calculee primrest = 0 : "" ; +TMP_ARG6 : calculee primrest = 0 : "" ; +TMP_ARG7 : calculee primrest = 0 : "" ; +TMP_ARG8 : calculee primrest = 0 : "" ; +TMP_ARG9 : calculee primrest = 0 : "" ; +TMP_RES : calculee primrest = 0 : "" ; +TMP_RES1 : calculee primrest = 0 : "" ; +TMP_RES2 : calculee primrest = 0 : "" ; +TMP_RES3 : calculee primrest = 0 : "" ; +TMP_RES4 : calculee primrest = 0 : "" ; + +N_INDEFINIE : const = 0; +N_REVENU : const = 1; +N_CHARGE : const = 2; + +SENS_R : const = 0; +SENS_M : const = 1; +SENS_P : const = 2; +SENS_C : const = 3; + +SF_INVALIDE : const = 0; +SF_MARIAGE : const = 1; +SF_CELIBAT : const = 2; +SF_DIVORCE : const = 3; +SF_PACSE : const = 4; +SF_VEUVAGE_TRUE : const = 5; +SF_VEUVAGE_FALSE : const = 6; + +TL_TL_ACQUISE : const = 0; +TL_TL_DEFAUT_2042 : const = 1; +TL_TL_MAUVAISE_FOI : const = 2; + +MAJ_TL : const = 0; +MAJ_NON_TL : const = 1; +MAJ_TL15 : const = 2; +MAJ_NON_TL15 : const = 3; +MAJ_RAPPEL_C : const = 4; +MAJ_RAPPEL_CP : const = 5; +MAJ_RAPPEL_CP01 : const = 6; +MAJ_RAPPEL_CP22 : const = 7; +MAJ_RAPPEL_CP24 : const = 8; +MAJ_RAPPEL_F : const = 9; +MAJ_RAPPEL_NF : const = 10; +MAJ_RAPPEL_M : const = 11; +MAJ_RAPPEL_MF : const = 12; +MAJ_RAPPEL_NON_M : const = 13; +MAJ_RAPPEL_P : const = 14; +MAJ_RAPPEL_R : const = 15; +MAJ_RAPPEL_R55 : const = 16; +MAJ_1728 : const = 17; +MAJ_ABAT_20 : const = 18; +MAJ_CODE_1729_2A5 : const = 19; +MAJ_CODE_1729_6 : const = 20; +MAJ_CODE_22 : const = 21; +MAJ_CODE_24 : const = 22; +MAJ_CONTEXTE_22 : const = 23; +MAJ_MENTION_EXP_99 : const = 24; +MAJ_MENTION_EXP_99R : const = 25; +MAJ_NON_MENTION_EXP : const = 26; + +INR_FLAG_INR_NON_TL : const = 2; +INR_FLAG_INR_TL : const = 3; + +ID_SANS_TRAITEMENT : const = 0; +ID_CUMULE_CHAMP_BASE_TL : const = 1; +ID_CUMULE_BASE_TL_INIT : const = 2; +ID_CUMULE_CHAMP_BASE_TL_RECT : const = 3; +ID_TRAITE_MAJO_P : const = 4; + + +cible init_variables: +application: iliad; +GLOBAL.ANNEE_REVENU = GLOBAL.V_ANREV; +GLOBAL.NB_STRATES = 26; +GLOBAL.MAX_ID_EVT = -2; +# Données globales +GLOBAL.PRESENT_8VV = 0; +GLOBAL.PRESENT_8VW = 0; +GLOBAL.PRESENT_9YT = 0; +GLOBAL.MONTANT_9YT = 0; +GLOBAL.PENALITE_9YT = 0; +GLOBAL.SENS_9YT = SENS_R; +GLOBAL.NUM_EVT_9YT = 0; +GLOBAL.IND_20_9YT = 0; +GLOBAL.BASE_TL_9YT = 0; +GLOBAL.PRESENT_9YU = 0; +GLOBAL.MONTANT_9YU = 0; +GLOBAL.PENALITE_9YU = 0; +GLOBAL.SENS_9YU = SENS_R; +GLOBAL.NUM_EVT_9YU = 0; +GLOBAL.DATE_9YU = 0; +GLOBAL.PRESENT_9XT = 0; +GLOBAL.MONTANT_9XT = 0; +GLOBAL.PENALITE_9XT = 0; +GLOBAL.SENS_9XT = SENS_R; +GLOBAL.NUM_EVT_9XT = 0; +GLOBAL.IND_20_9XT = 0; +GLOBAL.BASE_TL_9XT = 0; +GLOBAL.PRESENT_9XU = 0; +GLOBAL.MONTANT_9XU = 0; +GLOBAL.PENALITE_9XU = 0; +GLOBAL.SENS_9XU = SENS_R; +GLOBAL.NUM_EVT_9XU = 0; +GLOBAL.DATE_9XU = 0; +GLOBAL.PRESENT_REGCO = 0; +GLOBAL.PENALITE_REGCO = 0; +GLOBAL.NUM_EVT_REGCO = 0; +GLOBAL.NUM_RAP_REGCO = 0; +GLOBAL.IND_20_REGCO = 0; +GLOBAL.PREMIER_EVT = 0; +GLOBAL.CODE_9ZA = 0; +GLOBAL.SAUVE_INR_R99 = 0; +GLOBAL.ANNEE_DECES_CONJOINT = 0; +GLOBAL.NB_RAPPELS_RES = 0; +# sommes inr 2 +GLOBAL.INR_SOMMEBAND_2 = 0; +GLOBAL.INR_SOMMEBA_2 = 0; +GLOBAL.INR_SOMMEBICND_2 = 0; +GLOBAL.INR_SOMMEBIC_2 = 0; +GLOBAL.INR_SOMMEBNCND_2 = 0; +GLOBAL.INR_SOMMEBNC_2 = 0; +GLOBAL.INR_SOMMEGLOBAL_2 = 0; +GLOBAL.INR_SOMMEGLOBND_2 = 0; +GLOBAL.INR_SOMMELOC_2 = 0; +GLOBAL.INR_SOMMEMOND_2 = 0; +GLOBAL.INR_SOMMERCM_2 = 0; +GLOBAL.INR_SOMMERF_2 = 0; +GLOBAL.INR_SOMMERI_2 = 0; +# Données de Reference +GLOBAL.D2042_NB = 0; +GLOBAL.DEFAUT = 0; +GLOBAL.DEFAUT10 = 0; +GLOBAL.DEFAUT11 = 0; +GLOBAL.DEFAUT1011 = 0; +GLOBAL.RETARD = 0; +GLOBAL.RETARD07 = 0; +GLOBAL.RETARD08 = 0; +GLOBAL.RETARD0718 = 0; +GLOBAL.RETARD101718 = 0; +GLOBAL.RETARD22 = 0; +GLOBAL.RETARD99 = 0; +GLOBAL.RECTIF = 0; +GLOBAL.RECTIF_MAJO = 0; +GLOBAL.MENTION_EXP = 0; +GLOBAL.CORR_RJLJ = 0; +GLOBAL.CODE_PENA = 0; +GLOBAL.CODE_PENA_ISF = 0; +GLOBAL.DATE = 0; +GLOBAL.SF_INITIALE = SF_INVALIDE; +GLOBAL.SF_COURANTE = SF_INVALIDE; +GLOBAL.SF_PRIMITIF = 0; +GLOBAL.R_TARDIF = 0; +GLOBAL.LIMELIGHT = 0; +GLOBAL.ISF_PRIM = 0; +GLOBAL.PRESENT_R10 = 0; +GLOBAL.PRESENT_R30 = 0; +GLOBAL.PRESENT_R32 = 0; +GLOBAL.PREM_8_11 = 0; +GLOBAL.PENA_994 = 0; +GLOBAL.FLAGMENC = 0; +# tl +GLOBAL.TL_D2042_NB = 0; +GLOBAL.TL_D2042_INIT_NB = 0; +GLOBAL.TL_D2042_RECT_NB = 0; +GLOBAL.TL_BASE_TL = 0; +GLOBAL.TL_BASE_TL_INIT = 0; +GLOBAL.TL_BASE_TL_RECT = 0; +GLOBAL.TL_BASE_TL_TBTC = 0; +GLOBAL.TL_BASE_TL_TBTC_INIT = 0; +GLOBAL.TL_BASE_TL_TBTC_RECT = 0; +GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +# tl mauvaise foi +GLOBAL.TL_MF_MFCDIS = 0; +GLOBAL.TL_MF_MFCHR = 0; +GLOBAL.TL_MF_MFCHR7 = 0; +GLOBAL.TL_MF_MFCS = 0; +GLOBAL.TL_MF_MFCSAL = 0; +GLOBAL.TL_MF_MFCVN = 0; +GLOBAL.TL_MF_MFGAIN = 0; +GLOBAL.TL_MF_MFGLO = 0; +GLOBAL.TL_MF_MFIFI = 0; +GLOBAL.TL_MF_MFIR = 0; +GLOBAL.TL_MF_MFLOY = 0; +GLOBAL.TL_MF_MFMCSG820 = 0; +GLOBAL.TL_MF_MFPCAP = 0; +GLOBAL.TL_MF_MFPS = 0; +GLOBAL.TL_MF_MFPSOL = 0; +GLOBAL.TL_MF_MFRD = 0; +GLOBAL.TL_MF_MFREGV = 0; +GLOBAL.TL_MF_MFRSE1 = 0; +GLOBAL.TL_MF_MFRSE2 = 0; +GLOBAL.TL_MF_MFRSE3 = 0; +GLOBAL.TL_MF_MFRSE4 = 0; +GLOBAL.TL_MF_MFRSE5 = 0; +GLOBAL.TL_MF_MFRSE6 = 0; +GLOBAL.TL_MF_MFRSE7 = 0; +GLOBAL.TL_MF_MFTAXAGA = 0; +# inr +GLOBAL.INR_NB_MOIS = 0; +GLOBAL.INR_NB_MOIS2 = 0; +GLOBAL.INR_NB_MOIS_ISF = 0; +GLOBAL.INR_ANNEE_COR = 0; +GLOBAL.INR_PASDINR = 0; +# majo +GLOBAL.MAJO_D2042_STRATE_NB = 0; +GLOBAL.MAJO_D2042_P_NB = 0; +GLOBAL.MAJO_TAUX_STRATE = 0; +GLOBAL.MAJO_CODE_STRATE = 0; +GLOBAL.MAJO_TARDIF_EVT2 = 0; +GLOBAL.MAJO_STR_TR_00 = 0; +GLOBAL.MAJO_STR_TR_01 = 0; +GLOBAL.MAJO_STR_TR_02 = 0; +GLOBAL.MAJO_STR_TR_03 = 0; +GLOBAL.MAJO_STR_TR_04 = 0; +GLOBAL.MAJO_STR_TR_05 = 0; +GLOBAL.MAJO_STR_TR_06 = 0; +GLOBAL.MAJO_STR_TR_07 = 0; +GLOBAL.MAJO_STR_TR_08 = 0; +GLOBAL.MAJO_STR_TR_09 = 0; +GLOBAL.MAJO_STR_TR_10 = 0; +GLOBAL.MAJO_STR_TR_11 = 0; +GLOBAL.MAJO_STR_TR_12 = 0; +GLOBAL.MAJO_STR_TR_13 = 0; +GLOBAL.MAJO_STR_TR_14 = 0; +GLOBAL.MAJO_STR_TR_15 = 0; +GLOBAL.MAJO_STR_TR_16 = 0; +GLOBAL.MAJO_STR_TR_17 = 0; +GLOBAL.MAJO_STR_TR_18 = 0; +GLOBAL.MAJO_STR_TR_19 = 0; +GLOBAL.MAJO_STR_TR_20 = 0; +GLOBAL.MAJO_STR_TR_21 = 0; +GLOBAL.MAJO_STR_TR_22 = 0; +GLOBAL.MAJO_STR_TR_23 = 0; +GLOBAL.MAJO_STR_TR_24 = 0; +GLOBAL.MAJO_STR_TR_25 = 0; +GLOBAL.MAJO_PREM_STR = 0; +GLOBAL.MAJO_NB_STR_TR = 0; +GLOBAL.MAJO_DERN_STR_TR = 0; +GLOBAL.MAJO_NUM_STRATE = 0; +# prorata +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; +# art1731 +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +cible signaler_erreurs: +application: iliad; +si nb_anomalies() > 0 alors + nettoie_erreurs_finalisees; + finalise_erreurs; + exporte_erreurs; + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +sinon + finalise_erreurs; +finsi + +cible signaler_erreur_ano: +application: iliad; +finalise_erreurs; +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) +stop application; + +cible init_majo_str_tr : +application: iliad; +arguments: I, B; +aiguillage (I) : ( + cas 0: MAJO_STR_TR_00 = B; + cas 1: MAJO_STR_TR_01 = B; + cas 2: MAJO_STR_TR_02 = B; + cas 3: MAJO_STR_TR_03 = B; + cas 4: MAJO_STR_TR_04 = B; + cas 5: MAJO_STR_TR_05 = B; + cas 6: MAJO_STR_TR_06 = B; + cas 7: MAJO_STR_TR_07 = B; + cas 8: MAJO_STR_TR_08 = B; + cas 9: MAJO_STR_TR_09 = B; + cas 10: MAJO_STR_TR_10 = B; + cas 11: MAJO_STR_TR_11 = B; + cas 12: MAJO_STR_TR_12 = B; + cas 13: MAJO_STR_TR_13 = B; + cas 14: MAJO_STR_TR_14 = B; + cas 15: MAJO_STR_TR_15 = B; + cas 16: MAJO_STR_TR_16 = B; + cas 17: MAJO_STR_TR_17 = B; + cas 18: MAJO_STR_TR_18 = B; + cas 19: MAJO_STR_TR_19 = B; + cas 20: MAJO_STR_TR_20 = B; + cas 21: MAJO_STR_TR_21 = B; + cas 22: MAJO_STR_TR_22 = B; + cas 23: MAJO_STR_TR_23 = B; + cas 24: MAJO_STR_TR_24 = B; + cas 25: MAJO_STR_TR_25 = B; +) + +cible set_majo_str_tr: +application: iliad; +arguments: I; +variables_temporaires: B; +B = 1; +calculer cible init_majo_str_tr : avec I, B; + +cible set_majo_str_tr_proc: +application: iliad; +variables_temporaires: I; +I = TMP_ARG1; +calculer cible set_majo_str_tr : avec I; + +cible unset_majo_str_tr: +application: iliad; +arguments: I; +variables_temporaires: B; +B = 0; +calculer cible init_majo_str_tr : avec I, B; + +cible unset_majo_str_tr_proc: +application: iliad; +variables_temporaires: I; +I = TMP_ARG1; +calculer cible unset_majo_str_tr : avec I; + +cible clear_majo_str_tr: +application: iliad; +iterer : variable I : entre 0..25 increment 1 : dans ( + calculer cible unset_majo_str_tr : avec I; +) + +cible affect_str_tr: +application: iliad; +CORR.STR_TR00 = MAJO_STR_TR_00; +CORR.STR_TR01 = MAJO_STR_TR_01; +CORR.STR_TR02 = MAJO_STR_TR_02; +CORR.STR_TR03 = MAJO_STR_TR_03; +CORR.STR_TR04 = MAJO_STR_TR_04; +CORR.STR_TR05 = MAJO_STR_TR_05; +CORR.STR_TR06 = MAJO_STR_TR_06; +CORR.STR_TR07 = MAJO_STR_TR_07; +CORR.STR_TR08 = MAJO_STR_TR_08; +CORR.STR_TR09 = MAJO_STR_TR_09; +CORR.STR_TR10 = MAJO_STR_TR_10; +CORR.STR_TR11 = MAJO_STR_TR_11; +CORR.STR_TR12 = MAJO_STR_TR_12; +CORR.STR_TR13 = MAJO_STR_TR_13; +CORR.STR_TR14 = MAJO_STR_TR_14; +CORR.STR_TR15 = MAJO_STR_TR_15; +CORR.STR_TR16 = MAJO_STR_TR_16; +CORR.STR_TR17 = MAJO_STR_TR_17; +CORR.STR_TR18 = MAJO_STR_TR_18; +CORR.STR_TR19 = MAJO_STR_TR_19; +CORR.STR_TR20 = MAJO_STR_TR_20; +CORR.STR_TR21 = MAJO_STR_TR_21; +CORR.STR_TR22 = MAJO_STR_TR_22; +CORR.STR_TR23 = MAJO_STR_TR_23; +CORR.STR_TR24 = MAJO_STR_TR_24; +CORR.STR_TR25 = MAJO_STR_TR_25; + +cible enchaine_calcul_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible effacer_base_etc : espace GLOBAL; + calculer cible traite_double_liquidation_2_prim; + calculer cible sauve_base_initial_prim; + calculer cible sauve_base_1728_prim; + calculer cible sauve_base_anterieure_prim; + calculer cible sauve_base_anterieure_cor_prim; + calculer cible sauve_base_inr_inter22_prim; +sinon + GLOBAL.V_ACO_MTAP = 0; + GLOBAL.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_prim; +finsi + +cible enchaine_calcul_corr: +application: iliad; +si CORR.V_IND_TRAIT = 1 alors + calculer cible effacer_base_etc : espace CORR; + calculer cible traite_double_liquidation_2_corr; + calculer cible sauve_base_initial_corr; + calculer cible sauve_base_1728_corr; + calculer cible sauve_base_anterieure_corr; + calculer cible sauve_base_anterieure_cor_corr; + calculer cible sauve_base_inr_inter22_corr; +sinon + CORR.V_ACO_MTAP = 0; + CORR.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_corr; +finsi + +cible enchaine_verification_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_prim; +sinon + calculer cible verif_saisie_cohe_corrective_prim; +finsi + +cible enchaine_verification_corr: +application: iliad; +si CORR.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_corr; +sinon + calculer cible verif_saisie_cohe_corrective_corr; +finsi + +cible reset_saisie_calc: +application: iliad; +variables_temporaires: IND_TRAIT_SAV; +IND_TRAIT_SAV = CORR.V_IND_TRAIT; +iterer +: variable V +: categorie saisie *, calculee +: espace CORR +: dans ( + V = indefini; +) +CORR.V_IND_TRAIT = IND_TRAIT_SAV; + +cible reset_codes_rappel: +application: iliad; +CORR.PEN_RAPPEL = indefini; +CORR.MOIS_RAPPEL = indefini; +CORR.ANNEE_RAPPEL = indefini; +CORR.SENS_RAPPEL = indefini; +CORR.MONT_RAPPEL = indefini; +CORR.NUM_RAPPEL = indefini; +CORR.AB20_RAPPEL = indefini; +CORR.EVT_RAPPEL = indefini; +CORR.BTOL_RAPPEL = indefini; +CORR.COD_RAPPEL = indefini; + +cible add_majo_T_RABP: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABP07 = GLOBAL.MAJO_T_RABP07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABP08 = GLOBAL.MAJO_T_RABP08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABP09 = GLOBAL.MAJO_T_RABP09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABP10 = GLOBAL.MAJO_T_RABP10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABP11 = GLOBAL.MAJO_T_RABP11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABP12 = GLOBAL.MAJO_T_RABP12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABP17 = GLOBAL.MAJO_T_RABP17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABP31 = GLOBAL.MAJO_T_RABP31 + MONTANT; +) + +cible add_majo_T_RABPPS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31 + MONTANT; +) + +cible add_majo_T_RABPCS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31 + MONTANT; +) + +cible add_majo_T_RABPRD: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31 + MONTANT; +) + +cible add_majo_T_RABPCH: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31 + MONTANT; +) +cible add_majo_T_RABPLO: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31 + MONTANT; +) + +cible contexte_2042_INR: +application: iliad; +CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; +CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; +CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; +CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; +CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; +CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; +CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; +CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; +CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; +CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; +CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; +CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; +CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; + +cible contexte_2042_TL_Ref: +application: iliad; +CORR.SOMMEBAND_2 = 0; +CORR.SOMMEBA_2 = 0; +CORR.SOMMEBICND_2 = 0; +CORR.SOMMEBIC_2 = 0; +CORR.SOMMEBNCND_2 = 0; +CORR.SOMMEBNC_2 = 0; +CORR.SOMMEGLOBAL_2 = 0; +CORR.SOMMEGLOBND_2 = 0; +CORR.SOMMELOC_2 = 0; +CORR.SOMMEMOND_2 = 0; +CORR.SOMMERCM_2 = 0; +CORR.SOMMERF_2 = 0; +CORR.SOMMERI_2 = 0; + +cible affect_code: +application: iliad; +variables_temporaires: PENA, I; + si RETARD > 0 alors + PENA = GLOBAL.CODE_PENA; + sinon + PENA = GLOBAL.MAJO_CODE_STRATE; + finsi + aiguillage (PENA) : ( + cas 1 : I = 25; + cas 2 : I = 23; + cas 3 : I = 14; + cas 4 : I = 9; + cas 5 : I = 7; + cas 6 : I = 3; + cas 7 : + cas 18 : I = 17; + cas 8 : I = 12; + cas 10 : I = 16; + cas 11 : I = 11; + cas 17 : I = 15; + cas 22 : I = 24; + cas 30 : I = 10; + cas 31 : I = 6; + cas 32 : I = 5; + cas 35 : I = 9; + cas 55 : I = 13; + cas 99 : I = 0; + cas indefini : + par_defaut : stop cible; + ) + calculer cible set_majo_str_tr : avec I; + +cible remplit_tgv_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_inr_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_p: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_strate: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_STRATE +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_init: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_INIT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible set_rappel_ifi_prim: +application: iliad; +si + GLOBAL.COD9AA != 0 ou GLOBAL.COD9AB != 0 ou GLOBAL.COD9AC != 0 + ou GLOBAL.COD9AD != 0 ou GLOBAL.COD9AE != 0 ou GLOBAL.COD9BA != 0 + ou GLOBAL.COD9BB != 0 ou GLOBAL.COD9CA != 0 ou GLOBAL.COD9GF != 0 + ou GLOBAL.COD9GH != 0 ou GLOBAL.COD9GL != 0 ou GLOBAL.COD9GM != 0 + ou GLOBAL.COD9GN != 0 ou GLOBAL.COD9NC != 0 ou GLOBAL.COD9NG != 0 + ou GLOBAL.COD9PR != 0 ou GLOBAL.COD9PX != 0 ou GLOBAL.COD9RS != 0 + ou GLOBAL.CMAJ_ISF != 0 # 9XT + ou GLOBAL.MOISAN_ISF != 0 # 9XU +alors + GLOBAL.ISF_PRIM = 1; +finsi + +cible calcul_1731: +application: iliad; +calculer cible range_base_corr_corrige; +CORR.VARR30R32 = GLOBAL.ART1731_SOMME_R3032; +CORR.VARR10 = GLOBAL.ART1731_PRESENT_R10; +CORR.VARR30 = GLOBAL.ART1731_PRESENT_R30; +CORR.VARR32 = GLOBAL.ART1731_PRESENT_R32; + +cible init_1731: +application: iliad; +CORR.VARR30R32 = 0; +CORR.FLAG_INR_REF = 0; +CORR.PREM8_11 = GLOBAL.PREM_8_11; +CORR.PENA994 = GLOBAL.PENA_994; + +cible empty_art1731: +application: iliad; +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +fonction vers_nature: +application: iliad; +arguments: ATTR; +resultat: NAT; +si ATTR = 0 alors + NAT = N_REVENU; +sinon_si ATTR = 1 alors + NAT = N_CHARGE; +sinon + NAT = N_INDEFINIE; +finsi + +cible get_nature: +application: iliad; +arguments: NATURE, VAR; +NATURE = 0; +si + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + si dans_domaine(VAR, saisie contexte) alors + NATURE = vers_nature(attribut(VAR, modcat)); + sinon_si + # Il s'agit de la même condition qu'au dessus ? + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon_si dans_domaine(VAR, calculee *) alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon + NATURE = N_INDEFINIE; + finsi +sinon_si dans_domaine(VAR, saisie contexte) alors + si meme_variable(VAR, V_REGCO) alors + NATURE = N_REVENU; + sinon_si + meme_variable(VAR, V_EAG) + ou meme_variable(VAR, V_EAD) + ou meme_variable(VAR, V_CNR) + ou meme_variable(VAR, V_CNR2) + ou meme_variable(VAR, V_CR2) + alors + NATURE = N_CHARGE; + sinon + NATURE = N_REVENU; + finsi +sinon_si + dans_domaine(VAR, saisie variation) + ou dans_domaine(VAR, saisie penalite) + ou dans_domaine(VAR, calculee *) +alors + NATURE = N_REVENU; +finsi + +cible get_abat: +application: iliad; +arguments: ABAT, VAR; +si + dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + ABAT = attribut(VAR, ind_abat); +sinon + ABAT = 0; +finsi + +cible calcul_cum_p: +application: iliad; +variables_temporaires: NATURE; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: avec + present(VAR) + et non ( + meme_variable(VAR, DAT) ou meme_variable(VAR, ANTCR) + ou meme_variable(VAR, ANTIR) ou meme_variable(VAR, ANTRE) + ou meme_variable(VAR, CSANT) ou meme_variable(VAR, FORCA) + ou meme_variable(VAR, FORPA) ou meme_variable(VAR, FORVA) + ou meme_variable(VAR, IDANT) ou meme_variable(VAR, NIMPA) + ou meme_variable(VAR, NOTRAIT) ou meme_variable(VAR, PSANT) + ou meme_variable(VAR, RDANT) ou meme_variable(VAR, ANC_BAR) + ou meme_variable(VAR, ACO_MTAP) ou meme_variable(VAR, INDG) + ou meme_variable(VAR, CHRANT) ou meme_variable(VAR, CODILIAD) + ) +: dans ( + calculer cible get_nature : avec NATURE, VAR; + si NATURE = N_REVENU alors + aiguillage( attribut(VAR, cotsoc) ) : ( + cas 1: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + cas 5: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + cas 9: + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + cas 10: + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 11: cas 12: cas 13: cas 14: cas 19: cas 20: cas 21: + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 16: + GLOBAL.MAJO_T_RABPLO = GLOBAL.MAJO_T_RABPLO + VAR; + cas 18: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + ) + finsi +) + +cible process_penalite: +application: iliad; +arguments: PENA_CODE, P; +variables_temporaires: P_MAX, P_OLD, P_MULTI; +P_MAX = inf(PENA_CODE / 1000) % 100; +P_OLD = inf(PENA_CODE / 10) % 100; +P_MULTI = inf(PENA_CODE) % 10; +si P >= P_MAX alors + P_MAX = P; +finsi +si P != P_OLD alors + P_MULTI = si (P_OLD != 0 ou positif(P_MULTI)) alors (1) sinon (0) finsi; + P_OLD = P; +finsi +PENA_CODE = (1000 * P_MAX) + (10 * P_OLD) + P_MULTI; + +fonction get_pMax: +application: iliad; +arguments: CODE; +resultat: R; +R = inf(CODE / 1000); + +fonction get_pMulti: +application: iliad; +arguments: CODE; +resultat: R; +R = positif(inf(CODE) % 10); + +cible detecte_penalites: +application: iliad; +variables_temporaires: + PENA_CODE_I, PENA_CODE_1728, PENA_CODE_ICRP, PENA_CODE_1728CRP, + PENA_CODE_C, PENA_CODE_R, PENA_CODE_P, PENA_CODE_ITAXA, + PENA_CODE_1758AIR, PENA_CODE_1758ATA, PENA_CODE_ICSAL, PENA_CODE_1728CSAL, + PENA_CODE_CSAL, PENA_CODE_ICDIS, PENA_CODE_1728CDIS, PENA_CODE_CDIS, + PENA_CODE_ICAP, PENA_CODE_1728CAP, PENA_CODE_CAP, PENA_CODE_1758ACAP, + PENA_CODE_ICHR, PENA_CODE_1728CHR, PENA_CODE_CHR, PENA_CODE_1758ACHR, + PENA_CODE_IISF, PENA_CODE_1728ISF, PENA_CODE_ISF, PENA_CODE_IGAIN, + PENA_CODE_1728GAIN, PENA_CODE_GAIN, PENA_CODE_IRSE1, PENA_CODE_1728RSE1, + PENA_CODE_RSE1, PENA_CODE_IRSE2, PENA_CODE_1728RSE2, PENA_CODE_RSE2, + PENA_CODE_IRSE3, PENA_CODE_1728RSE3, PENA_CODE_RSE3, PENA_CODE_IRSE4, + PENA_CODE_1728RSE4, PENA_CODE_RSE4, PENA_CODE_ICVN, PENA_CODE_1728CVN, + PENA_CODE_CVN, PENA_CODE_IGLO, PENA_CODE_1728GLO, PENA_CODE_GLO, + PENA_CODE_IRSE5, PENA_CODE_1728RSE5, PENA_CODE_RSE5, PENA_CODE_IRSE6, + PENA_CODE_1728RSE6, PENA_CODE_RSE6, PENA_CODE_IRSE7, PENA_CODE_1728RSE7, + PENA_CODE_RSE7, PENA_CODE_IC820, PENA_CODE_1728C820, PENA_CODE_C820, + PENA_CODE_IRSE8, PENA_CODE_1728RSE8, PENA_CODE_RSE8, PENA_CODE_REGV, + CS, SENS, PENA, P; +PENA_CODE_I = 0; +PENA_CODE_1728 = 0; +PENA_CODE_ICRP = 0; +PENA_CODE_1728CRP = 0; +PENA_CODE_C = 0; +PENA_CODE_R = 0; +PENA_CODE_P = 0; +PENA_CODE_ITAXA = 0; +PENA_CODE_1758AIR = 0; +PENA_CODE_1758ATA = 0; +PENA_CODE_ICSAL = 0; +PENA_CODE_1728CSAL = 0; +PENA_CODE_CSAL = 0; +PENA_CODE_ICDIS = 0; +PENA_CODE_1728CDIS = 0; +PENA_CODE_CDIS = 0; +PENA_CODE_ICAP = 0; +PENA_CODE_1728CAP = 0; +PENA_CODE_CAP = 0; +PENA_CODE_1758ACAP = 0; +PENA_CODE_ICHR = 0; +PENA_CODE_1728CHR = 0; +PENA_CODE_CHR = 0; +PENA_CODE_1758ACHR = 0; +PENA_CODE_IISF = 0; +PENA_CODE_1728ISF = 0; +PENA_CODE_ISF = 0; +PENA_CODE_IGAIN = 0; +PENA_CODE_1728GAIN = 0; +PENA_CODE_GAIN = 0; +PENA_CODE_IRSE1 = 0; +PENA_CODE_1728RSE1 = 0; +PENA_CODE_RSE1 = 0; +PENA_CODE_IRSE2 = 0; +PENA_CODE_1728RSE2 = 0; +PENA_CODE_RSE2 = 0; +PENA_CODE_IRSE3 = 0; +PENA_CODE_1728RSE3 = 0; +PENA_CODE_RSE3 = 0; +PENA_CODE_IRSE4 = 0; +PENA_CODE_1728RSE4 = 0; +PENA_CODE_RSE4 = 0; +PENA_CODE_ICVN = 0; +PENA_CODE_1728CVN = 0; +PENA_CODE_CVN = 0; +PENA_CODE_IGLO = 0; +PENA_CODE_1728GLO = 0; +PENA_CODE_GLO = 0; +PENA_CODE_IRSE5 = 0; +PENA_CODE_1728RSE5 = 0; +PENA_CODE_RSE5 = 0; +PENA_CODE_IRSE6 = 0; +PENA_CODE_1728RSE6 = 0; +PENA_CODE_RSE6 = 0; +PENA_CODE_IRSE7 = 0; +PENA_CODE_1728RSE7 = 0; +PENA_CODE_RSE7 = 0; +PENA_CODE_IC820 = 0; +PENA_CODE_1728C820 = 0; +PENA_CODE_C820 = 0; +PENA_CODE_IRSE8 = 0; +PENA_CODE_1728RSE8 = 0; +PENA_CODE_RSE8 = 0; +PENA_CODE_REGV = 0; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + CS = inf(attribut(champ_evenement(R, code), cotsoc)); + SENS = inf(champ_evenement(R, sens)); + PENA = inf(champ_evenement(R, penalite)); + si (GLOBAL.DEFAUT ou GLOBAL.RETARD) et SENS = SENS_R et PENA = 99 + alors + P = GLOBAL.CODE_PENA; + sinon + P = PENA; + finsi + si non (P dans (0, 1, 99)) alors + si P < 7 ou P dans (22, 24, 30, 32, 35, 55) alors + calculer cible process_penalite : avec PENA_CODE_I, P; + finsi + si non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21) + et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_ICRP, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23) + et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_1728CRP, P; + finsi + si CS dans (17, 18) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICVN, P; + finsi + si CS dans (17, 18) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CVN, P; + finsi + si CS = 18 et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGLO, P; + finsi + si CS = 18 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GLO, P; + finsi + si CS dans (19, 20) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE5, P; + finsi + si CS dans (19, 20) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE5, P; + finsi + si CS = 3 alors + calculer cible process_penalite : avec PENA_CODE_ITAXA, P; + finsi + si P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758AIR, P; + finsi + si CS = 3 et P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758ATA, P; + finsi + si CS = 4 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICSAL, P; + finsi + si CS = 4 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CSAL, P; + finsi + si CS = 8 alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACHR, P; + finsi + si CS = 8 et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CHR, P; + finsi + si CS = 9 alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACAP, P; + finsi + si CS = 9 et (P < 7 ou P dans (22, 24, 35, 55 )) alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CAP, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CDIS, P; + finsi + si CS = 15 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGAIN, P; + finsi + si CS = 15 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GAIN, P; + finsi + si CS = 11 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE1, P; + finsi + si CS = 11 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE1, P; + finsi + si CS dans (12, 21) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE2, P; + finsi + si CS dans (12, 21) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE2, P; + finsi + si CS = 13 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE3, P; + finsi + si CS = 13 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE3, P; + finsi + si CS = 14 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE4, P; + finsi + si CS = 14 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE4, P; + finsi + si CS dans (20, 21, 22) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE6, P; + finsi + si CS dans (20, 21, 22) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE6, P; + finsi + si CS = 23 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IC820, P; + finsi + si CS = 23 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728C820, P; + finsi + si CS = 22 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE8, P; + finsi + si CS = 22 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE8, P; + finsi + si (P < 7 ou P = 35) alors + calculer cible process_penalite : avec PENA_CODE_IISF, P; + finsi + si (P dans (3, 4, 5, 7, 8, 10, 11, 17, 18, 22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728ISF, P; + finsi + si CS dans (1, 7, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_C, P; + finsi + si CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23) alors + calculer cible process_penalite : avec PENA_CODE_R, P; + finsi + si CS dans (1, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_P, P; + finsi + si CS dans (17, 18) alors + calculer cible process_penalite : avec PENA_CODE_CVN, P; + finsi + si CS = 7 alors + calculer cible process_penalite : avec PENA_CODE_REGV, P; + finsi + si CS = 4 alors + calculer cible process_penalite : avec PENA_CODE_CSAL, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_CDIS, P; + finsi + si CS = 11 alors + calculer cible process_penalite : avec PENA_CODE_RSE1, P; + finsi + si CS dans (12, 21) alors + calculer cible process_penalite : avec PENA_CODE_RSE2, P; + finsi + si CS = 13 alors + calculer cible process_penalite : avec PENA_CODE_RSE3, P; + finsi + si CS = 14 alors + calculer cible process_penalite : avec PENA_CODE_RSE4, P; + finsi + si CS dans (19, 20) alors + calculer cible process_penalite : avec PENA_CODE_RSE5, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE6, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE7, P; + finsi + si CS = 23 alors + calculer cible process_penalite : avec PENA_CODE_C820, P; + finsi + si CS = 22 alors + calculer cible process_penalite : avec PENA_CODE_RSE8, P; + finsi + si CS = 15 alors + calculer cible process_penalite : avec PENA_CODE_GAIN, P; + finsi + si CS = 18 alors + calculer cible process_penalite : avec PENA_CODE_GLO, P; + finsi + finsi +) +CORR.V_CODPF1728 = get_pMax(PENA_CODE_1728); +CORR.V_CODPF1728C820 = get_pMax(PENA_CODE_1728C820); +CORR.V_CODPF1728CAP = get_pMax(PENA_CODE_1728CAP); +CORR.V_CODPF1728CDIS = get_pMax(PENA_CODE_1728CDIS); +CORR.V_CODPF1728CHR = get_pMax(PENA_CODE_1728CHR); +CORR.V_CODPF1728CRP = get_pMax(PENA_CODE_1728CRP); +CORR.V_CODPF1728CSAL = get_pMax(PENA_CODE_1728CSAL); +CORR.V_CODPF1728CVN = get_pMax(PENA_CODE_1728CVN); +CORR.V_CODPF1728GAIN = get_pMax(PENA_CODE_1728GAIN); +CORR.V_CODPF1728GLO = get_pMax(PENA_CODE_1728GLO); +CORR.V_CODPF1728ISF = get_pMax(PENA_CODE_1728ISF); +CORR.V_CODPF1728RSE1 = get_pMax(PENA_CODE_1728RSE1); +CORR.V_CODPF1728RSE2 = get_pMax(PENA_CODE_1728RSE2); +CORR.V_CODPF1728RSE3 = get_pMax(PENA_CODE_1728RSE3); +CORR.V_CODPF1728RSE4 = get_pMax(PENA_CODE_1728RSE4); +CORR.V_CODPF1728RSE5 = get_pMax(PENA_CODE_1728RSE5); +CORR.V_CODPF1728RSE6 = get_pMax(PENA_CODE_1728RSE6); +CORR.V_CODPF1728RSE7 = get_pMax(PENA_CODE_1728RSE7); +CORR.V_CODPF1728RSE8 = get_pMax(PENA_CODE_1728RSE8); +CORR.V_CODPFC = get_pMax(PENA_CODE_C); +CORR.V_CODPFC820 = get_pMax(PENA_CODE_C820); +CORR.V_CODPFCAP = get_pMax(PENA_CODE_CAP); +CORR.V_CODPFCDIS = get_pMax(PENA_CODE_CDIS); +CORR.V_CODPFCHR = get_pMax(PENA_CODE_CHR); +CORR.V_CODPFCSAL = get_pMax(PENA_CODE_CSAL); +CORR.V_CODPFCVN = get_pMax(PENA_CODE_CVN); +CORR.V_CODPFGAIN = get_pMax(PENA_CODE_GAIN); +CORR.V_CODPFGLO = get_pMax(PENA_CODE_GLO); +CORR.V_CODPFI = get_pMax(PENA_CODE_I); +CORR.V_CODPFIC820 = get_pMax(PENA_CODE_IC820); +CORR.V_CODPFICAP = get_pMax(PENA_CODE_ICAP); +CORR.V_CODPFICDIS = get_pMax(PENA_CODE_ICDIS); +CORR.V_CODPFICHR = get_pMax(PENA_CODE_ICHR); +CORR.V_CODPFICRP = get_pMax(PENA_CODE_ICRP); +CORR.V_CODPFICSAL = get_pMax(PENA_CODE_ICSAL); +CORR.V_CODPFICVN = get_pMax(PENA_CODE_ICVN); +CORR.V_CODPFIGAIN = get_pMax(PENA_CODE_IGAIN); +CORR.V_CODPFIGLO = get_pMax(PENA_CODE_IGLO); +CORR.V_CODPFIISF = get_pMax(PENA_CODE_IISF); +CORR.V_CODPFIRSE1 = get_pMax(PENA_CODE_IRSE1); +CORR.V_CODPFIRSE2 = get_pMax(PENA_CODE_IRSE2); +CORR.V_CODPFIRSE3 = get_pMax(PENA_CODE_IRSE3); +CORR.V_CODPFIRSE4 = get_pMax(PENA_CODE_IRSE4); +CORR.V_CODPFIRSE5 = get_pMax(PENA_CODE_IRSE5); +CORR.V_CODPFIRSE6 = get_pMax(PENA_CODE_IRSE6); +CORR.V_CODPFIRSE7 = get_pMax(PENA_CODE_IRSE7); +CORR.V_CODPFIRSE8 = get_pMax(PENA_CODE_IRSE8); +CORR.V_CODPFISF = get_pMax(PENA_CODE_ISF); +CORR.V_CODPFITAXA = get_pMax(PENA_CODE_ITAXA); +CORR.V_CODPFP = get_pMax(PENA_CODE_P); +CORR.V_CODPFR = get_pMax(PENA_CODE_R); +CORR.V_CODPFRSE1 = get_pMax(PENA_CODE_RSE1); +CORR.V_CODPFRSE2 = get_pMax(PENA_CODE_RSE2); +CORR.V_CODPFRSE3 = get_pMax(PENA_CODE_RSE3); +CORR.V_CODPFRSE4 = get_pMax(PENA_CODE_RSE4); +CORR.V_CODPFRSE5 = get_pMax(PENA_CODE_RSE5); +CORR.V_CODPFRSE6 = get_pMax(PENA_CODE_RSE6); +CORR.V_CODPFRSE7 = get_pMax(PENA_CODE_RSE7); +CORR.V_CODPFRSE8 = get_pMax(PENA_CODE_RSE8); +CORR.V_NBCOD1728 = get_pMulti(PENA_CODE_1728); +CORR.V_NBCOD1728C820 = get_pMulti(PENA_CODE_1728C820); +CORR.V_NBCOD1728CAP = get_pMulti(PENA_CODE_1728CAP); +CORR.V_NBCOD1728CDIS = get_pMulti(PENA_CODE_1728CDIS); +CORR.V_NBCOD1728CHR = get_pMulti(PENA_CODE_1728CHR); +CORR.V_NBCOD1728CRP = get_pMulti(PENA_CODE_1728CRP); +CORR.V_NBCOD1728CSAL = get_pMulti(PENA_CODE_1728CSAL); +CORR.V_NBCOD1728CVN = get_pMulti(PENA_CODE_1728CVN); +CORR.V_NBCOD1728GAIN = get_pMulti(PENA_CODE_1728GAIN); +CORR.V_NBCOD1728GLO = get_pMulti(PENA_CODE_1728GLO); +CORR.V_NBCOD1728ISF = get_pMulti(PENA_CODE_1728ISF); +CORR.V_NBCOD1728RSE1 = get_pMulti(PENA_CODE_1728RSE1); +CORR.V_NBCOD1728RSE2 = get_pMulti(PENA_CODE_1728RSE2); +CORR.V_NBCOD1728RSE3 = get_pMulti(PENA_CODE_1728RSE3); +CORR.V_NBCOD1728RSE4 = get_pMulti(PENA_CODE_1728RSE4); +CORR.V_NBCOD1728RSE5 = get_pMulti(PENA_CODE_1728RSE5); +CORR.V_NBCOD1728RSE6 = get_pMulti(PENA_CODE_1728RSE6); +CORR.V_NBCOD1728RSE7 = get_pMulti(PENA_CODE_1728RSE7); +CORR.V_NBCOD1728RSE8 = get_pMulti(PENA_CODE_1728RSE8); +CORR.V_NBCOD1758ACAP = get_pMulti(PENA_CODE_1758ACAP); +CORR.V_NBCOD1758ACHR = get_pMulti(PENA_CODE_1758ACHR); +CORR.V_NBCOD1758AIR = get_pMulti(PENA_CODE_1758AIR); +CORR.V_NBCOD1758ATA = get_pMulti(PENA_CODE_1758ATA); +CORR.V_NBCODC = get_pMulti(PENA_CODE_C); +CORR.V_NBCODC820 = get_pMulti(PENA_CODE_C820); +CORR.V_NBCODCDIS = get_pMulti(PENA_CODE_CDIS); +CORR.V_NBCODCSAL = get_pMulti(PENA_CODE_CSAL); +CORR.V_NBCODCVN = get_pMulti(PENA_CODE_CVN); +CORR.V_NBCODGAIN = get_pMulti(PENA_CODE_GAIN); +CORR.V_NBCODGLO = get_pMulti(PENA_CODE_GLO); +CORR.V_NBCODI = get_pMulti(PENA_CODE_I); +CORR.V_NBCODIC820 = get_pMulti(PENA_CODE_IC820); +CORR.V_NBCODICAP = get_pMulti(PENA_CODE_ICAP); +CORR.V_NBCODICDIS = get_pMulti(PENA_CODE_ICDIS); +CORR.V_NBCODICHR = get_pMulti(PENA_CODE_ICHR); +CORR.V_NBCODICRP = get_pMulti(PENA_CODE_ICRP); +CORR.V_NBCODICSAL = get_pMulti(PENA_CODE_ICSAL); +CORR.V_NBCODICVN = get_pMulti(PENA_CODE_ICVN); +CORR.V_NBCODIGAIN = get_pMulti(PENA_CODE_IGAIN); +CORR.V_NBCODIGLO = get_pMulti(PENA_CODE_IGLO); +CORR.V_NBCODIISF = get_pMulti(PENA_CODE_IISF); +CORR.V_NBCODIRSE1 = get_pMulti(PENA_CODE_IRSE1); +CORR.V_NBCODIRSE2 = get_pMulti(PENA_CODE_IRSE2); +CORR.V_NBCODIRSE3 = get_pMulti(PENA_CODE_IRSE3); +CORR.V_NBCODIRSE4 = get_pMulti(PENA_CODE_IRSE4); +CORR.V_NBCODIRSE5 = get_pMulti(PENA_CODE_IRSE5); +CORR.V_NBCODIRSE6 = get_pMulti(PENA_CODE_IRSE6); +CORR.V_NBCODIRSE7 = get_pMulti(PENA_CODE_IRSE7); +CORR.V_NBCODIRSE8 = get_pMulti(PENA_CODE_IRSE8); +CORR.V_NBCODISF = get_pMulti(PENA_CODE_ISF); +CORR.V_NBCODITAXA = get_pMulti(PENA_CODE_ITAXA); +CORR.V_NBCODP = get_pMulti(PENA_CODE_P); +CORR.V_NBCODR = get_pMulti(PENA_CODE_R); +CORR.V_NBCODRSE1 = get_pMulti(PENA_CODE_RSE1); +CORR.V_NBCODRSE2 = get_pMulti(PENA_CODE_RSE2); +CORR.V_NBCODRSE3 = get_pMulti(PENA_CODE_RSE3); +CORR.V_NBCODRSE4 = get_pMulti(PENA_CODE_RSE4); +CORR.V_NBCODRSE5 = get_pMulti(PENA_CODE_RSE5); +CORR.V_NBCODRSE6 = get_pMulti(PENA_CODE_RSE6); +CORR.V_NBCODRSE7 = get_pMulti(PENA_CODE_RSE7); +CORR.V_NBCODRSE8 = get_pMulti(PENA_CODE_RSE8); + +fonction is_1728_defaut: +application: iliad; +arguments: PENA; +resultat: R; +R = (PENA dans (10, 11, 12)); + +EST_CODE_ISF : calculee primrest = 0 : "" ; + +cible est_code_isf: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, COD9AA) + ou meme_variable(VAR, COD9AB) + ou meme_variable(VAR, COD9AC) + ou meme_variable(VAR, COD9AD) + ou meme_variable(VAR, COD9AE) + ou meme_variable(VAR, COD9BA) + ou meme_variable(VAR, COD9BB) + ou meme_variable(VAR, COD9CA) + ou meme_variable(VAR, COD9GF) + ou meme_variable(VAR, COD9GH) + ou meme_variable(VAR, COD9GL) + ou meme_variable(VAR, COD9GM) + ou meme_variable(VAR, COD9GN) + ou meme_variable(VAR, COD9GY) + ou meme_variable(VAR, COD9NC) + ou meme_variable(VAR, COD9NG) + ou meme_variable(VAR, COD9PR) + ou meme_variable(VAR, COD9PX) + ou meme_variable(VAR, COD9RS) + ou meme_variable(VAR, CMAJ_ISF) + ou meme_variable(VAR, MOISAN_ISF); + +cible est_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +calculer cible est_code_isf : avec RESULTAT, VAR; +si positif(RESULTAT) alors + RESULTAT = (PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99)); +sinon + RESULTAT = (PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99)); +finsi + +cible controle_defaut_retard_2042: +application: iliad; +variables_temporaires: RAP_1728_SF, PENA, EST_1728, EST_ISF, NUM_EVT; +RAP_1728_SF = indefini; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si non present(RAP_1728_SF) alors + si + ( + positif(EST_1728) + et ( + meme_variable(champ_evenement(R, code), V_0AM) + ou meme_variable(champ_evenement(R, code), V_0AC) + ou meme_variable(champ_evenement(R, code), V_0AD) + ou meme_variable(champ_evenement(R, code), V_0AO) + ou meme_variable(champ_evenement(R, code), V_0AV) + ) + et non ( + positif(GLOBAL.V_0AM + 0) + ou positif(GLOBAL.V_0AC + 0) + ou positif(GLOBAL.V_0AD + 0) + ou positif(GLOBAL.V_0AO + 0) + ou positif(GLOBAL.V_0AV + 0) + ) + ) + ou (positif(EST_ISF) et GLOBAL.ISF_PRIM + 0 = 0) + alors + RAP_1728_SF = R; + finsi + finsi +) +si present(RAP_1728_SF) alors + PENA = champ_evenement(RAP_1728_SF, penalite); + GLOBAL.CODE_PENA = PENA; + GLOBAL.DATE = champ_evenement(RAP_1728_SF, date); + si PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (PENA = 10); + GLOBAL.DEFAUT11 = (PENA = 11); + GLOBAL.DEFAUT1011 = (PENA dans (10, 11)); + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD101718 = (PENA dans (10, 17, 18)); + GLOBAL.RETARD0718 = (PENA dans (7, 8, 17, 18)); + GLOBAL.RETARD08 = (PENA = 8); + GLOBAL.RETARD07 = (PENA dans (1, 7, 99)); + GLOBAL.RETARD22 = (PENA = 22); + GLOBAL.RETARD99 = (PENA dans (1, 99)); + finsi +finsi +si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9YT; + GLOBAL.DATE = GLOBAL.DATE_9YU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9YT != NUM_EVT et GLOBAL.MONTANT_9YT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9XT; + GLOBAL.DATE = GLOBAL.DATE_9XU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9XT != NUM_EVT et GLOBAL.MONTANT_9XT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7 ou positif(GLOBAL.RETARD07)); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99 ou positif(GLOBAL.RETARD99)); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + +cible prepare_tl: +application: iliad; +variables_temporaires: COMMENCE_PAR_7; +si positif(GLOBAL.DEFAUT) alors + GLOBAL.TL_NON_ACQUISE = TL_TL_DEFAUT_2042; + CORR.IND_TL_MF = 1; +sinon + GLOBAL.TL_D2042_NB = 0; + GLOBAL.TL_D2042_INIT_NB = 0; + GLOBAL.TL_D2042_RECT_NB = 0; + iterer + : variable VAR + : categorie saisie * + : dans ( + si present(D2042.VAR) alors + TL_D2042.VAR = D2042.VAR; + GLOBAL.TL_D2042_NB = GLOBAL.TL_D2042_NB + 1; + TL_D2042_INIT.VAR = D2042.VAR; + GLOBAL.TL_D2042_INIT_NB = GLOBAL.TL_D2042_INIT_NB + 1; + TL_D2042_RECT.VAR = D2042.VAR; + GLOBAL.TL_D2042_RECT_NB = GLOBAL.TL_D2042_RECT_NB + 1; + sinon + TL_D2042.VAR = indefini; + TL_D2042_INIT.VAR = indefini; + TL_D2042_RECT.VAR = indefini; + finsi + si present(D2042_ABAT.VAR) alors + TL_D2042_ABAT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_INIT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_RECT.VAR = D2042_ABAT.VAR; + sinon + TL_D2042_ABAT.VAR = indefini; + TL_D2042_ABAT_INIT.VAR = indefini; + TL_D2042_ABAT_RECT.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) et attribut(VAR, categorie_TL) dans (40, 50) + : espace D2042 + : dans ( + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, VAR; + si positif(COMMENCE_PAR_7) alors + GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + VAR; + GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + VAR; + finsi + ) +finsi + +cible prepare_majo: +application: iliad; +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; + +cible prepare_inr: +application: iliad; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + INR_D2042.VAR = VAR; +) + +fonction taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +cible calcul_tl: +application: iliad; +arguments: EST_PREMIER; +si GLOBAL.TL_D2042_INIT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_init; + si GLOBAL.TL_NON_ACQUISE != TL_TL_ACQUISE alors + CORR.IND_TL_MF = 1; + finsi + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible sauve_base_tl_init_corr; +finsi +si GLOBAL.TL_D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_corr; +finsi +si GLOBAL.TL_D2042_RECT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_rect; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_rect_corr; +finsi +CORR.MFCDIS = GLOBAL.TL_MF_MFCDIS; +CORR.MFCHR = GLOBAL.TL_MF_MFCHR; +CORR.MFCHR7 = GLOBAL.TL_MF_MFCHR7; +CORR.MFCS = GLOBAL.TL_MF_MFCS; +CORR.MFCSAL = GLOBAL.TL_MF_MFCSAL; +CORR.MFCVN = GLOBAL.TL_MF_MFCVN; +CORR.MFGAIN = GLOBAL.TL_MF_MFGAIN; +CORR.MFGLO = GLOBAL.TL_MF_MFGLO; +CORR.MFIFI = GLOBAL.TL_MF_MFIFI; +CORR.MFIR = GLOBAL.TL_MF_MFIR; +CORR.MFMCSG820 = GLOBAL.TL_MF_MFMCSG820; +CORR.MFPCAP = GLOBAL.TL_MF_MFPCAP; +CORR.MFPS = GLOBAL.TL_MF_MFPS; +CORR.MFPSOL = GLOBAL.TL_MF_MFPSOL; +CORR.MFRD = GLOBAL.TL_MF_MFRD; +CORR.MFREGV = GLOBAL.TL_MF_MFREGV; +CORR.MFRSE1 = GLOBAL.TL_MF_MFRSE1; +CORR.MFRSE2 = GLOBAL.TL_MF_MFRSE2; +CORR.MFRSE3 = GLOBAL.TL_MF_MFRSE3; +CORR.MFRSE4 = GLOBAL.TL_MF_MFRSE4; +CORR.MFRSE5 = GLOBAL.TL_MF_MFRSE5; +CORR.MFRSE6 = GLOBAL.TL_MF_MFRSE6; +CORR.MFRSE7 = GLOBAL.TL_MF_MFRSE7; +CORR.MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA; +CORR.RAPCI_TL = GLOBAL.TL_BASE_TL; +CORR.RAPCI_INIT = GLOBAL.TL_BASE_TL_INIT; +CORR.RAPCI_RECT = GLOBAL.TL_BASE_TL_RECT; +CORR.CI_TL = GLOBAL.TL_BASE_TL_TBTC; +CORR.CI_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT; +CORR.CI_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT; +calculer cible ench_tl_corr; + +cible recherche_C22R02: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +variables_temporaires: TROUVE0, TROUVE1; +TROUVE0 = 0; +TROUVE1 = 0; +iterer +: variable R0 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R0, id_evt) = INDICE_EVT + et champ_evenement(R0, sens) = SENS_C + et champ_evenement(R0, penalite) dans (22, 24) + alors + TROUVE0 = 1; + finsi +) +iterer +: variable R1 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R1, id_evt) = INDICE_EVT + et champ_evenement(R1, sens) = SENS_R + et champ_evenement(R1, penalite) = 2 + et positif(TROUVE0) + alors + TROUVE1 = 1; + finsi +) +RESULTAT = TROUVE1; + + +cible recherche_C22R02_proc: +application: iliad; +variables_temporaires: RESULTAT, INDICE_EVT; +INDICE_EVT = TMP_ARG1; +calculer cible recherche_C22R02 : avec RESULTAT, INDICE_EVT; +TMP_RES = RESULTAT; + +cible verif_code_prem_evt: +application: iliad; +arguments: BRES, R; +variables_temporaires: B; +BRES = 0; +B = 1; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(RR, id_evt) != 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + alors + B = 0; + finsi +) +si B = 1 alors + BRES = 1; +sinon + iterer + : variable RR + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + champ_evenement(RR, id_evt) = 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et champ_evenement(R, montant) <= champ_evenement(RR, montant) + alors + BRES = 1; + finsi + ) +finsi + +cible verif_code_prem_evt_proc: +application: iliad; +calculer cible verif_code_prem_evt : avec TMP_RES, TMP_ARG1; + +cible est_code_tax_init: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, COA) ou meme_variable(VAR, COB) ou meme_variable(VAR, COD) + ou meme_variable(VAR, COE) ou meme_variable(VAR, COF) ou meme_variable(VAR, COG) + ou meme_variable(VAR, COH) ou meme_variable(VAR, COJ) ou meme_variable(VAR, COL) + ou meme_variable(VAR, COM) ou meme_variable(VAR, COO) ou meme_variable(VAR, COP) + ou meme_variable(VAR, COQ) ou meme_variable(VAR, COR) ou meme_variable(VAR, COT) + ou meme_variable(VAR, COU) ou meme_variable(VAR, COV) ou meme_variable(VAR, COX) +); + +cible denature_rappels: +application: iliad; +variables_temporaires: + TAUX_PENA_2042, PENA, TAUX_PENA_RAPPEL, + EST_1728, EST_ISF, EST_TAX_INIT, VERIF_PREM_EVT; +si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + si positif(GLOBAL.PRESENT_9YT) et GLOBAL.MONTANT_9YT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) et GLOBAL.MONTANT_9XT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + ) + finsi + TAUX_PENA_2042 = taux_penalite(GLOBAL.CODE_PENA); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + TAUX_PENA_RAPPEL = taux_penalite(champ_evenement(R, penalite)); + si champ_evenement(R, sens) != SENS_M alors + si positif(GLOBAL.RETARD0718) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + non ( + (non positif(EST_1728)) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (10, 17) + et GLOBAL.CODE_PENA dans (7, 18) + ) + ou champ_evenement(R, penalite) dans (22, 99) + ou TAUX_PENA_2042 < TAUX_PENA_RAPPEL + ) + alors + si champ_evenement(R, sens) = SENS_P alors + champ_evenement(R, penalite) = 0; + sinon + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 2 + et GLOBAL.CODE_PENA dans (7, 18) + alors + champ_evenement(R, anc_penalite) = champ_evenement(R, penalite); + champ_evenement(R, penalite) = 7; + sinon_si + champ_evenement(R, penalite) dans (1, 2, 3, 4, 5, 6, 30, 32, 55) + et (GLOBAL.DEFAUT1011 ou GLOBAL.RETARD0718) + et TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + alors + si + champ_evenement(R, penalite) = 2 et GLOBAL.CODE_PENA dans (7, 18) + alors + GLOBAL.LIMELIGHT = 1; + sinon + champ_evenement(R, 2042_rect) = 0; + finsi + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + finsi + si positif(GLOBAL.DEFAUT) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + alors + si non meme_variable(champ_evenement(R, code), ACODELAISINR) alors + champ_evenement(R, date) = GLOBAL.DATE; + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + sinon_si + positif(EST_1728) et champ_evenement(R, sens) != SENS_P + alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + (champ_evenement(R, penalite) dans (2, 3) et non positif(EST_ISF)) + ou ( + TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + et champ_evenement(R, penalite) != 22 + ) + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + sinon_si + non (champ_evenement(R, penalite) dans (6, 22, 24, 30, 32, 35)) + et champ_evenement(R, sens) != SENS_P + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + sinon + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + non ( + positif(EST_TAX_INIT) + ou meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_PREM_EVT, R; + si positif(VERIF_PREM_EVT) alors + champ_evenement(R, penalite) = 0; + finsi + si champ_evenement(R, sens) = SENS_M alors + CORR.V_FLAGMENC = 1; + finsi + finsi + finsi + ) +finsi + +cible mauvaise_foi: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: + MF_DEF, MONTANT_RECT, NATURE, MONTANT, + COMMENCE_PAR_7, COMMENCE_PAR_H, EST_ISF, + COTSOC; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + MF_DEF = 0; + si + champ_evenement(R, sens) != SENS_P + et non (champ_evenement(R, penalite) dans (0, 2, 22, 24, 99)) + alors + MONTANT_RECT = present(D2042_RECT.champ_evenement(R, code)); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + MONTANT = present(D2042.champ_evenement(R, code)); + si inf(MONTANT_RECT) < inf (MONTANT) alors + MF_DEF = 1; + sinon_si inf(MONTANT_RECT) = 0 alors + MF_DEF = -1; + finsi + sinon_si NATURE = N_REVENU alors + MONTANT = 0; + si inf(MONTANT_RECT) > inf(MONTANT) alors + MF_DEF = 1; + sinon_si inf (MONTANT_RECT) = 0 alors + MF_DEF = -1; + finsi + finsi + finsi + si MF_DEF != 0 alors + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); + calculer cible alias_commence_par_H : avec COMMENCE_PAR_H, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + positif(COMMENCE_PAR_7) ou positif(COMMENCE_PAR_H) + # codes_credit_imp + ou meme_variable(champ_evenement(R, code), 8TA) + ou meme_variable(champ_evenement(R, code), 8TB) + ou meme_variable(champ_evenement(R, code), 8TC) + ou meme_variable(champ_evenement(R, code), 8TE) + ou meme_variable(champ_evenement(R, code), 8TG) + ou meme_variable(champ_evenement(R, code), 8TH) + ou meme_variable(champ_evenement(R, code), 8TL) + ou meme_variable(champ_evenement(R, code), 8TO) + ou meme_variable(champ_evenement(R, code), 8TS) + ou meme_variable(champ_evenement(R, code), 8UW) + ou meme_variable(champ_evenement(R, code), 8UY) + ou meme_variable(champ_evenement(R, code), 8UZ) + alors + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + sinon_si positif(EST_ISF) alors + GLOBAL.TL_MF_MFIFI = GLOBAL.TL_MF_MFIFI + MF_DEF; + sinon + aiguillage (attribut(champ_evenement(R, code), cotsoc)) : ( + cas 2: GLOBAL.TL_MF_MFCDIS = GLOBAL.TL_MF_MFCDIS + MF_DEF; + cas 3: GLOBAL.TL_MF_MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA + MF_DEF; + cas 4: GLOBAL.TL_MF_MFCSAL = GLOBAL.TL_MF_MFCSAL + MF_DEF; + cas 5: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + cas 6: GLOBAL.TL_MF_MFGAIN = GLOBAL.TL_MF_MFGAIN + MF_DEF; + cas 7: GLOBAL.TL_MF_MFREGV = GLOBAL.TL_MF_MFREGV + MF_DEF; + cas 8: GLOBAL.TL_MF_MFCHR = GLOBAL.TL_MF_MFCHR + MF_DEF; + cas 9: GLOBAL.TL_MF_MFPCAP = GLOBAL.TL_MF_MFPCAP + MF_DEF; + cas 10 : + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + cas 11: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 12: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 13: + GLOBAL.TL_MF_MFRSE3 = GLOBAL.TL_MF_MFRSE3 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 14: + GLOBAL.TL_MF_MFRSE4 = GLOBAL.TL_MF_MFRSE4 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 16: GLOBAL.TL_MF_MFLOY = GLOBAL.TL_MF_MFLOY + MF_DEF; + cas 17: GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 18: + GLOBAL.TL_MF_MFGLO = GLOBAL.TL_MF_MFGLO + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 19: + GLOBAL.TL_MF_MFRSE5 = GLOBAL.TL_MF_MFRSE5 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 20: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 21: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 22: + GLOBAL.TL_MF_MFRSE7 = GLOBAL.TL_MF_MFRSE7 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 1: + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + par_defaut: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + ) + finsi + finsi + finsi +) + +cible recherche_cpena: +application: iliad; +arguments: CPENA, R; +variables_temporaires: PREM_RAPPEL, MONTANT_INITIAL, PRESENT_2042, MONTANT, TROUVE, NATURE; +PREM_RAPPEL = 0; +si present(D2042.champ_evenement(R, code)) alors + MONTANT_INITIAL = D2042.champ_evenement(R, code); + PRESENT_2042 = 1; +sinon + MONTANT_INITIAL = 0; + PRESENT_2042 = 0; +finsi +MONTANT = MONTANT_INITIAL; +TROUVE = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non (positif(GLOBAL.RETARD) et champ_evenement(RR, numero) = champ_evenement(PREM_RAPPEL, numero)) + et champ_evenement(RR, numero) <= champ_evenement(R, numero) + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(R, penalite) = champ_evenement(RR, penalite) + et champ_evenement(RR, sens) dans (SENS_R, SENS_C) + alors + MONTANT = MONTANT + champ_evenement(RR, montant); + TROUVE = 1; + finsi +) +si positif(TROUVE) alors + si MONTANT < champ_evenement(R, montant) alors + CPENA = 4; + sinon_si + positif(PRESENT_2042) + et MONTANT - MONTANT_INITIAL < champ_evenement(R, montant) + alors + CPENA = 5; + sinon + CPENA = 2; + finsi +sinon_si + (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) + et GLOBAL.CODE_PENA = champ_evenement(R, penalite) +alors + CPENA = 6; +sinon_si MONTANT < champ_evenement(R, montant) alors + si champ_evenement(R, penalite) != champ_evenement(R, anc_penalite) alors + CPENA = 6; + sinon + CPENA = 4; + finsi +sinon + CPENA = 5; +finsi +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si NATURE = N_CHARGE et CPENA dans (3, 4) alors + CPENA = 1; +finsi + +cible transf_rappels_prim: +application: iliad; +variables_temporaires: NATURE, SENS, PENALITE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, numero) >= 0 + et champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT + et non ( + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + ) + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_REVENU alors + SENS = SENS_R; + PENALITE = 99; + sinon_si NATURE = N_CHARGE alors + SENS = SENS_C; + PENALITE = 0; + sinon # interdit + SENS = SENS_R; # = 0 + PENALITE = 0; + finsi + champ_evenement(R, code) reference ANREV; + champ_evenement(R, montant) = 0; + champ_evenement(R, sens) = SENS; + champ_evenement(R, penalite) = PENALITE; + finsi +) + +cible transfo_pena_regco: +application: iliad; +arguments: R; +si meme_variable(champ_evenement(R, code), REGCO) alors + GLOBAL.PRESENT_REGCO = 1; + GLOBAL.PENALITE_REGCO = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_REGCO = champ_evenement(R, numero); + GLOBAL.NUM_RAP_REGCO = champ_evenement(R, rappel); + GLOBAL.IND_20_REGCO = champ_evenement(R, 2042_rect); +finsi + +fonction get_taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +fonction is_minoration_sf: +application: iliad; +arguments: INITIALE, COURANTE; +resultat: EST_MIN_SF; +si INITIALE = SF_MARIAGE ou INITIALE = SF_PACSE alors + EST_MIN_SF = COURANTE = SF_VEUVAGE_TRUE ou COURANTE = SF_PACSE; +sinon_si INITIALE = SF_VEUVAGE_TRUE alors + EST_MIN_SF = COURANTE = SF_MARIAGE ou COURANTE = SF_PACSE; +sinon + EST_MIN_SF = 1; +finsi + +fonction get_strate_pena: +application: iliad; +arguments: STR; +resultat: PENA; +aiguillage(STR):( + cas 0: PENA = 99; + cas 1 : PENA = -1; + cas 2 : + cas 3 : PENA = 6; + cas 4 : PENA = 12; + cas 5 : PENA = 32; + cas 6 : PENA = 31; + cas 7 : PENA = 5; + cas 8 : PENA = 4; + cas 9 : PENA = 35; + cas 10: PENA = 30; + cas 11: PENA = 11; + cas 12: PENA = 8; + cas 13: PENA = 55; + cas 14: PENA = 3; + cas 15: PENA = 17; + cas 16: PENA = 10; + cas 17: PENA = 7; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: PENA = 2; + cas 24: PENA = 22; + cas 25: PENA = 24; + par_defaut: PENA = -1; +) + +fonction get_strate_taux: +application: iliad; +arguments: STR; +resultat: TAUX; +aiguillage (STR) : ( + cas 0 : + cas 1 : TAUX = -1; + cas 2 : TAUX = 0; + cas 3 : TAUX = 100; + cas 4 : + cas 5 : + cas 6 : + cas 7 : + cas 8 : + cas 9 : TAUX = 80; + cas 10: + cas 11: + cas 12: + cas 13: + cas 14: TAUX = 40; + cas 15: + cas 16: + cas 17: TAUX = 10; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: + cas 24: + cas 25: TAUX = 0; + par_defaut: TAUX = -1; +) + +cible get_code_situation_famille: +application: iliad; +arguments: RESULTAT, CORR, VAR; +si meme_variable(VAR, 0AM) alors + RESULTAT = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RESULTAT = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RESULTAT = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RESULTAT = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si positif(CORR) et GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.ANNEE_REVENU alors + RESULTAT = SF_VEUVAGE_TRUE; + sinon + RESULTAT = SF_VEUVAGE_FALSE; + finsi +sinon + RESULTAT = SF_INVALIDE; +finsi + +cible is_rappel_strate: +application: iliad; +arguments: RESULTAT, R, S; +variables_temporaires: TAUX_STR, CODE_SIT_FAM, CORR; +si S = 0 alors + RESULTAT = ( + champ_evenement(R, penalite) = 99 + ou (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ); + si positif(RESULTAT) alors + GLOBAL.MAJO_TAUX_STRATE = get_taux_penalite(GLOBAL.CODE_PENA); + finsi +sinon_si S = 1 alors + RESULTAT = ( + dans_domaine(champ_evenement(R, code), saisie contexte) + et non positif(GLOBAL.IND_20_REGCO) + et non ( + meme_variable(champ_evenement(R, code), ANREV) + ou meme_variable(champ_evenement(R, code), ANCSDED) + ou meme_variable(champ_evenement(R, code), CALCULIR) + ou meme_variable(champ_evenement(R, code), IND_TRAIT) + ou meme_variable(champ_evenement(R, code), ROLCSG) + ) + ); + si positif(RESULTAT) alors + TAUX_STR = get_taux_penalite(GLOBAL.CODE_PENA); + si TAUX_STR != 0 alors + GLOBAL.MAJO_TAUX_STRATE = TAUX_STR; + finsi + si champ_evenement(R, penalite) != 0 alors + GLOBAL.MAJO_CODE_STRATE = champ_evenement(R, penalite); + finsi + finsi +sinon_si S = 2 alors + CORR = 0; + calculer cible get_code_situation_famille : avec CODE_SIT_FAM, CORR, champ_evenement(R, code); + si + GLOBAL.SF_COURANTE != SF_INVALIDE + et ( + CODE_SIT_FAM != SF_INVALIDE + ou ( + meme_variable(champ_evenement(R, code), 0DA) + ou meme_variable(champ_evenement(R, code), 0DB) + ) + ) + alors + RESULTAT = is_minoration_sf(GLOBAL.SF_INITIALE, GLOBAL.SF_COURANTE); + sinon + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + ou ( + positif(GLOBAL.DEFAUT) + et champ_evenement(R, sens) = SENS_R + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + ) + ); + finsi +sinon_si + champ_evenement(R, numero) = GLOBAL.NUM_EVT_REGCO + et meme_variable(champ_evenement(R, code), REGCO) +alors + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +sinon_si S = 18 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 19 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 20 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 21 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon_si S = 23 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +finsi + +cible get_strate: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: TROUVE; +si champ_evenement(R, sens) = SENS_P et champ_evenement(R, penalite) = 0 alors + RESULTAT = 24; +sinon + RESULTAT = -1; + iterer : variable S : entre 0..(GLOBAL.NB_STRATES - 1) increment 1 : dans ( + si RESULTAT = -1 alors + calculer cible is_rappel_strate : avec TROUVE, R, S; + si RESULTAT = -1 et positif(TROUVE) alors + RESULTAT = S; + finsi + finsi + ) +finsi + +fonction vers_mois: +application: iliad; +arguments: D; +resultat: M; +M = inf(D / 10000); + +fonction vers_annee: +application: iliad; +arguments: D; +resultat: A; +A = inf(D % 10000); + +fonction vers_date: +application: iliad; +arguments: M, A; +resultat: D; +D = inf(M) * 10000 + inf(A); + +cible traite_inr: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: MOIS_DEP, ANNEE_DEP, R_EVT; +GLOBAL.MENTION_EXP = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + alors + GLOBAL.MENTION_EXP = 1; + finsi +) +MOIS_DEP = 7; +ANNEE_DEP = GLOBAL.ANNEE_REVENU + 1; +R_EVT = -1; +iterer +: variable R +: entre (nb_evenements() - 1)..0 increment -1 +: dans ( + si R_EVT = -1 et champ_evenement(R, id_evt) = INDICE_EVT alors + R_EVT = R; + finsi +) +si R_EVT >= 0 alors + GLOBAL.INR_ANNEE_COR = vers_annee(champ_evenement(R_EVT, date)); + si vers_annee(champ_evenement(R_EVT, date)) < 2018 alors + GLOBAL.INR_NB_MOIS = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + GLOBAL.INR_NB_MOIS2 = 0; + sinon_si ANNEE_DEP > 2018 alors + GLOBAL.INR_NB_MOIS = 0; + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + sinon + GLOBAL.INR_NB_MOIS = 12 * (2018 - ANNEE_DEP) + (1 - MOIS_DEP); + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - 2018) + + vers_mois(champ_evenement(R_EVT, date)); + finsi +finsi + +cible is_rappel_abat_20: +application: iliad; +variables_temporaires: RESULTAT, R, NATURE, ABAT; +R = TMP_ARG1; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi +TMP_RES = RESULTAT; + +cible is_rappel_abat_20_proc: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: NATURE, ABAT; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi + + +cible est_code_sf_naiss: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, 0AM) ou meme_variable(VAR, 0AC) ou meme_variable(VAR, 0AD) + ou meme_variable(VAR, 0AO) ou meme_variable(VAR, 0AV) ou meme_variable(VAR, 0DA) + ou meme_variable(VAR, 0DB) +); + +cible is_rappel_autorise_maj: +application: iliad; +arguments: RESULTAT, R, MAJ; +variables_temporaires: EST_SF_NAISS, EST_TAX_INIT; +si MAJ = MAJ_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 10); +sinon_si MAJ = MAJ_NON_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 10); +sinon_si MAJ = MAJ_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 15); +sinon_si MAJ = MAJ_NON_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 15); +sinon_si MAJ = MAJ_RAPPEL_C alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + et GLOBAL.CODE_PENA != 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) > 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP01 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP22 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP24 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 24 + ); +sinon_si MAJ = MAJ_RAPPEL_F alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ); +sinon_si MAJ = MAJ_RAPPEL_NF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et (non positif(EST_SF_NAISS)) + ); +sinon_si MAJ = MAJ_RAPPEL_M alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + et (non positif(EST_SF_NAISS)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99)) + ) + ); +sinon_si MAJ = MAJ_RAPPEL_MF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = (champ_evenement(R, sens) = SENS_M et positif(EST_SF_NAISS)); +sinon_si MAJ = MAJ_RAPPEL_NON_M alors + RESULTAT = (champ_evenement(R, sens) != SENS_M); +sinon_si MAJ = MAJ_RAPPEL_P alors + RESULTAT = (champ_evenement(R, sens) = SENS_P); +sinon_si MAJ = MAJ_RAPPEL_R alors + RESULTAT = (champ_evenement(R, sens) = SENS_R); +sinon_si MAJ = MAJ_RAPPEL_R55 alors + RESULTAT = ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 99)) + ); +sinon_si MAJ = MAJ_1728 alors + RESULTAT = (champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31)); +sinon_si MAJ = MAJ_ABAT_20 alors + calculer cible is_rappel_abat_20_proc : avec RESULTAT, R; +sinon_si MAJ = MAJ_CODE_1729_2A5 alors + RESULTAT = (champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55)); +sinon_si MAJ = MAJ_CODE_1729_6 alors + RESULTAT = (champ_evenement(R, penalite) = 6); +sinon_si MAJ = MAJ_CODE_22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CODE_24 alors + RESULTAT = ( + champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CONTEXTE_22 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)); +sinon_si MAJ = MAJ_MENTION_EXP_99 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et (non positif(GLOBAL.DEFAUT)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_MENTION_EXP_99R alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et GLOBAL.CODE_PENA != 22 + et (non positif(GLOBAL.DEFAUT)) + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_NON_MENTION_EXP alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible is_rappel_autorise: +application: iliad; +arguments: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RES0, RES1, RES2, RES3; +RES0 = 1; +RES1 = 1; +RES2 = 1; +RES3 = 1; +si present(MAJ0) alors + calculer cible is_rappel_autorise_maj : avec RES0, R, MAJ0; +finsi +si present(MAJ1) alors + calculer cible is_rappel_autorise_maj : avec RES1, R, MAJ1; +finsi +si present(MAJ2) alors + calculer cible is_rappel_autorise_maj : avec RES2, R, MAJ2; +finsi +si present(MAJ3) alors + calculer cible is_rappel_autorise_maj : avec RES3, R, MAJ3; +finsi +RESULTAT = (RES0 et RES1 et RES2 et RES3); + +cible is_rappel_autorise_proc: +application: iliad; +variables_temporaires: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +R = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible is_rappel_autorise : avec RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +TMP_RES = RESULTAT; + +cible is_init_1731: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +calculer cible init_1731; +RESULTAT = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + RESULTAT = 1; + finsi +) + +cible calcul_majo_P: +application: iliad; +arguments: NB_RAPPELS_P; +si GLOBAL.MAJO_D2042_P_NB > 0 et NB_RAPPELS_P != 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_majo_d2042_p; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + si GLOBAL.MAJO_T_RABP != 0 alors + CORR.T_RABP = GLOBAL.MAJO_T_RABP; + CORR.T_RABP07 = GLOBAL.MAJO_T_RABP07; + CORR.T_RABP08 = GLOBAL.MAJO_T_RABP08; + CORR.T_RABP09 = GLOBAL.MAJO_T_RABP09; + CORR.T_RABP10 = GLOBAL.MAJO_T_RABP10; + CORR.T_RABP11 = GLOBAL.MAJO_T_RABP11; + CORR.T_RABP12 = GLOBAL.MAJO_T_RABP12; + CORR.T_RABP17 = GLOBAL.MAJO_T_RABP17; + CORR.T_RABP31 = GLOBAL.MAJO_T_RABP31; + finsi + si GLOBAL.MAJO_T_RABPPS != 0 alors + CORR.T_RABPPS = GLOBAL.MAJO_T_RABPPS; + CORR.T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07; + CORR.T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08; + CORR.T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09; + CORR.T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10; + CORR.T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11; + CORR.T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12; + CORR.T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17; + CORR.T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31; + finsi + si GLOBAL.MAJO_T_RABPCS != 0 alors + CORR.T_RABPCS = GLOBAL.MAJO_T_RABPCS; + CORR.T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07; + CORR.T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08; + CORR.T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09; + CORR.T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10; + CORR.T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11; + CORR.T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12; + CORR.T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17; + CORR.T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31; + finsi + si GLOBAL.MAJO_T_RABPRD != 0 alors + CORR.T_RABPRD = GLOBAL.MAJO_T_RABPRD; + CORR.T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07; + CORR.T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08; + CORR.T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09; + CORR.T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10; + CORR.T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11; + CORR.T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12; + CORR.T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17; + CORR.T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31; + finsi + si GLOBAL.MAJO_T_RABPCH != 0 alors + CORR.T_RABPCH = GLOBAL.MAJO_T_RABPCH; + CORR.T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07; + CORR.T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08; + CORR.T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09; + CORR.T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10; + CORR.T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11; + CORR.T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12; + CORR.T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17; + CORR.T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31; + finsi + si GLOBAL.MAJO_T_RABPLO != 0 alors + CORR.T_RABPLO = GLOBAL.MAJO_T_RABPLO; + CORR.T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07; + CORR.T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08; + CORR.T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09; + CORR.T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10; + CORR.T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11; + CORR.T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12; + CORR.T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17; + CORR.T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31; + finsi + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + CORR.FLAG_TRMAJOP = 1; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_TRMAJOP = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + calculer cible sauve_base_majo_corr; +finsi + +cible cumule_base_tl_aux: +application: iliad; +arguments: M_TL, M_TL_TBTC, R; +variables_temporaires: MONTANT, COMMENCE_PAR_7, CAT_TL; +calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); +si positif(COMMENCE_PAR_7) alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = champ_evenement(R, base_tl); +finsi +si champ_evenement(R, sens) != SENS_R alors + MONTANT = -MONTANT; +finsi +CAT_TL = attribut(champ_evenement(R, code), categorie_TL); +si CAT_TL = 40 alors + M_TL = MONTANT; + M_TL_TBTC = 0; +sinon_si CAT_TL = 50 alors + M_TL = 0; + M_TL_TBTC = MONTANT; +sinon + M_TL = 0; + M_TL_TBTC = 0; +finsi + +cible cumule_base_tl_init: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +si GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI alors + M_TL = 0; + M_TL_TBTC = 0; +sinon + calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +finsi +GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + M_TL_TBTC; + +cible cumule_champ_base_tl: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL = GLOBAL.TL_BASE_TL + M_TL; +GLOBAL.TL_BASE_TL_TBTC = GLOBAL.TL_BASE_TL_TBTC + M_TL_TBTC; + +cible cumule_champ_base_tl_rect: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL_RECT = GLOBAL.TL_BASE_TL_RECT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT + M_TL_TBTC; + +cible traite_majo_P: +application: iliad; +variables_temporaires: R, NATURE, PENA, COTSOC, MONTANT; +R = TMP_ARG1; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +PENA = champ_evenement(R, penalite); +COTSOC = attribut(champ_evenement(R, code), cotsoc); +MONTANT = champ_evenement(R, montant); +si + NATURE = N_REVENU + et ((7 <= PENA et PENA <= 12) ou PENA = 17 ou PENA = 31) +alors + si COTSOC = 1 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 5 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 9 alors + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 10 alors + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC dans (11, 12, 13, 14, 19, 20, 21) alors + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC = 16 alors + calculer cible add_majo_T_RABPLO : avec PENA, MONTANT; + sinon_si COTSOC = 18 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + finsi +finsi + +cible calculer_sommes_2042: +application: iliad; +arguments: R; +variables_temporaires: S, N, MONTANT; +S = attribut(champ_evenement(R, code), sanction); +calculer cible get_nature : avec N, champ_evenement(R, code); +si champ_evenement(R, sens) = SENS_R alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = -champ_evenement(R, montant); +finsi +si S = 1 alors + GLOBAL.INR_SOMMERF_2 = GLOBAL.INR_SOMMERF_2 + MONTANT; +finsi +si S = 2 ou S = 12 alors + GLOBAL.INR_SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2 + MONTANT; +finsi +si S = 3 ou S = 13 alors + GLOBAL.INR_SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2 + MONTANT; +finsi +si S = 4 ou S = 14 alors + GLOBAL.INR_SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2 + MONTANT; +finsi +si S = 5 ou S = 15 alors + GLOBAL.INR_SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2 + MONTANT; +finsi +si S = 6 ou S = 16 alors + GLOBAL.INR_SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2 + MONTANT; +finsi +si (1 <= S et S <= 8) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2 + MONTANT; +finsi +si (1 <= S et S <= 9) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMERI_2 = GLOBAL.INR_SOMMERI_2 + MONTANT; +finsi +si (1 <= S et S <= 6) ou S = 8 ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2 + MONTANT; +finsi +si S = 8 et N = N_REVENU alors + GLOBAL.INR_SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2 + MONTANT; +finsi +si S = 2 et N = N_REVENU alors + GLOBAL.INR_SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2 + MONTANT; +finsi +si S = 3 et N = N_REVENU alors + GLOBAL.INR_SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2 + MONTANT; +finsi +si S = 4 et N = N_REVENU alors + GLOBAL.INR_SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2 + MONTANT; +finsi + +cible calculer_sommes_2042_proc: +application: iliad; +variables_temporaires: R; +R = TMP_ARG1; +calculer cible calculer_sommes_2042 : avec R; + +cible maj_elt_2042: +application: iliad; +arguments: MONTANT_2042, R; +variables_temporaires: NATURE; +si + # codes_dates + meme_variable(MONTANT_2042, 0AX) + ou meme_variable(MONTANT_2042, 0AY) + ou meme_variable(MONTANT_2042, 0AZ) + ou meme_variable(MONTANT_2042, 9YD) + ou meme_variable(MONTANT_2042, 9YR) +alors + MONTANT_2042 = champ_evenement(R, montant); +sinon + calculer cible get_nature : avec NATURE, MONTANT_2042; + si NATURE = N_REVENU alors + si + champ_evenement(R, sens) = SENS_R + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + non (champ_evenement(R, sens) dans (SENS_M, SENS_C)) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi +finsi + +cible set_rappel: +application: iliad; +arguments: MONTANT, R; +variables_temporaires: NATURE; +si present(MONTANT) alors + calculer cible maj_elt_2042 : avec MONTANT, R; +sinon + calculer cible get_nature : avec NATURE, MONTANT; + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si NATURE = N_REVENU alors + MONTANT = - champ_evenement(R, montant); + sinon + MONTANT = champ_evenement(R, montant); + finsi + sinon + si + NATURE = N_REVENU + ou ( + # codes_dates + meme_variable(MONTANT, 0AX) + ou meme_variable(MONTANT, 0AY) + ou meme_variable(MONTANT, 0AZ) + ou meme_variable(MONTANT, 9YD) + ou meme_variable(MONTANT, 9YR) + ) + alors + MONTANT = champ_evenement(R, montant); + sinon + MONTANT = - champ_evenement(R, montant); + finsi + finsi +finsi + +cible met_a_jour_2042_INR_evt: +application: iliad; +arguments: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec INR_D2042.champ_evenement(R, code), R : espace GLOBAL; + si + non ( + positif(IS_PREMIER) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + et GLOBAL.CODE_9ZA = 0 + et champ_evenement(R, sens) != SENS_P + et ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + alors + calculer cible calculer_sommes_2042 : avec R; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) +si GLOBAL.NB_RAPPELS_RES > 0 alors + CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; + CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; + CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; + CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; + CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; + CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; + CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; + CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; + CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; + CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; + CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; + CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; + CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; +finsi + +cible met_a_jour_2042_INR_evt_proc: +application: iliad; +variables_temporaires: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_INR_evt +: avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +cible met_a_jour_2042_evt: +application: iliad; +arguments: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.TMP_ARG1 = R; + si F_TRAITEMENT = 1 alors + calculer cible cumule_champ_base_tl : espace GLOBAL; + sinon_si F_TRAITEMENT = 2 alors + calculer cible cumule_base_tl_init : espace GLOBAL; + sinon_si F_TRAITEMENT = 3 alors + calculer cible cumule_champ_base_tl_rect : espace GLOBAL; + sinon_si F_TRAITEMENT = 4 alors + calculer cible traite_majo_P : espace GLOBAL; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) + +cible met_a_jour_2042_evt_TL_D2042: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042; + +cible met_a_jour_2042_evt_TL_D2042_INIT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_INIT; + +cible met_a_jour_2042_evt_TL_D2042_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_RECT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT_INIT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT_INIT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT_RECT; + +cible met_a_jour_2042_evt_D2042_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace D2042_RECT; + +cible met_a_jour_2042_evt_D2042_ABAT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace D2042_ABAT; + +cible met_a_jour_2042_evt_MAJO_D2042_P: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_P; + +cible met_a_jour_2042_strate: +application: iliad; +arguments: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: NUM_PREM_RAPPEL, RAP_AUTH; +NUM_PREM_RAPPEL = champ_evenement(0, numero); +GLOBAL.NB_RAPPELS_RES = 0; +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, strate) = NUM_STRATE alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si + non ( + positif(GLOBAL.RETARD) + et champ_evenement(R, numero) = NUM_PREM_RAPPEL + ) + et positif(RAP_AUTH) + alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi + ) +) + +cible met_a_jour_2042_strate_MAJO_D2042_P: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_P; + +cible met_a_jour_2042_strate_MAJO_D2042_ABAT_P: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_ABAT_P; + +cible met_a_jour_2042_strate_MAJO_D2042_STRATE: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_STRATE; + +cible met_a_jour_2042_strate_MAJO_D2042_ABAT_STRATE: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_ABAT_STRATE; + +cible set_rappel_1731bis: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: MONTANT, NATURE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si + attribut(champ_evenement(R, code), sanction) = 9 + et ( + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et GLOBAL.CODE_PENA dans (3, 8, 11) + ) + ou ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + ) +alors + CORR.SOMMERI1731 = 1; +finsi +MONTANT = GLOBAL.champ_evenement(R, code) + 0; +si + (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C) + et (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) +alors + si + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 2, 3, 7, 8, 10, 11, 17, 18, 22, 24, 99 + ) + ) + ou champ_evenement(R, sens) = SENS_M + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_CHARGE alors + si MONTANT + champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_REVENU alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi +finsi +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et champ_evenement(R, sens) != SENS_C + ) +alors + si NATURE = N_REVENU alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22, 24, 99) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si NATURE = N_CHARGE alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans ( + 2, 3, 4, 5, 6, 7, 8, 10, 11, 17, 18, 22, 24, 30, 31, 32, 35, 55, 99 + ) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi + finsi +finsi + +cible set_rappel_1731bis_proc: +application: iliad; +variables_temporaires: R, IS_PREMIER; +R = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +calculer cible set_rappel_1731bis : avec R, IS_PREMIER; + +cible prepare_1731_aux: +application: iliad; +arguments: R, IS_PREMIER, MAJ_TGV_COPIE; +si positif(MAJ_TGV_COPIE) alors + calculer cible set_rappel_1731bis : avec R, IS_PREMIER; +finsi +si champ_evenement(R, penalite) = 30 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR30 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R30 = 1; + finsi +finsi +si champ_evenement(R, penalite) = 32 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR32 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R32 = 1; + finsi +finsi +si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 10 alors + GLOBAL.ART1731_PRESENT_R10 = 1; +finsi + +cible prepare_1731_aux_proc: +application: iliad; +variables_temporaires: R, IS_PREMIER, MAJ_TGV_COPIE; +R = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +MAJ_TGV_COPIE = TMP_ARG3; +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo_aux: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: NATURE, MAJ_TGV_COPIE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +MAJ_TGV_COPIE = ( + champ_evenement(R, sens) dans (SENS_M, SENS_C) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (1, 2, 7, 10, 17, 18, 22, 24, 99) + ) + ou ( + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 1, 2, 7, 10, 17, 18, 22, 24, 99, 3, + 4, 5, 6, 8, 11, 30, 31, 32, 35, 55 + ) + ) +); +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo: +application: iliad; +arguments: NUM_STRATE; +variables_temporaires: NUM_EVT_PREMIER, IS_PREMIER, NUM_STRATE_COURANTE; +NUM_EVT_PREMIER = champ_evenement(0, numero); +restaurer +: variable V +: categorie * +: espace GLOBAL +: apres ( + calculer cible empty_art1731; + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + IS_PREMIER = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + si positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C alors + IS_PREMIER = (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C); + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER; + finsi + ) + finsi + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + NUM_STRATE_COURANTE = champ_evenement(R, strate); + IS_PREMIER = champ_evenement(R, numero) = NUM_EVT_PREMIER; + si + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et NUM_STRATE_COURANTE <= NUM_STRATE + et champ_evenement(R, sens) != SENS_C + ) + ou ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et NUM_STRATE_COURANTE <= NUM_STRATE + ) + alors + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER; + finsi + ) + ) + calculer cible enchaine_calcul_prim; + calculer cible calcul_1731; +) + +cible prepare_1731_majo_proc: +application: iliad; +variables_temporaires: NUM_STRATE; +NUM_STRATE = TMP_ARG1; +calculer cible prepare_1731_majo : avec NUM_STRATE; + +cible calcul_inr_aux: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, FLG_INR; +variables_temporaires: FLAG, NINR; +calculer cible reset_saisie_calc; +calculer cible remplit_tgv_inr_d2042; +CORR.PASS_TLIR = CORR.TL_IR + 0; +CORR.PASS_TLIFI = CORR.TL_IFI + 0; +CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; +CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + alors + FLAG = 1; + finsi +) +CORR.FLAG_C22 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 2 + alors + FLAG = 1; + finsi +) +CORR.FLAG_C02 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 99 alors + FLAG = 1; + finsi +) +CORR.FLAG_99 = si (positif(FLAG)) alors (4) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 7 alors + FLAG = 1; + finsi +) +CORR.FLAG_07 = si (positif(FLAG)) alors (5) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 24 alors + FLAG = 1; + finsi +) +CORR.FLAG_24 = si (positif(FLAG)) alors (6) sinon (0) finsi; +NINR = 1; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + non ( + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 2 + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + ) + ) + alors + NINR = 0; + finsi +) +NINR = ((non positif(GLOBAL.DEFAUT)) et nb_evenements() != 0 et positif(NINR)); +CORR.FLAG_NINR = NINR; +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; +CORR.FLAG_9YT = GLOBAL.R_TARDIF; +CORR.FLAG_R99 = GLOBAL.SAUVE_INR_R99; +CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; +CORR.CODE_2042 = GLOBAL.CODE_PENA; +CORR.ANNEECOR = GLOBAL.INR_ANNEE_COR; +CORR.NBMOISI = GLOBAL.INR_NB_MOIS; +CORR.NBMOISI2 = GLOBAL.INR_NB_MOIS2; +CORR.NBMOIS2ISF = 0; +CORR.FLAG_INR = FLG_INR; +calculer cible enchaine_calcul_corr; +calculer cible signaler_erreurs; + +cible calcul_inr_aux_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, FLG_INR; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +FLG_INR = TMP_ARG3; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, FLG_INR; + +cible traite_tl: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +calculer cible mauvaise_foi : avec INDICE_EVT; +GLOBAL.TL_MF_MFCDIS = si (GLOBAL.TL_MF_MFCDIS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR = si (GLOBAL.TL_MF_MFCHR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR7 = si (GLOBAL.TL_MF_MFCHR7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCS = si (GLOBAL.TL_MF_MFCS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCSAL = si (GLOBAL.TL_MF_MFCSAL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCVN = si (GLOBAL.TL_MF_MFCVN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGAIN = si (GLOBAL.TL_MF_MFGAIN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGLO = si (GLOBAL.TL_MF_MFGLO > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIFI = si (GLOBAL.TL_MF_MFIFI > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIR = si (GLOBAL.TL_MF_MFIR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFLOY = si (GLOBAL.TL_MF_MFLOY > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFMCSG820 = si (GLOBAL.TL_MF_MFMCSG820 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPCAP = si (GLOBAL.TL_MF_MFPCAP > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPS = si (GLOBAL.TL_MF_MFPS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPSOL = si (GLOBAL.TL_MF_MFPSOL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRD = si (GLOBAL.TL_MF_MFRD > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFREGV = si (GLOBAL.TL_MF_MFREGV > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE1 = si (GLOBAL.TL_MF_MFRSE1 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE2 = si (GLOBAL.TL_MF_MFRSE2 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE3 = si (GLOBAL.TL_MF_MFRSE3 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE4 = si (GLOBAL.TL_MF_MFRSE4 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE5 = si (GLOBAL.TL_MF_MFRSE5 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE6 = si (GLOBAL.TL_MF_MFRSE6 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE7 = si (GLOBAL.TL_MF_MFRSE7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFTAXAGA = si (GLOBAL.TL_MF_MFTAXAGA > 0) alors (1) sinon (0) finsi; +si + GLOBAL.TL_MF_MFCDIS > 0 ou GLOBAL.TL_MF_MFCHR > 0 ou GLOBAL.TL_MF_MFCHR7 > 0 + ou GLOBAL.TL_MF_MFCS > 0 ou GLOBAL.TL_MF_MFCSAL > 0 ou GLOBAL.TL_MF_MFCVN > 0 + ou GLOBAL.TL_MF_MFGAIN > 0 ou GLOBAL.TL_MF_MFGLO > 0 ou GLOBAL.TL_MF_MFIFI > 0 + ou GLOBAL.TL_MF_MFIR > 0 ou GLOBAL.TL_MF_MFLOY > 0 ou GLOBAL.TL_MF_MFMCSG820 > 0 + ou GLOBAL.TL_MF_MFPCAP > 0 ou GLOBAL.TL_MF_MFPS > 0 ou GLOBAL.TL_MF_MFPSOL > 0 + ou GLOBAL.TL_MF_MFRD > 0 ou GLOBAL.TL_MF_MFREGV > 0 ou GLOBAL.TL_MF_MFRSE1 > 0 + ou GLOBAL.TL_MF_MFRSE2 > 0 ou GLOBAL.TL_MF_MFRSE3 > 0 ou GLOBAL.TL_MF_MFRSE4 > 0 + ou GLOBAL.TL_MF_MFRSE5 > 0 ou GLOBAL.TL_MF_MFRSE6 > 0 ou GLOBAL.TL_MF_MFRSE7 > 0 + ou GLOBAL.TL_MF_MFTAXAGA > 0 +alors + GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI; +sinon_si GLOBAL.TL_NON_ACQUISE != TL_TL_DEFAUT_2042 alors + GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +finsi +si + non ( + positif(GLOBAL.DEFAUT) + ou (positif(GLOBAL.RETARD) et positif(IS_PREMIER)) + ) +alors + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_RAPPEL_NON_M; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_RAPPEL_C; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_MENTION_EXP_99; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL_RECT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_MENTION_EXP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_RECT; +finsi + +cible traite_tl_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + +cible is_def_ret_not_8_11: +application: iliad; +arguments: RESULTAT, R; +RESULTAT = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (8, 11) + ) +); + +cible is_code_rappel_13: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et non positif(EST_SF_NAISS) + ) +); + +cible is_code_rappel_12: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 24 + ) +); + +cible is_code_rappel_11: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)) + ou ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_C + ou ( + champ_evenement(R, sens) = SENS_R + et meme_variable(champ_evenement(R, code), REGCO) + ) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et positif(HAS_C22R02) + ) + ) + ) + ) + ) +); + +cible is_code_rappel_10: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) + ou ( + positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (22, 24) + ) + ) + ) +); + +cible is_code_rappel_09: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (22, 24) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) + ) + ) +); + +cible is_code_rappel_08: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_07: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_06: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, HAS_C22R02; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 10 + et champ_evenement(R, penalite) dans (22, 24) + et ( + ( + champ_evenement(R, sens) = SENS_C + et non positif(HAS_C22R02) + ) + ou champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_05: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) +); + +cible is_code_rappel_04: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + ( + champ_evenement(R, sens) = SENS_C + et ( + ( + # is_rappel_1728_X + champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31) + ) + ou champ_evenement(R, penalite) = 6 + ou ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ou ( + champ_evenement(R, penalite) = 22 + et attribut(champ_evenement(R, code), categorie_TL) = 10 + et positif(HAS_C22R02) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) = 6 + ou ( + ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + ) + ) + ) + ) +); + +cible is_code_rappel_03: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) +); + +cible is_code_rappel_02: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + positif(EST_SF_NAISS) + et ( + (champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1) + ou (champ_evenement(R, sens) = SENS_M et positif(GLOBAL.MENTION_EXP)) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + et GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_C + et GLOBAL.CODE_PENA != 22 + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + ) +); + +cible is_code_rappel_01: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non positif(IS_PREMIER) + et ( + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et positif(GLOBAL.MENTION_EXP) + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) + ) + ) +); + +cible prepare_1731_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, CAS_INR; +variables_temporaires: NUM_PREM_RAPPEL_EVT, NUM_EVT_PREMIER, PREM_EVT, IS_CODE, MAJ_TGV_COPIE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si non present(NUM_PREM_RAPPEL_EVT) et champ_evenement(R, id_evt) = INDICE_EVT alors + NUM_PREM_RAPPEL_EVT = champ_evenement(R, numero); + finsi +) +NUM_EVT_PREMIER = champ_evenement(0, numero); +restaurer : variable V : categorie * : espace GLOBAL : apres ( + calculer cible empty_art1731; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= NUM_PREM_RAPPEL_EVT alors + PREM_EVT = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + IS_CODE = 0; + MAJ_TGV_COPIE = 0; + calculer cible is_code_rappel_13 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 13 et positif(IS_CODE))); + calculer cible is_code_rappel_12 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 12 et positif(IS_CODE))); + calculer cible is_code_rappel_11 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 11 et positif(IS_CODE))); + calculer cible is_code_rappel_10 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 10 et positif(IS_CODE))); + calculer cible is_code_rappel_09 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 9 et positif(IS_CODE))); + calculer cible is_code_rappel_08 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 8 et positif(IS_CODE))); + calculer cible is_code_rappel_07 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 7 et positif(IS_CODE))); + calculer cible is_code_rappel_06 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 6 et positif(IS_CODE))); + calculer cible is_code_rappel_05 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 5 et positif(IS_CODE))); + calculer cible is_code_rappel_04 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 4 et positif(IS_CODE))); + calculer cible is_code_rappel_03 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 3 et positif(IS_CODE))); + calculer cible is_code_rappel_02 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 2 et positif(IS_CODE))); + calculer cible is_code_rappel_01 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 1 et positif(IS_CODE))); + calculer cible prepare_1731_aux : avec R, PREM_EVT, MAJ_TGV_COPIE; + finsi + ) + calculer cible enchaine_calcul_prim; + calculer cible calcul_1731; +) + +cible prepare_1731_inr_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, CAS_INR; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +CAS_INR = TMP_ARG3; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + +cible calcul_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: DEFAUT_RETARD_PREMIER, HAS_C22R02, MAJ0, MAJ1, MAJ2, MAJ3, INR_FLAG, CAS_INR; +DEFAUT_RETARD_PREMIER = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) +); +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_PROV_ANT.VAR = VAR; +) +si INDICE_EVT < 2 alors + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable VAR + : categorie saisie * + : espace INR_D2042_R9901_ANT + : dans ( + INR_D2042.VAR = VAR; + ) + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_r9901_corr; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_R9901_ANT.VAR = VAR; +) +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 1; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_HR_corr; +CORR.REF1731 = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_REFR99R_ANT.VAR = VAR; +) + +si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_R55; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 2; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ref_corr; +CORR.REF1731 = 0; +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + CAS_INR = 3; + calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_ntl_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat98_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_2A5; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +si (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 4; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 5; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_intertl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CONTEXTE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 6; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 7; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_CODE_24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_RAPPEL_CP24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 8; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl24_corr; + +CAS_INR = 9; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_1729_2A5; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 10; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_CONTEXTE_22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 11; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 12; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl24_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_NF; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 13; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_inter22_corr; + +cible calcul_inr_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + +cible traite_reference: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3; +si + non ( + ( + positif(GLOBAL.DEFAUT) # positif(GLOBAL.RETARD) + ou positif(GLOBAL.RETARD) + ) + et positif(IS_PREMIER) + ) +alors + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_ABAT; +finsi + +cible traite_reference_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + +cible calcul_majo_normal: +application: iliad; +arguments: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +variables_temporaires: TAUX_PENALITE; +TAUX_PENALITE = get_strate_taux(NUM_STRATE); +si TAUX_PENALITE = -1 alors + TAUX_PENALITE = GLOBAL.MAJO_TAUX_STRATE; +finsi +si NUM_STRATE = 0 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + GLOBAL.MAJO_PREM_STR = 1; + GLOBAL.MAJO_NB_STR_TR = 0; +finsi +si + (NB_RAPPELS_STRATE != 0 et GLOBAL.MAJO_D2042_STRATE_NB > 0) + ou NUM_STRATE = GLOBAL.NB_STRATES - 1 +alors + # if taux_penalite < 0 then failwith "Taux pénalite négatif"; + calculer cible reset_saisie_calc; + CORR.FLAG_1STRATE = GLOBAL.MAJO_PREM_STR; + calculer cible remplit_tgv_majo_d2042_strate; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + calculer cible set_majo_str_tr : avec NUM_STRATE; + CORR.X = NUM_STRATE; + CORR.TAUX_STRATE = TAUX_PENALITE; + CORR.FLAG_NBSTRTR = GLOBAL.MAJO_NB_STR_TR; + CORR.FLAG_DERSTTR = GLOBAL.MAJO_DERN_STR_TR; + CORR.CSTRATE1 = GLOBAL.MAJO_CODE_STRATE; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; + CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; + CORR.FLAG_RECTIF = GLOBAL.RECTIF; + CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; + CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.TARDIFEVT2 = GLOBAL.MAJO_TARDIF_EVT2; + si positif(GLOBAL.RETARD) et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) alors + CORR.CSTRATE99 = GLOBAL.CODE_PENA; + finsi + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.TAUX_2042 = get_taux_penalite(GLOBAL.CODE_PENA); + calculer cible detecte_penalites; + si NUM_STRATE = 1 alors + calculer cible unset_majo_str_tr : avec NUM_STRATE; + calculer cible affect_code; + finsi + calculer cible affect_str_tr; + si + NUM_STRATE = GLOBAL.NB_STRATES - 1 + et positif(GLOBAL.RETARD) + et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) + alors + CORR.FLAG_TRDEGTR = GLOBAL.CODE_PENA; + sinon + CORR.FLAG_TRDEGTR = 0; + finsi + calculer cible init_1731; + calculer cible prepare_1731_majo : avec PROCHAINE_STRATE; + calculer cible enchaine_calcul_corr; + si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + finsi + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + GLOBAL.MAJO_DERN_STR_TR = NUM_STRATE; + GLOBAL.MAJO_PREM_STR = 0; + GLOBAL.MAJO_NB_STR_TR = GLOBAL.MAJO_NB_STR_TR + 1; +finsi +si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; +finsi + +cible calcul_majo_normal_proc: +application: iliad; +variables_temporaires: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +NUM_STRATE = TMP_ARG3; +NB_RAPPELS_STRATE = TMP_ARG4; +PROCHAINE_STRATE = TMP_ARG5; +calculer cible calcul_majo_normal +: avec IS_PREMIER, INDICE_EVT, NUM_STRATE, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + +cible calcul_majo_tardif: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +variables_temporaires: STRATE_0; +si GLOBAL.D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible init_1731; + STRATE_0 = 0; + calculer cible prepare_1731_majo : avec STRATE_0; + calculer cible remplit_tgv_d2042; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + CORR.TAUX_2042 = TAUX_PENALITE; + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.FLAG_TRTARDIF = 1; + CORR.FLAG_1STRATE = 0; + CORR.FLAG_DERSTTR = 0; + calculer cible affect_code; + calculer cible affect_str_tr; + calculer cible detecte_penalites; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + calculer cible sauve_base_anterieure_corr; + CORR.FLAG_TRTARDIF = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; +finsi +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo_tardif_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +NUM_STRATE = TMP_ARG3; +TAUX_PENALITE = TMP_ARG4; +calculer cible calcul_majo_tardif +: avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; + +cible calcul_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: + NUM_STRATE, TAUX_PENALITE, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3, + NB_RAPPELS_P, NB_RAPPELS_STRATE, PROCHAINE_STRATE; +si non positif(GLOBAL.RETARD) alors + calculer cible clear_majo_str_tr; +finsi +calculer cible remplit_tgv_d2042_rect; +calculer cible enchaine_calcul_corr; +si present(CORR.IRBASE) alors + CORR.IRBASE2042_FIC = CORR.IRBASE; +finsi +si present(CORR.IRBASE_I) alors + CORR.IRBASE_IRECT = CORR.IRBASE_I; +finsi +si present(CORR.CSBASE_MAJO) alors + CORR.CSBASE2042_FIC = CORR.CSBASE_MAJO; +finsi +si present(CORR.RDBASE_MAJO) alors + CORR.RDBASE2042_FIC = CORR.RDBASE_MAJO; +finsi +si present(CORR.PSBASE_MAJO) alors + CORR.PSBASE2042_FIC = CORR.PSBASE_MAJO; +finsi +si present(CORR.TAXABASE_MAJO) alors + CORR.TAXABASE2042_FIC = CORR.TAXABASE_MAJO; +finsi +si present(CORR.TAXABASE_I) alors + CORR.TAXABASE_IRECT = CORR.TAXABASE_I; +finsi +si present(CORR.CSALBASE_MAJO) alors + CORR.CSALBASE2042_FIC = CORR.CSALBASE_MAJO; +finsi +si present(CORR.CDISBASE_MAJO) alors + CORR.CDISBASE2042_FIC = CORR.CDISBASE_MAJO; +finsi +si present(CORR.CAPBASE_MAJO) alors + CORR.CAPBASE2042_FIC = CORR.CAPBASE_MAJO; +finsi +si present(CORR.CAPBASE_I) alors + CORR.CAPBASE_IRECT = CORR.CAPBASE_I; +finsi +si present(CORR.HRBASE_MAJO) alors + CORR.HRBASE2042_FIC = CORR.HRBASE_MAJO; +finsi +si present(CORR.HRBASE_I) alors + CORR.HRBASE_IRECT = CORR.HRBASE_I; +finsi +si present(CORR.GAINBASE_MAJO) alors + CORR.GAINBASE2042_FIC = CORR.GAINBASE_MAJO; +finsi +si present(CORR.RSE1BASE_MAJO) alors + CORR.RSE1BASE2042_FIC = CORR.RSE1BASE_MAJO; +finsi +si present(CORR.RSE2BASE_MAJO) alors + CORR.RSE2BASE2042_FIC = CORR.RSE2BASE_MAJO; +finsi +si present(CORR.RSE3BASE_MAJO) alors + CORR.RSE3BASE2042_FIC = CORR.RSE3BASE_MAJO; +finsi +si present(CORR.RSE4BASE_MAJO) alors + CORR.RSE4BASE2042_FIC = CORR.RSE4BASE_MAJO; +finsi +si present(CORR.RSE5BASE_MAJO) alors + CORR.RSE5BASE2042_FIC = CORR.RSE5BASE_MAJO; +finsi +si present(CORR.RSE6BASE_MAJO) alors + CORR.RSE6BASE2042_FIC = CORR.RSE6BASE_MAJO; +finsi +si present(CORR.RSE8BASE_MAJO) alors + CORR.RSE8BASE2042_FIC = CORR.RSE8BASE_MAJO; +finsi +si present(CORR.CVNBASE_MAJO) alors + CORR.CVNBASE2042_FIC = CORR.CVNBASE_MAJO; +finsi +si present(CORR.GLOBASE_MAJO) alors + CORR.GLOBASE2042_FIC = CORR.GLOBASE_MAJO; +finsi +si present(CORR.PSOLBASE_MAJO) alors + CORR.PSOLBASE2042_FIC = CORR.PSOLBASE_MAJO; +finsi +si present(CORR.C820BASE_MAJO) alors + CORR.C820BASE2042_FIC = CORR.C820BASE_MAJO; +finsi +si present(CORR.IFI4BASE) alors + CORR.IFI4BASE2042_FIC = CORR.IFI4BASE; +finsi +si + positif(IS_PREMIER) + et (non positif(GLOBAL.DEFAUT)) + et positif(GLOBAL.RETARD) +alors + TAUX_PENALITE = get_taux_penalite(GLOBAL.CODE_PENA); + NUM_STRATE = GLOBAL.MAJO_NUM_STRATE; + calculer cible calcul_majo_tardif + : avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +sinon + ID_TRAIT = ID_TRAITE_MAJO_P; + MAJ0 = MAJ_RAPPEL_P; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NB_RAPPELS_P = GLOBAL.NB_RAPPELS_RES; + + NUM_STRATE = 0; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 1; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 0; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + NUM_STRATE = 1; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + si NB_RAPPELS_P != 0 alors + calculer cible calcul_cum_p; + finsi + calculer cible calcul_majo_P : avec NB_RAPPELS_P; + calculer cible clear_majo_str_tr; + iterer + : variable NUM_STR + : entre 0 ..(GLOBAL.NB_STRATES + 0 - 1) increment 1 + : dans ( + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + si NUM_STR = 0 alors + PROCHAINE_STRATE = champ_evenement(0, strate); + sinon + PROCHAINE_STRATE = indefini; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + (non present(PROCHAINE_STRATE)) + et champ_evenement(R, strate) = NUM_STR + alors + PROCHAINE_STRATE = champ_evenement(R, strate); + finsi + ) + si non present(PROCHAINE_STRATE) alors + PROCHAINE_STRATE = champ_evenement(nb_evenements() - 1, strate); + finsi + finsi + ) + si NUM_STR dans (20, 21, 22) alors + MAJ0 = MAJ_TL; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + sinon + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + finsi + NB_RAPPELS_STRATE = GLOBAL.NB_RAPPELS_RES; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_STRATE; + GLOBAL.MAJO_NUM_STRATE = NUM_STR; + calculer cible calcul_majo_normal + : avec IS_PREMIER, INDICE_EVT, NUM_STR, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + ) +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +calculer cible sauve_base_majo_corr; +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + +cible recherche_CR02: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: C0, R0, C1, R1, IM41, PREM_R02, NUM_EVT, NUM_RAP; +C0 = 0; +R0 = 0; +C1 = 0; +R1 = 0; +IM41 = 0; +PREM_R02 = 1; +NUM_EVT = 0; +NUM_RAP = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, penalite) = 2 + alors + si + champ_evenement(RR, sens) = SENS_C + et non positif(champ_evenement(RR, 2042_rect)) + alors + C0 = C0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et non positif(champ_evenement(RR, 2042_rect)) + alors + R0 = R0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_C + et positif(champ_evenement(RR, 2042_rect)) + alors + C1 = C1 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + alors + R1 = R1 + champ_evenement(RR, montant); + finsi + finsi + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + et positif(PREM_R02) + alors + PREM_R02 = 0; + NUM_EVT = champ_evenement(RR, numero); + NUM_RAP = champ_evenement(RR, rappel); + finsi + IM41 = ( + positif(IM41) + ou ( + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et ( + champ_evenement(RR, penalite) != 2 + ou ( + champ_evenement(RR, penalite) = 2 + et non positif(champ_evenement(RR, 2042_rect)) + ) + ) + et champ_evenement(RR, sens) dans (SENS_C, SENS_M) + et (non positif(PREM_R02)) + et ( + champ_evenement(RR, numero) > NUM_EVT + ou ( + champ_evenement(RR, numero) = NUM_EVT + et champ_evenement(RR, rappel) > NUM_RAP + ) + ) + ) + ); +) +si positif(IM41) alors + RESULTAT = 3; +sinon_si positif(champ_evenement(R, 2042_rect)) et C1 > R1 alors + RESULTAT = 2; +sinon_si (non positif(champ_evenement(R, 2042_rect))) et C0 > R0 alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible recherche_CR02_proc: +application: iliad; +variables_temporaires: RESULTAT, R; +R = TMP_ARG1; +calculer cible recherche_CR02 : avec RESULTAT, R; +TMP_RES = RESULTAT; + +cible is_code_situation_famille: +application: iliad; +arguments: RES_SF, VAR; +si meme_variable(VAR, 0AM) alors + RES_SF = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RES_SF = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RES_SF = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RES_SF = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.ANNEE_REVENU alors + RES_SF = SF_VEUVAGE_TRUE; + sinon + RES_SF = SF_VEUVAGE_FALSE; + finsi +sinon + RES_SF = SF_INVALIDE; +finsi + +cible is_code_situation_famille_r: +application: iliad; +variables_temporaires: SF, R; +R = TMP_ARG1; +calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); +TMP_RES = SF; + +cible traite_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: RAP_SF, RAP_DA, RAP_DB, PENALITE, SF, STR; +RAP_SF = indefini; +RAP_DA = indefini; +RAP_DB = indefini; +PENALITE = -1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); + si SF != SF_INVALIDE alors + si + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) + ) + alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si + GLOBAL.SF_INITIALE dans (SF_MARIAGE, SF_VEUVAGE_TRUE, SF_PACSE) + alors + RAP_SF = R; + finsi + sinon + GLOBAL.SF_COURANTE = SF; + PENALITE = champ_evenement(R, penalite); + finsi + sinon_si positif(IS_PREMIER) alors + GLOBAL.SF_INITIALE = SF; + finsi + finsi + si meme_variable(champ_evenement(R, code), 0DA) alors + RAP_DA = R; + finsi + si meme_variable(champ_evenement(R, code), 0DB) alors + RAP_DB = R; + finsi + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +si PENALITE >= 0 alors + si present(RAP_SF) alors + champ_evenement(RAP_SF, penalite) = PENALITE; + finsi + si present(RAP_DA) alors + champ_evenement(RAP_DA, penalite) = PENALITE; + finsi + si present(RAP_DB) alors + champ_evenement(RAP_DB, penalite) = PENALITE; + finsi +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) <= INDICE_EVT alors + calculer cible get_strate : avec STR, R; + champ_evenement(R, strate) = STR; + sinon + champ_evenement(R, strate) = -1; + finsi +) +si positif(GLOBAL.DEFAUT) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042_CTXT + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + finsi + ) +sinon_si positif(GLOBAL.RETARD) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace MAJO_D2042_REF_ABAT + : dans ( + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + ) +sinon + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) +finsi + +cible traite_majo_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + +cible controle: +application: iliad; +arguments: QUELLE_SP, INDICE_EVT; +variables_temporaires: NATURE, ELEM_2042, MONTANT_2042, NAT_RECH, COMMENCE_PAR_5; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si QUELLE_SP = 0 alors + ELEM_2042 = D2042.champ_evenement(R, code); + sinon + ELEM_2042 = INR_D2042.champ_evenement(R, code); + finsi + MONTANT_2042 = ELEM_2042 + 0; + si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) != 0 alors + calculer cible recherche_cpena : avec NAT_RECH, R; + sinon + NAT_RECH = 0; + finsi + si NAT_RECH = 5 alors + nettoie_erreurs_finalisees; + leve_erreur A72207; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, penalite) = 32 + et non meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A045; + calculer cible signaler_erreur_ano; + finsi + si + non (champ_evenement(R, penalite) dans (0, 32)) + et meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A044; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) != SENS_M + et non (champ_evenement(R, penalite) dans (0, 7, 8, 10, 11, 17, 18, 99)) + alors + si meme_variable(champ_evenement(R, code), 8VW) alors + nettoie_erreurs_finalisees; + leve_erreur A042; + calculer cible signaler_erreur_ano; + sinon_si meme_variable(champ_evenement(R, code), 8VV) alors + nettoie_erreurs_finalisees; + leve_erreur A041; + calculer cible signaler_erreur_ano; + finsi + finsi + si + non (champ_evenement(R, penalite) dans (30, 35, 99)) + et meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A046; + calculer cible signaler_erreur_ano; + finsi + calculer cible alias_commence_par_5 : avec COMMENCE_PAR_5, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 31 + et ( + meme_variable(champ_evenement(R, code), 5QM) + ou meme_variable(champ_evenement(R, code), 5RM) + ou non positif(COMMENCE_PAR_5) + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A048; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) = SENS_M + et champ_evenement(R, penalite) != 0 + et non meme_variable(champ_evenement(R, code), REGCO) + alors + nettoie_erreurs_finalisees; + leve_erreur A970; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XT > GLOBAL.NUM_EVT_9XU alors + nettoie_erreurs_finalisees; + leve_erreur A96903; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XU > GLOBAL.NUM_EVT_9XT alors + nettoie_erreurs_finalisees; + leve_erreur A96904; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XT = 0 et GLOBAL.MONTANT_9XU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96803; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XU = 0 et GLOBAL.MONTANT_9XT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96804; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YT > GLOBAL.NUM_EVT_9YU alors + nettoie_erreurs_finalisees; + leve_erreur A96901; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YU > GLOBAL.NUM_EVT_9YT alors + nettoie_erreurs_finalisees; + leve_erreur A96902; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YT = 0 et GLOBAL.MONTANT_9YU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96801; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YU = 0 et GLOBAL.MONTANT_9YT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96802; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 0 alors + nettoie_erreurs_finalisees; + leve_erreur A971; + calculer cible signaler_erreur_ano; + finsi + si present(ELEM_2042) alors + si + type(champ_evenement(R, code), BOOLEEN) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et champ_evenement(R, numero) = champ_evenement(0, numero) + ) + alors + si NATURE = N_REVENU alors + si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + sinon_si NATURE = N_CHARGE alors + si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + finsi + finsi + finsi + si + NAT_RECH dans (0, 6) + et NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + et NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_P et non present(ELEM_2042) alors + nettoie_erreurs_finalisees; + leve_erreur A721; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + alors + si + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, montant) > MONTANT_2042 + alors + si champ_evenement(R, penalite) = 99 alors + nettoie_erreurs_finalisees; + leve_erreur A72204; + calculer cible signaler_erreur_ano; + sinon + nettoie_erreurs_finalisees; + leve_erreur A72201; + calculer cible signaler_erreur_ano; + finsi + finsi + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_M + et ( + non present(ELEM_2042) + ou champ_evenement(R, montant) > MONTANT_2042 + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A72202; + calculer cible signaler_erreur_ano; + finsi + CORR.V_FLAG8OT = positif(GLOBAL.COD8OT + 0); + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + et present(ELEM_2042) + et champ_evenement(R, montant) > MONTANT_2042 + alors + nettoie_erreurs_finalisees; + leve_erreur A72203; + calculer cible signaler_erreur_ano; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_P) + et champ_evenement(R, penalite) dans (9, 12) + et vers_annee(champ_evenement(R, date)) >= 2006 + alors + nettoie_erreurs_finalisees; + leve_erreur A724; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et champ_evenement(R, numero) != champ_evenement(0, numero) + et champ_evenement(R, penalite) = 22 + et non positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A725; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et non ( + # codes_sf + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + et champ_evenement(R, penalite) != 99 + et positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A726; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, numero) = champ_evenement(nb_evenements() - 1, numero) + et champ_evenement(R, sens) dans (SENS_R, SENS_C, SENS_M) + alors + calculer cible recherche_CR02 : avec NAT_RECH, R; + si NAT_RECH = 2 alors + nettoie_erreurs_finalisees; + leve_erreur A72301; + calculer cible signaler_erreur_ano; + sinon_si NAT_RECH = 3 et non positif(GLOBAL.ISF_PRIM) alors + leve_erreur IM41; + finalise_erreurs; + finsi + finsi + finsi +) + +cible controle_proc: +application: iliad; +variables_temporaires: QUELLE_SP, INDICE_EVT; +QUELLE_SP = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible controle : avec QUELLE_SP, INDICE_EVT; + +cible make_2042_of_tgv: +application: iliad; +arguments: VAR; +variables_temporaires: SF; +si present(GLOBAL.VAR) alors + calculer cible is_code_situation_famille : avec SF, VAR; + si SF != SF_INVALIDE alors + GLOBAL.SF_INITIALE = SF; + finsi + si meme_variable(VAR, RJLJ) et GLOBAL.VAR != 0 alors + GLOBAL.CORR_RJLJ = 1; + finsi + D2042.VAR = GLOBAL.VAR; + GLOBAL.D2042_NB = GLOBAL.D2042_NB + 1; +finsi + +cible is_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +variables_temporaires: EST_ISF; +calculer cible est_code_isf : avec EST_ISF, VAR; +si positif(EST_ISF) alors + RESULTAT = ( + PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99) + ); +sinon + RESULTAT = ( + PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99) + ); +finsi + + +cible prepare_reference: +application: iliad; +variables_temporaires: + MAKE_2042, MONTANT, NATURE, LEVE_A989, EST_ISF, PENA, EST_RAPPEL_1728; +si non (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9XT)) alors + iterer + : variable VAR + : categorie saisie famille + : avec present(VAR) + : espace GLOBAL + : dans ( + SF_PRIMITIF = 1; + ) +finsi +GLOBAL.D2042_NB = 0; +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = ( + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + ou dans_domaine(VAR, saisie variation) + ); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) + : espace D2042 + : dans ( + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + ) +sinon + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + D2042_CTXT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = (dans_domaine(VAR, saisie revenu)); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + si present(VAR) alors + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + D2042_CTXT.VAR = VAR; + MAJO_D2042_REF_ABAT.VAR = VAR; + sinon + MAJO_D2042_REF_ABAT.VAR = indefini; + finsi + ) + si positif(GLOBAL.PRESENT_9YT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + si non (GLOBAL.MONTANT_9YT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9YT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + si non (GLOBAL.MONTANT_9XT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9XT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, id_evt) = 0 alors + si present(D2042.champ_evenement(R, code)) alors + MONTANT = D2042.champ_evenement(R, code) + champ_evenement(R, montant); + si + type(champ_evenement(R, code), BOOLEEN) + et non (MONTANT dans (0, 1)) + alors + MONTANT = D2042.champ_evenement(R, code); + finsi + sinon + MONTANT = champ_evenement(R, montant); + finsi + D2042.champ_evenement(R, code) = MONTANT; + D2042_RECT.champ_evenement(R, code) = MONTANT; + si positif(GLOBAL.RETARD) et champ_evenement(R, penalite) = 7 alors + D2042_ABAT.champ_evenement(R, code) = MONTANT; + MAJO_D2042_REF_ABAT.champ_evenement(R, code) = MONTANT; + finsi + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, penalite) = 0; + finsi + finsi + ) +finsi +LEVE_A989 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si LEVE_A989 = 0 alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + PENA = champ_evenement(R, penalite); + calculer cible is_rappel_1728 + : avec EST_RAPPEL_1728, PENA, champ_evenement(R, code); + si positif(EST_ISF) et positif(EST_RAPPEL_1728) alors + si + (positif(GLOBAL.ISF_PRIM) et GLOBAL.CODE_PENA_ISF = 1) + ou ((non positif(GLOBAL.ISF_PRIM)) et GLOBAL.CODE_PENA_ISF = 0) + alors + GLOBAL.CODE_PENA_ISF = champ_evenement(R, penalite); + finsi + si + non ( + champ_evenement(R, penalite) dans (1, 2, 3, 22, 99, GLOBAL.CODE_PENA_ISF) + ) + alors + LEVE_A989 = 1; + finsi + finsi + finsi +) +si positif(LEVE_A989) alors + nettoie_erreurs_finalisees; + leve_erreur A989; + calculer cible signaler_erreur_ano; +finsi + +cible calcul_aux: +application: iliad; +variables_temporaires: + HUIT, PENA_0DA, EST_TAX_INIT, VERIF_CODE, + QUELLE_SP, INDICE_EVT_CTRL, ANO_994_1, ANO_994_2, + IS_PREMIER, IS_DERNIER, EXISTE_SENS_RC; +GLOBAL.SAUVE_INR_R99 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si GLOBAL.SAUVE_INR_R99 = 0 alors + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 99 + alors + GLOBAL.SAUVE_INR_R99 = 1; + finsi + finsi +) +HUIT = 0; +PENA_0DA = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si meme_variable(champ_evenement(R, code), 9ZA) alors + GLOBAL.CODE_9ZA = (champ_evenement(R, montant) = 1); + finsi + HUIT = (positif(HUIT) ou champ_evenement(R, penalite) = 8); + si champ_evenement(R, penalite) = 18 alors + champ_evenement(R, penalite) = 7; + sinon_si champ_evenement(R, penalite) = 34 alors + si non positif(HUIT) alors + CORR.V_FLAGR34 = 1; + finsi + champ_evenement(R, penalite) = 8; + sinon_si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 99; + sinon_si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 0; + sinon_si champ_evenement(R, penalite) = 24 alors + CORR.V_FLAGANO726 = 1; + CORR.V_FLAGR24 = 1; + sinon_si champ_evenement(R, penalite) = 22 alors + CORR.V_FLAGR22 = 1; + finsi + si + meme_variable(champ_evenement(R, code), 0DA) + et champ_evenement(R, sens) = SENS_R + et (3 <= champ_evenement(R, penalite) et champ_evenement(R, penalite) <= 98) + alors + PENA_0DA = champ_evenement(R, penalite); + finsi + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + champ_evenement(R, sens) = SENS_M + et non ( + meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + alors + CORR.V_FLAGMENC = 1; + GLOBAL.FLAGMENC = 1; + champ_evenement(R, sens) = SENS_C; + champ_evenement(R, penalite) = 0; + sinon_si + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = PENA_0DA + et non (champ_evenement(R, penalite) dans (2, 22)) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_CODE, R; + si positif(VERIF_CODE) alors + champ_evenement(R, penalite) = 0; + finsi + finsi +) +calculer cible controle_defaut_retard_2042; +GLOBAL.PREM_8_11 = 1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si positif(GLOBAL.PREM_8_11) alors + si + non ( + champ_evenement(R, id_evt) != 0 + ou champ_evenement(R, penalite) dans (8, 11) + ) + alors + GLOBAL.PREM_8_11 = 0; + finsi + finsi +) +GLOBAL.PREM_8_11 = ( + (GLOBAL.PREM_8_11 ou GLOBAL.MONTANT_9XT dans (8, 11)) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) +); +CORR.PREM8_11 = GLOBAL.PREM_8_11; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ou positif(EST_TAX_INIT) + alors + GLOBAL.RECTIF = 0; + finsi + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) dans (1, 99) + alors + GLOBAL.RECTIF_MAJO = 1; + finsi + si + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et ( + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ) + alors + champ_evenement(R, date) = champ_evenement(0, date); + finsi + si + champ_evenement(R, penalite) = 30 + et non meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A047; + calculer cible signaler_erreur_ano; + finsi +) +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (vers_annee(champ_evenement(R1, date)) < vers_annee(champ_evenement(R2, date))) alors (1) + sinon (si (vers_annee(champ_evenement(R1, date)) > vers_annee(champ_evenement(R2, date))) alors (0) + sinon (si (vers_mois(champ_evenement(R1, date)) < vers_mois(champ_evenement(R2, date))) alors (1) + sinon (si (vers_mois(champ_evenement(R1, date)) > vers_mois(champ_evenement(R2, date))) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + calculer cible prepare_reference; + calculer cible prepare_tl; + calculer cible prepare_majo; + calculer cible prepare_inr; + QUELLE_SP = 0; + INDICE_EVT_CTRL = 0; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible denature_rappels; + ANO_994_1 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_1) alors + si + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + alors + ANO_994_1 = 1; + finsi + finsi + ) + ANO_994_2 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_2) alors + si + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22) + alors + ANO_994_2 = 1; + finsi + finsi + ) + GLOBAL.PENA_994 = (positif(ANO_994_1) et positif(ANO_994_2)); + CORR.PENA994 = GLOBAL.PENA_994; + CORR.V_FLAGMENC = 0; + iterer + : variable INDICE_EVT + : entre 0..GLOBAL.MAX_ID_EVT increment 1 + : dans ( + IS_PREMIER = (INDICE_EVT = 0); + IS_DERNIER = (INDICE_EVT = GLOBAL.MAX_ID_EVT); + CORR.V_FLAGR22 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR22) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 22 + alors + CORR.V_FLAGR22 = 1; + finsi + finsi + ) + CORR.V_FLAGR24 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR24) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 24 + alors + CORR.V_FLAGR24 = 1; + finsi + finsi + ) + calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_inr : avec INDICE_EVT; + calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + CORR.FLAGPREM = IS_PREMIER; + GLOBAL.FLAGPREM = IS_PREMIER; + si positif(IS_DERNIER) alors + CORR.FLAGDERNIE = IS_DERNIER; + GLOBAL.FLAGDERNIE = IS_DERNIER; + finsi + calculer cible init_1731; + EXISTE_SENS_RC = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(EXISTE_SENS_RC) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + EXISTE_SENS_RC = 1; + finsi + finsi + ) + si positif(EXISTE_SENS_RC) alors + CORR.ART1731BIS = 0; + GLOBAL.ART1731BIS = 0; + finsi + iterer + : variable VAR + : categorie calculee + : espace CORR + : dans ( + VAR = indefini; + ) + si positif(GLOBAL.FLAGMENC) alors + CORR.FLAGMENC = 1; + finsi + calculer cible calcul_tl : avec IS_PREMIER; + calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + si + positif(IS_DERNIER) + ou ( + positif(IS_PREMIER) + et non positif(GLOBAL.DEFAUT) + et positif(GLOBAL.RETARD) + ) + alors + calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + finsi + si + positif(IS_DERNIER) + et positif(GLOBAL.PRESENT_8VV) + et positif(GLOBAL.PRESENT_8VW) + et CORR.RE168 + 0 > 0 + et CORR.TAX1649 + 0 > 0 + alors + nettoie_erreurs_finalisees; + leve_erreur A043; + calculer cible signaler_erreur_ano; + finsi + si non positif(IS_DERNIER) alors + QUELLE_SP = 1; + INDICE_EVT_CTRL = INDICE_EVT + 1; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible sauve_base_anterieure_cor_corr; + si positif(IS_PREMIER) alors + calculer cible sauve_base_premier_corr; + finsi + finsi + CORR.V_FLAGR22 = 0; + CORR.V_FLAGR24 = 0; + ) +) + +cible nb_transf_2042_rappels: +application: iliad; +variables_temporaires: EST_ISF; +iterer +: variable VAR +: categorie saisie revenu, saisie revenu corrective, saisie variation, saisie penalite, calculee * +: avec present(VAR) +: espace CORR +: dans ( + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + finsi +) + +cible prepare_rappels: +application: iliad; +variables_temporaires: FIN, MOIS, ANNEE; +GLOBAL.DATEINR = 0; +CORR.DATEINR = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YA) + et champ_evenement(R, numero) != champ_evenement(nb_evenements() - 1, numero) + alors + nettoie_erreurs_finalisees; + leve_erreur A99302; + calculer cible signaler_erreur_ano; + finsi + si + type(champ_evenement(R, code), BOOLEEN) + et non (champ_evenement(R, montant) dans (0, 1)) + alors + nettoie_erreurs_finalisees; + leve_erreur A910; + calculer cible signaler_erreur_ano; + finsi +) +calculer cible set_rappel_ifi_prim; +FIN = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(FIN) + et meme_variable(champ_evenement(R, code), REGCO) + alors + calculer cible transfo_pena_regco : avec R; + si present(GLOBAL.REGCO) alors + si GLOBAL.REGCO - champ_evenement(R, montant) < 0 alors + champ_evenement(R, sens) = SENS_R; + champ_evenement(R, montant) = champ_evenement(R, montant) - GLOBAL.REGCO; + sinon + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, montant) = GLOBAL.REGCO - champ_evenement(R, montant); + finsi + FIN = 1; + finsi + finsi +) +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 8VV) alors + GLOBAL.PRESENT_8VV = 1; + sinon_si meme_variable(champ_evenement(R, code), 8VW) alors + GLOBAL.PRESENT_8VW = 1; + sinon_si meme_variable(champ_evenement(R, code), 9YT) alors + GLOBAL.PRESENT_9YT = 1; + si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9YT = 7; + sinon + GLOBAL.MONTANT_9YT = champ_evenement(R, montant); + finsi + GLOBAL.PENALITE_9YT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YT = champ_evenement(R, numero); + CORR.CMAJ2 = champ_evenement(R, montant); + GLOBAL.CMAJ2 = champ_evenement(R, montant); + si GLOBAL.MONTANT_9YT != 0 alors + GLOBAL.SENS_9YT = champ_evenement(R, sens); + GLOBAL.IND_20_9YT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9YT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9YU) alors + GLOBAL.PRESENT_9YU = 1; + GLOBAL.MONTANT_9YU = champ_evenement(R, montant); + GLOBAL.PENALITE_9YU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YU = champ_evenement(R, numero); + GLOBAL.SENS_9YU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + CORR.DATEINR = ANNEE * 10000 + MOIS * 100 + 1; + GLOBAL.DATEINR = CORR.DATEINR; + CORR.MOISAN2 = champ_evenement(R, montant); + GLOBAL.MOISAN2 = champ_evenement(R, montant); + GLOBAL.DATE_9YU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9YU)) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 9XT) alors + GLOBAL.PRESENT_9XT = 1; + si champ_evenement(R, montant) = 34 alors + GLOBAL.MONTANT_9XT = 8; + sinon_si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9XT = 7; + sinon + GLOBAL.MONTANT_9XT = champ_evenement(R, montant); + finsi + si champ_evenement(R, montant) = 34 alors + CORR.V_FLAGR34 = 1; + finsi + GLOBAL.PENALITE_9XT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XT = champ_evenement(R, numero); + si GLOBAL.MONTANT_9XT != 0 alors + GLOBAL.SENS_9XT = champ_evenement(R, sens); + GLOBAL.IND_20_9XT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9XT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9XU) alors + GLOBAL.PRESENT_9XU = 1; + GLOBAL.MONTANT_9XU = champ_evenement(R, montant); + GLOBAL.PENALITE_9XU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XU = champ_evenement(R, numero); + GLOBAL.SENS_9XU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + GLOBAL.DATE_9XU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9XT) ou positif(GLOBAL.PRESENT_9XU)) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + alors + champ_evenement(R, numero) = -1; + sinon + si + positif(GLOBAL.PRESENT_9YT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9YT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + si + positif(GLOBAL.PRESENT_9XT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9XT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + finsi +) +NB_RAPPELS = nb_evenements(); +NB_NOUVEAUX_RAPPELS = 0; +si + positif(GLOBAL.PRESENT_9YT) + et positif(GLOBAL.PRESENT_9YU) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi +si + positif(GLOBAL.PRESENT_9XT) + et positif(GLOBAL.PRESENT_9XU) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi + +cible set_id_evt: +application: iliad; +variables_temporaires: ID_EVT, NUM_EVT, NUM; +ID_EVT = 0; +GLOBAL.MAX_ID_EVT = 0; +NUM_EVT = champ_evenement(0, numero); +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + NUM = champ_evenement(R, numero); + si NUM != NUM_EVT alors + ID_EVT = ID_EVT + 1; + GLOBAL.MAX_ID_EVT = ID_EVT; + NUM_EVT = NUM; + finsi + champ_evenement(R, id_evt) = ID_EVT; +) + +cible test_9YT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9YT dans (0, 7, 8, 10, 11, 17, 18)) + et positif(CORR.APPLI_ILIAD + 0) + et ( + positif(CORR.CALCULIR + 0) + ou ( + (CORR.NOTRAIT + 0) dans (16, 23, 26, 33, 36, 43, 46, 53, 56) + ) + ) +); + +cible test_9XT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9XT dans (0, 7, 8, 10, 11, 17, 18, 34)) + et positif(CORR.APPLI_ILIAD + 0) + et (positif(CORR.CALCULIR + 0) ou CORR.NOTRAIT + 0 >= 16) +); + +cible test_mois_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = (CORR.NOTRAIT + 0 >= 16 et vers_mois(GLOBAL.DATE_9XU) <= 12); + +cible test_an_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + vers_annee(GLOBAL.DATE_9XU) = 0 + ou ( + vers_annee(GLOBAL.DATE_9XU) > GLOBAL.ANNEE_REVENU + et vers_annee(GLOBAL.DATE_9XU) < GLOBAL.ANNEE_REVENU + 7 + ) +); + +cible transf_2042_rappels: +application: iliad; +variables_temporaires: NUM_RAP, EST_ISF; +NUM_RAP = 0; +iterer +: variable VAR +: categorie * +: avec present(VAR) +: espace CORR +: dans ( + si dans_domaine(VAR, saisie famille) alors + GLOBAL.SF_PRIMITIF = 1; + sinon_si dans_domaine(VAR, saisie contexte) alors + GLOBAL.VAR = VAR; + sinon + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.VAR = indefini; + GLOBAL.ISF_PRIM = 0; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9XT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9XU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9XT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9XT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.VAR = indefini; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9YT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9YU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9YT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9YT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + finsi + finsi +) + +cible prepare_rappels_puis_calcul: +application: iliad; +variables_temporaires: TEST_9YT, TEST_9XT, TEST_MOIS_9XU, TEST_AN_9XU; +arranger_evenements +: ajouter NB_NOUVEAUX_RAPPELS +: dans ( + iterer + : variable R + : entre NB_RAPPELS..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, numero) = -1; + ) + NOUVEAU_RAPPEL = NB_RAPPELS; + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + si GLOBAL.MONTANT_9YT != 0 et GLOBAL.MONTANT_9YU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + si GLOBAL.MONTANT_9XT != 0 et GLOBAL.MONTANT_9XU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + + arranger_evenements + : trier R1, R2 : avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi + : filtrer R : avec + champ_evenement(R, numero) >= 0 + : dans ( + calculer cible set_id_evt; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, strate) = -1; + ) + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + calculer cible test_9YT : avec TEST_9YT; + si non positif(TEST_9YT) alors + nettoie_erreurs_finalisees; + leve_erreur A96102; + calculer cible signaler_erreur_ano; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + calculer cible test_9XT : avec TEST_9XT; + si non positif(TEST_9XT) alors + nettoie_erreurs_finalisees; + leve_erreur A96103; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_mois_9XU : avec TEST_MOIS_9XU; + si non positif(TEST_MOIS_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96303; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_an_9XU : avec TEST_AN_9XU; + si non positif(TEST_AN_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96304; + calculer cible signaler_erreur_ano; + finsi + finsi + calculer cible calcul_aux; + ) +) + +cible range_rappel: +application: iliad; +arguments: R; +calculer cible reset_codes_rappel; +CORR.PEN_RAPPEL = champ_evenement(R, penalite); +calculer cible verif_cohe_horizontale_corr; +calculer cible reset_codes_rappel; +si nb_anomalies() + nb_discordances() + nb_informatives() > 0 alors + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +finsi + +cible calcul_avec_rappels: +application: iliad; +variables_temporaires: TROUVE_0AZ; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible range_rappel : avec R; +) +TROUVE_0AZ = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(TROUVE_0AZ) + et meme_variable(champ_evenement(R, code), 0AZ) + alors + GLOBAL.ANNEE_DECES_CONJOINT = champ_evenement(R, montant); + TROUVE_0AZ = 1; + finsi +) +calculer cible prepare_rappels; +calculer cible prepare_rappels_puis_calcul; + +cible calcul: +application: iliad; +calculer cible init_variables; +iterer +: variable VAR +: categorie * +: espace GLOBAL +: dans ( + CORR.VAR = VAR; +) +CORR.IND_TRAIT = 5; # correctif +si nb_evenements() = 0 alors + arranger_evenements + : ajouter 1 + : dans ( + champ_evenement(0, rappel) = 1; + champ_evenement(0, numero) = 1; + champ_evenement(0, code) reference ANREV; + champ_evenement(0, sens) = SENS_R; + champ_evenement(0, montant) = 0; + champ_evenement(0, penalite) = 1; + champ_evenement(0, base_tl) = 0; + champ_evenement(0, date) = vers_date(1, GLOBAL.ANNEE_REVENU + 1); + champ_evenement(0, 2042_rect) = 0; + champ_evenement(0, anc_penalite) = 0; + champ_evenement(0, id_evt) = -1; + champ_evenement(0, strate) = -1; + calculer cible calcul_avec_rappels; + ) +sinon + calculer cible calcul_avec_rappels; +finsi +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) + +#{ tester l'existence des attributs dans les fonctions attribut(...), + meme_variable(...), dans_domaine(...) }# +#{ contrôler les espaces dans l'usage des références }# +#{ dans_espace(...), dans_tableau(...) }# +#{ tester si la variable d'itération existe déjà ailleurs }# +#{ compléter exec_verif avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ cas des tableaux statiques avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ déplacer les expansions dans mir.ml }# + diff --git a/m_ext/2023/main.m b/m_ext/2023/main.m new file mode 100644 index 000000000..f75dbb6f3 --- /dev/null +++ b/m_ext/2023/main.m @@ -0,0 +1,25 @@ +# primitif iterpréteur + +cible enchaineur_primitif: +application: iliad; +GLOBAL.IND_TRAIT = 4; # primitif +GLOBAL.ANCSDED = ANREV + 1; +calculer cible enchaine_verification_prim; +si nb_anomalies() = 0 alors + calculer cible calcul_primitif_isf_prim; + calculer cible verif_calcul_primitive_isf_prim; + calculer cible enchaine_calcul_prim; +finsi +# finalise_erreurs; +# exporte_erreurs; + +cible enchaineur_correctif: +application: iliad; +calculer cible calcul; + +cible enchainement_primitif_interpreteur: +application: iliad; +V_IND_TRAIT = 4; # primitif +calculer cible enchainement_primitif; +exporte_erreurs; + diff --git a/m_ext/2024/cibles.m b/m_ext/2024/cibles.m index f90ac2b3a..7a32d22d2 100644 --- a/m_ext/2024/cibles.m +++ b/m_ext/2024/cibles.m @@ -1,5 +1,267 @@ # compir +espace_variables CORR : categorie saisie, calculee, base; +espace_variables D2042 : categorie saisie; +espace_variables D2042_ABAT : categorie saisie; +espace_variables D2042_RECT : categorie saisie; +espace_variables D2042_CTXT : categorie saisie; +espace_variables TL_D2042 : categorie saisie; +espace_variables TL_D2042_INIT : categorie saisie; +espace_variables TL_D2042_RECT : categorie saisie; +espace_variables TL_D2042_ABAT : categorie saisie; +espace_variables TL_D2042_ABAT_INIT : categorie saisie; +espace_variables TL_D2042_ABAT_RECT : categorie saisie; +espace_variables INR_D2042 : categorie saisie; +espace_variables INR_D2042_PROV_ANT : categorie saisie; +espace_variables INR_D2042_REFR99R_ANT : categorie saisie; +espace_variables INR_D2042_R9901_ANT : categorie saisie; +espace_variables MAJO_D2042_STRATE : categorie saisie; +espace_variables MAJO_D2042_REF_ABAT : categorie saisie; +espace_variables MAJO_D2042_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_STRATE : categorie saisie; + +NB_STRATES : calculee primrest = 0 : "" ; +MODE_CORR : saisie environnement toto = 0 alias EST_CORR : "" ; + +# Données globales +PRESENT_8VV : calculee primrest = 0 : "" ; +PRESENT_8VW : calculee primrest = 0 : "" ; +PRESENT_9YT : calculee primrest = 0 : "" ; +MONTANT_9YT : calculee primrest = 0 : "" ; +PENALITE_9YT : calculee primrest = 0 : "" ; +SENS_9YT : calculee primrest = 0 : "" ; +NUM_EVT_9YT : calculee primrest = 0 : "" ; +IND_20_9YT : calculee primrest = 0 : "" ; +BASE_TL_9YT : calculee primrest = 0 : "" ; +PRESENT_9YU : calculee primrest = 0 : "" ; +MONTANT_9YU : calculee primrest = 0 : "" ; +PENALITE_9YU : calculee primrest = 0 : "" ; +SENS_9YU : calculee primrest = 0 : "" ; +NUM_EVT_9YU : calculee primrest = 0 : "" ; +DATE_9YU : calculee primrest = 0 : "" ; +PRESENT_9XT : calculee primrest = 0 : "" ; +MONTANT_9XT : calculee primrest = 0 : "" ; +PENALITE_9XT : calculee primrest = 0 : "" ; +SENS_9XT : calculee primrest = 0 : "" ; +NUM_EVT_9XT : calculee primrest = 0 : "" ; +IND_20_9XT : calculee primrest = 0 : "" ; +BASE_TL_9XT : calculee primrest = 0 : "" ; +PRESENT_9XU : calculee primrest = 0 : "" ; +MONTANT_9XU : calculee primrest = 0 : "" ; +PENALITE_9XU : calculee primrest = 0 : "" ; +SENS_9XU : calculee primrest = 0 : "" ; +NUM_EVT_9XU : calculee primrest = 0 : "" ; +DATE_9XU : calculee primrest = 0 : "" ; +PRESENT_REGCO : calculee primrest = 0 : "" ; +PENALITE_REGCO : calculee primrest = 0 : "" ; +NUM_EVT_REGCO : calculee primrest = 0 : "" ; +NUM_RAP_REGCO : calculee primrest = 0 : "" ; +IND_20_REGCO : calculee primrest = 0 : "" ; +PREMIER_EVT : calculee primrest = 0 : "" ; +CODE_9ZA : calculee primrest = 0 : "" ; +SAUVE_INR_R99 : calculee primrest = 0 : "" ; +ANNEE_DECES_CONJOINT : calculee primrest = 0 : "" ; +NB_RAPPELS_RES : calculee primrest = 0 : "" ; + +# sommes inr 2 +INR_SOMMEBAND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBA_2 : calculee primrest = 0 : "" ; +INR_SOMMEBICND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBIC_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNCND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNC_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBAL_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBND_2 : calculee primrest = 0 : "" ; +INR_SOMMELOC_2 : calculee primrest = 0 : "" ; +INR_SOMMEMOND_2 : calculee primrest = 0 : "" ; +INR_SOMMERCM_2 : calculee primrest = 0 : "" ; +INR_SOMMERF_2 : calculee primrest = 0 : "" ; +INR_SOMMERI_2 : calculee primrest = 0 : "" ; + +# Données de Reference +D2042_NB : calculee primrest = 0 : "" ; +DEFAUT : calculee primrest = 0 : "" ; +DEFAUT10 : calculee primrest = 0 : "" ; +DEFAUT11 : calculee primrest = 0 : "" ; +DEFAUT1011 : calculee primrest = 0 : "" ; +RETARD : calculee primrest = 0 : "" ; +RETARD07 : calculee primrest = 0 : "" ; +RETARD08 : calculee primrest = 0 : "" ; +RETARD0718 : calculee primrest = 0 : "" ; +RETARD101718 : calculee primrest = 0 : "" ; +RETARD22 : calculee primrest = 0 : "" ; +RETARD99 : calculee primrest = 0 : "" ; +RECTIF : calculee primrest = 0 : "" ; +RECTIF_MAJO : calculee primrest = 0 : "" ; +MENTION_EXP : calculee primrest = 0 : "" ; +CORR_RJLJ : calculee primrest = 0 : "" ; +CODE_PENA : calculee primrest = 0 : "" ; +CODE_PENA_ISF : calculee primrest = 0 : "" ; +DATE : calculee primrest = 0 : "" ; +SF_INITIALE : calculee primrest = 0 : "" ; +SF_COURANTE : calculee primrest = 0 : "" ; +SF_PRIMITIF : calculee primrest = 0 : "" ; +R_TARDIF : calculee primrest = 0 : "" ; +LIMELIGHT : calculee primrest = 0 : "" ; +ISF_PRIM : calculee primrest = 0 : "" ; +PRESENT_R10 : calculee primrest = 0 : "" ; +PRESENT_R30 : calculee primrest = 0 : "" ; +PRESENT_R32 : calculee primrest = 0 : "" ; +PREM_8_11 : calculee primrest = 0 : "" ; +PENA_994 : calculee primrest = 0 : "" ; +FLAGMENC : calculee primrest = 0 : "" ; + +# tl +TL_D2042_NB : calculee primrest = 0 : "" ; +TL_D2042_INIT_NB : calculee primrest = 0 : "" ; +TL_D2042_RECT_NB : calculee primrest = 0 : "" ; +TL_BASE_TL : calculee primrest = 0 : "" ; +TL_BASE_TL_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_RECT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_RECT : calculee primrest = 0 : "" ; +TL_NON_ACQUISE : calculee primrest = 0 : "" ; + +# tl mauvaise foi +TL_MF_MFCDIS : calculee primrest = 0 : "" ; +TL_MF_MFCHR : calculee primrest = 0 : "" ; +TL_MF_MFCHR7 : calculee primrest = 0 : "" ; +TL_MF_MFCS : calculee primrest = 0 : "" ; +TL_MF_MFCSAL : calculee primrest = 0 : "" ; +TL_MF_MFCVN : calculee primrest = 0 : "" ; +TL_MF_MFGAIN : calculee primrest = 0 : "" ; +TL_MF_MFGLO : calculee primrest = 0 : "" ; +TL_MF_MFIFI : calculee primrest = 0 : "" ; +TL_MF_MFIR : calculee primrest = 0 : "" ; +TL_MF_MFLOY : calculee primrest = 0 : "" ; +TL_MF_MFMCSG820 : calculee primrest = 0 : "" ; +TL_MF_MFPCAP : calculee primrest = 0 : "" ; +TL_MF_MFPS : calculee primrest = 0 : "" ; +TL_MF_MFPSOL : calculee primrest = 0 : "" ; +TL_MF_MFRD : calculee primrest = 0 : "" ; +TL_MF_MFREGV : calculee primrest = 0 : "" ; +TL_MF_MFRSE1 : calculee primrest = 0 : "" ; +TL_MF_MFRSE2 : calculee primrest = 0 : "" ; +TL_MF_MFRSE3 : calculee primrest = 0 : "" ; +TL_MF_MFRSE4 : calculee primrest = 0 : "" ; +TL_MF_MFRSE5 : calculee primrest = 0 : "" ; +TL_MF_MFRSE6 : calculee primrest = 0 : "" ; +TL_MF_MFRSE7 : calculee primrest = 0 : "" ; +TL_MF_MFTAXAGA : calculee primrest = 0 : "" ; + +# inr +INR_NB_MOIS : calculee primrest = 0 : "" ; +INR_NB_MOIS2 : calculee primrest = 0 : "" ; +INR_NB_MOIS_ISF : calculee primrest = 0 : "" ; +INR_ANNEE_COR : calculee primrest = 0 : "" ; +INR_PASDINR : calculee primrest = 0 : "" ; + +# majo +MAJO_D2042_STRATE_NB : calculee primrest = 0 : "" ; +MAJO_D2042_P_NB : calculee primrest = 0 : "" ; +MAJO_TAUX_STRATE : calculee primrest = 0 : "" ; +MAJO_CODE_STRATE : calculee primrest = 0 : "" ; +MAJO_TARDIF_EVT2 : calculee primrest = 0 : "" ; +MAJO_STR_TR_00 : calculee primrest = 0 : "" ; +MAJO_STR_TR_01 : calculee primrest = 0 : "" ; +MAJO_STR_TR_02 : calculee primrest = 0 : "" ; +MAJO_STR_TR_03 : calculee primrest = 0 : "" ; +MAJO_STR_TR_04 : calculee primrest = 0 : "" ; +MAJO_STR_TR_05 : calculee primrest = 0 : "" ; +MAJO_STR_TR_06 : calculee primrest = 0 : "" ; +MAJO_STR_TR_07 : calculee primrest = 0 : "" ; +MAJO_STR_TR_08 : calculee primrest = 0 : "" ; +MAJO_STR_TR_09 : calculee primrest = 0 : "" ; +MAJO_STR_TR_10 : calculee primrest = 0 : "" ; +MAJO_STR_TR_11 : calculee primrest = 0 : "" ; +MAJO_STR_TR_12 : calculee primrest = 0 : "" ; +MAJO_STR_TR_13 : calculee primrest = 0 : "" ; +MAJO_STR_TR_14 : calculee primrest = 0 : "" ; +MAJO_STR_TR_15 : calculee primrest = 0 : "" ; +MAJO_STR_TR_16 : calculee primrest = 0 : "" ; +MAJO_STR_TR_17 : calculee primrest = 0 : "" ; +MAJO_STR_TR_18 : calculee primrest = 0 : "" ; +MAJO_STR_TR_19 : calculee primrest = 0 : "" ; +MAJO_STR_TR_20 : calculee primrest = 0 : "" ; +MAJO_STR_TR_21 : calculee primrest = 0 : "" ; +MAJO_STR_TR_22 : calculee primrest = 0 : "" ; +MAJO_STR_TR_23 : calculee primrest = 0 : "" ; +MAJO_STR_TR_24 : calculee primrest = 0 : "" ; +MAJO_STR_TR_25 : calculee primrest = 0 : "" ; +MAJO_PREM_STR : calculee primrest = 0 : "" ; +MAJO_NB_STR_TR : calculee primrest = 0 : "" ; +MAJO_DERN_STR_TR : calculee primrest = 0 : "" ; +MAJO_NUM_STRATE : calculee primrest = 0 : "" ; + +# prorata +MAJO_T_RABP : calculee primrest = 0 : "" ; +MAJO_T_RABP07 : calculee primrest = 0 : "" ; +MAJO_T_RABP08 : calculee primrest = 0 : "" ; +MAJO_T_RABP09 : calculee primrest = 0 : "" ; +MAJO_T_RABP10 : calculee primrest = 0 : "" ; +MAJO_T_RABP11 : calculee primrest = 0 : "" ; +MAJO_T_RABP12 : calculee primrest = 0 : "" ; +MAJO_T_RABP17 : calculee primrest = 0 : "" ; +MAJO_T_RABP31 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS : calculee primrest = 0 : "" ; +MAJO_T_RABPPS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS : calculee primrest = 0 : "" ; +MAJO_T_RABPCS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD : calculee primrest = 0 : "" ; +MAJO_T_RABPRD07 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD08 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD09 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD10 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD11 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD12 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD17 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH : calculee primrest = 0 : "" ; +MAJO_T_RABPCH07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH31 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO : calculee primrest = 0 : "" ; +MAJO_T_RABPLO07 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO08 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO09 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO10 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO11 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO12 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO17 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO31 : calculee primrest = 0 : "" ; + +# art1731 +ART1731_SOMME_R3032 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R10 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R30 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R32 : calculee primrest = 0 : "" ; + +# rappels +NB_RAPPELS : calculee primrest = 0 : "" ; +NB_NOUVEAUX_RAPPELS : calculee primrest = 0 : "" ; +NOUVEAU_RAPPEL : calculee primrest = 0 : "" ; + cible regle_1: application: iliad; BIDON = 1; @@ -798,7 +1060,7 @@ puis_quand nb_discordances() + nb_informatives() = 0 faire puis_quand nb_anomalies() = 0 faire calculer cible exporte_si_non_bloquantes; calculer cible ir_calcul_primitif_isf; - finalise_erreurs; +# finalise_erreurs; calculer cible enchaine_calcul; finalise_erreurs; calculer cible exporte_si_non_bloquantes; @@ -810,10 +1072,166 @@ puis_quand nb_anomalies() = 0 faire calculer cible trace_out; #afficher_erreur "]traite_double_liquidation2\n"; -# primitif iterpréteur +# ??? + +cible traite_double_liquidation_2_prim: +application: iliad; +calculer cible traite_double_liquidation_2 : espace GLOBAL; + +cible traite_double_liquidation_2_corr: +application: iliad; +nettoie_erreurs; +calculer cible traite_double_liquidation_2 : espace CORR; + +cible sauve_base_initial_prim: +application: iliad; +calculer cible sauve_base_initial : espace GLOBAL; + +cible sauve_base_initial_corr: +application: iliad; +calculer cible sauve_base_initial : espace CORR; + +cible sauve_base_1728_prim: +application: iliad; +calculer cible sauve_base_1728 : espace GLOBAL; + +cible sauve_base_1728_corr: +application: iliad; +calculer cible sauve_base_1728 : espace CORR; + +cible sauve_base_anterieure_prim: +application: iliad; +calculer cible sauve_base_anterieure : espace GLOBAL; + +cible sauve_base_anterieure_corr: +application: iliad; +calculer cible sauve_base_anterieure : espace CORR; + +cible sauve_base_anterieure_cor_prim: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace GLOBAL; + +cible sauve_base_anterieure_cor_corr: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace CORR; + +cible sauve_base_inr_inter22_prim: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace GLOBAL; + +cible sauve_base_inr_inter22_corr: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace CORR; + +cible verif_saisie_cohe_primitive_prim: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace GLOBAL; + +cible verif_saisie_cohe_primitive_corr: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace CORR; + +cible verif_saisie_cohe_corrective_prim: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace GLOBAL; + +cible verif_saisie_cohe_corrective_corr: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace CORR; + +cible verif_cohe_horizontale_corr: +application: iliad; +calculer cible verif_cohe_horizontale : espace CORR; + +cible calcul_primitif_isf_prim: +application: iliad; +calculer cible calcul_primitif_isf : espace GLOBAL; + +cible verif_calcul_primitive_isf_prim: +application: iliad; +calculer cible verif_calcul_primitive_isf : espace GLOBAL; + +cible ench_tl_corr : +application: iliad; +calculer cible ENCH_TL : espace CORR; + +cible sauve_base_inr_r9901_corr : +application: iliad; +calculer cible sauve_base_inr_r9901 : espace CORR; + +cible sauve_base_HR_corr : +application: iliad; +calculer cible sauve_base_HR : espace CORR; + +cible sauve_base_inr_ref_corr : +application: iliad; +calculer cible sauve_base_inr_ref : espace CORR; + +cible sauve_base_inr_ntl_corr : +application: iliad; +calculer cible sauve_base_inr_ntl : espace CORR; + +cible sauve_base_abat98_corr : +application: iliad; +calculer cible sauve_base_abat98 : espace CORR; + +cible sauve_base_abat99_corr : +application: iliad; +calculer cible sauve_base_abat99 : espace CORR; + +cible sauve_base_inr_corr : +application: iliad; +calculer cible sauve_base_inr : espace CORR; + +cible sauve_base_inr_intertl_corr : +application: iliad; +calculer cible sauve_base_inr_intertl : espace CORR; + +cible sauve_base_inr_ntl22_corr : +application: iliad; +calculer cible sauve_base_inr_ntl22 : espace CORR; + +cible sauve_base_inr_ntl24_corr : +application: iliad; +calculer cible sauve_base_inr_ntl24 : espace CORR; + +cible sauve_base_inr_tl22_corr : +application: iliad; +calculer cible sauve_base_inr_tl22 : espace CORR; + +cible sauve_base_inr_tl24_corr : +application: iliad; +calculer cible sauve_base_inr_tl24 : espace CORR; + +cible sauve_base_inr_tl_corr : +application: iliad; +calculer cible sauve_base_inr_tl : espace CORR; + +cible sauve_base_majo_corr : +application: iliad; +calculer cible sauve_base_majo : espace CORR; + +cible sauve_base_premier_corr : +application: iliad; +calculer cible sauve_base_premier : espace CORR; + +cible sauve_base_stratemajo_corr : +application: iliad; +calculer cible sauve_base_stratemajo : espace CORR; + +cible sauve_base_tl_corr : +application: iliad; +calculer cible sauve_base_tl : espace CORR; + +cible sauve_base_tl_init_corr : +application: iliad; +calculer cible sauve_base_tl_init : espace CORR; + +cible sauve_base_tl_rect_corr : +application: iliad; +calculer cible sauve_base_tl_rect : espace CORR; -cible enchainement_primitif_interpreteur: +cible verif_calcul_corrective_corr : application: iliad; -V_IND_TRAIT = 4; # primitif -calculer cible enchainement_primitif; +calculer cible verif_calcul_corrective : espace CORR; diff --git a/m_ext/2024/codes_1731.m b/m_ext/2024/codes_1731.m new file mode 100644 index 000000000..b3f539b24 --- /dev/null +++ b/m_ext/2024/codes_1731.m @@ -0,0 +1,922 @@ +cible range_base_corr_corrige: +application: iliad; +si present(GLOBAL.SHBA) alors CORR.SHBA1731 = GLOBAL.SHBA; finsi +si present(GLOBAL.BANOR) alors CORR.BANOR1731 = GLOBAL.BANOR; finsi +si present(GLOBAL.INDSEUILBA) alors CORR.INDSEUILBA1731 = GLOBAL.INDSEUILBA; finsi +si present(GLOBAL.REB) alors CORR.REB1731 = GLOBAL.REB; finsi +si present(GLOBAL.R1649) alors CORR.R16491731 = GLOBAL.R1649; finsi +si present(GLOBAL.BAEV) alors CORR.BAEV1731 = GLOBAL.BAEV; finsi +si present(GLOBAL.BAEMV) alors CORR.BAEMV1731 = GLOBAL.BAEMV; finsi +si present(GLOBAL.BAEP) alors CORR.BAEP1731 = GLOBAL.BAEP; finsi +si present(GLOBAL.REVTP) alors CORR.REVTP1731 = GLOBAL.REVTP; finsi +si present(GLOBAL.BA1) alors CORR.BA11731 = GLOBAL.BA1; finsi +si present(GLOBAL.REVQTOTQHT) alors CORR.REVQTOTQHT1731 = GLOBAL.REVQTOTQHT; finsi +si present(GLOBAL.PREREV) alors CORR.PREREV1731 = GLOBAL.PREREV; finsi +si present(GLOBAL.REPRCM) alors CORR.REPRCM1731 = GLOBAL.REPRCM; finsi +si present(GLOBAL.REPRCMB) alors CORR.REPRCMB1731 = GLOBAL.REPRCMB; finsi +si present(GLOBAL.RFREVENU) alors CORR.RFREVENU1731 = GLOBAL.RFREVENU; finsi +si present(GLOBAL.TSHBA) alors CORR.TSHBA1731 = GLOBAL.TSHBA; finsi +si present(GLOBAL.DABNCNP1) alors CORR.DABNCNP11731 = GLOBAL.DABNCNP1; finsi +si present(GLOBAL.DABNCNP2) alors CORR.DABNCNP21731 = GLOBAL.DABNCNP2; finsi +si present(GLOBAL.DABNCNP3) alors CORR.DABNCNP31731 = GLOBAL.DABNCNP3; finsi +si present(GLOBAL.DABNCNP4) alors CORR.DABNCNP41731 = GLOBAL.DABNCNP4; finsi +si present(GLOBAL.DABNCNP5) alors CORR.DABNCNP51731 = GLOBAL.DABNCNP5; finsi +si present(GLOBAL.DABNCNP6) alors CORR.DABNCNP61731 = GLOBAL.DABNCNP6; finsi +si present(GLOBAL.DABNCNP) alors CORR.DABNCNP1731 = GLOBAL.DABNCNP; finsi +si present(GLOBAL.DAGRI1) alors CORR.DAGRI11731 = GLOBAL.DAGRI1; finsi +si present(GLOBAL.DAGRI2) alors CORR.DAGRI21731 = GLOBAL.DAGRI2; finsi +si present(GLOBAL.DAGRI3) alors CORR.DAGRI31731 = GLOBAL.DAGRI3; finsi +si present(GLOBAL.DAGRI4) alors CORR.DAGRI41731 = GLOBAL.DAGRI4; finsi +si present(GLOBAL.DAGRI5) alors CORR.DAGRI51731 = GLOBAL.DAGRI5; finsi +si present(GLOBAL.DAGRI6) alors CORR.DAGRI61731 = GLOBAL.DAGRI6; finsi +si present(GLOBAL.DAGRIIMP) alors CORR.DAGRIIMP1731 = GLOBAL.DAGRIIMP; finsi +si present(GLOBAL.DAGRI) alors CORR.DAGRI1731 = GLOBAL.DAGRI; finsi +si present(GLOBAL.DEFAA0) alors CORR.DEFAA01731 = GLOBAL.DEFAA0; finsi +si present(GLOBAL.DEFAA1) alors CORR.DEFAA11731 = GLOBAL.DEFAA1; finsi +si present(GLOBAL.DEFAA2) alors CORR.DEFAA21731 = GLOBAL.DEFAA2; finsi +si present(GLOBAL.DEFAA3) alors CORR.DEFAA31731 = GLOBAL.DEFAA3; finsi +si present(GLOBAL.DEFAA4) alors CORR.DEFAA41731 = GLOBAL.DEFAA4; finsi +si present(GLOBAL.DEFAA5) alors CORR.DEFAA51731 = GLOBAL.DEFAA5; finsi +si present(GLOBAL.DEFBIC1) alors CORR.DEFBIC11731 = GLOBAL.DEFBIC1; finsi +si present(GLOBAL.DEFBIC2) alors CORR.DEFBIC21731 = GLOBAL.DEFBIC2; finsi +si present(GLOBAL.DEFBIC3) alors CORR.DEFBIC31731 = GLOBAL.DEFBIC3; finsi +si present(GLOBAL.DEFBIC4) alors CORR.DEFBIC41731 = GLOBAL.DEFBIC4; finsi +si present(GLOBAL.DEFBIC5) alors CORR.DEFBIC51731 = GLOBAL.DEFBIC5; finsi +si present(GLOBAL.DEFBIC6) alors CORR.DEFBIC61731 = GLOBAL.DEFBIC6; finsi +si present(GLOBAL.DEFRCM) alors CORR.DEFRCM1731 = GLOBAL.DEFRCM; finsi +si present(GLOBAL.DEFRCM2) alors CORR.DEFRCM21731 = GLOBAL.DEFRCM2; finsi +si present(GLOBAL.DEFRCM3) alors CORR.DEFRCM31731 = GLOBAL.DEFRCM3; finsi +si present(GLOBAL.DEFRCM4) alors CORR.DEFRCM41731 = GLOBAL.DEFRCM4; finsi +si present(GLOBAL.DEFRCM5) alors CORR.DEFRCM51731 = GLOBAL.DEFRCM5; finsi +si present(GLOBAL.DEFRCM6) alors CORR.DEFRCM61731 = GLOBAL.DEFRCM6; finsi +si present(GLOBAL.DEFRCMI) alors CORR.DEFRCMI1731 = GLOBAL.DEFRCMI; finsi +si present(GLOBAL.DEFRFNONIBIS) alors CORR.DEFRFNONI1731 = GLOBAL.DEFRFNONIBIS; finsi +si present(GLOBAL.DEFZU) alors CORR.DEFZU1731 = GLOBAL.DEFZU; finsi +si present(GLOBAL.DMOND) alors CORR.DMOND1731 = GLOBAL.DMOND; finsi +si present(GLOBAL.IPTEFN) alors CORR.IPTEFN1731 = GLOBAL.IPTEFN; finsi +si present(GLOBAL.RFDORD) alors CORR.RFDORD1731 = GLOBAL.RFDORD; finsi +si present(GLOBAL.DEFNPI) alors CORR.DEFNPI1731 = GLOBAL.DEFNPI; finsi +si present(GLOBAL.TDEFNPI) alors CORR.TDEFNPI1731 = GLOBAL.TDEFNPI; finsi +si present(GLOBAL.DFRCMN) alors CORR.DFRCMN1731 = GLOBAL.DFRCMN; finsi +si present(GLOBAL.DFRCM1) alors CORR.DFRCM11731 = GLOBAL.DFRCM1; finsi +si present(GLOBAL.DFRCM2) alors CORR.DFRCM21731 = GLOBAL.DFRCM2; finsi +si present(GLOBAL.DFRCM3) alors CORR.DFRCM31731 = GLOBAL.DFRCM3; finsi +si present(GLOBAL.DFRCM4) alors CORR.DFRCM41731 = GLOBAL.DFRCM4; finsi +si present(GLOBAL.DFRCM5) alors CORR.DFRCM51731 = GLOBAL.DFRCM5; finsi +si present(GLOBAL.DEFBA) alors CORR.DEFBA1731 = GLOBAL.DEFBA; finsi +si present(GLOBAL.DLMRNT) alors CORR.DLMRN1731 = GLOBAL.DLMRNT; finsi +si present(GLOBAL.DLMRN7) alors CORR.DLMRN71731 = GLOBAL.DLMRN7; finsi +si present(GLOBAL.DEFBA7) alors CORR.DEFBA71731 = GLOBAL.DEFBA7; finsi +si present(GLOBAL.DEFLOC11) alors CORR.DEFLOC111731 = GLOBAL.DEFLOC11; finsi +si present(GLOBAL.BNCDF7) alors CORR.BNCDF71731 = GLOBAL.BNCDF7; finsi +si present(GLOBAL.DEFLOC) alors CORR.DEFLOC1731 = GLOBAL.DEFLOC; finsi +si present(GLOBAL.BNCDF) alors CORR.BNCDF1731 = GLOBAL.BNCDF; finsi +si present(GLOBAL.FRDV) alors CORR.FRDV1731 = GLOBAL.FRDV; finsi +si present(GLOBAL.FRDC) alors CORR.FRDC1731 = GLOBAL.FRDC; finsi +si present(GLOBAL.FRD1) alors CORR.FRD11731 = GLOBAL.FRD1; finsi +si present(GLOBAL.FRD2) alors CORR.FRD21731 = GLOBAL.FRD2; finsi +si present(GLOBAL.FRD3) alors CORR.FRD31731 = GLOBAL.FRD3; finsi +si present(GLOBAL.FRD4) alors CORR.FRD41731 = GLOBAL.FRD4; finsi +si present(GLOBAL.RCMFRNET) alors CORR.RCMFRNET1731 = GLOBAL.RCMFRNET; finsi +si present(GLOBAL.RCMFR) alors CORR.RCMFR1731 = GLOBAL.RCMFR; finsi +si present(GLOBAL.BICNPF) alors CORR.BICNPF1731 = GLOBAL.BICNPF; finsi +si present(GLOBAL.RFDANT) alors CORR.RFDANT1731 = GLOBAL.RFDANT; finsi +si present(GLOBAL.TFRDV) alors CORR.TFRDV1731 = GLOBAL.TFRDV; finsi +si present(GLOBAL.TFRDC) alors CORR.TFRDC1731 = GLOBAL.TFRDC; finsi +si present(GLOBAL.TFRD1) alors CORR.TFRD11731 = GLOBAL.TFRD1; finsi +si present(GLOBAL.TFRD2) alors CORR.TFRD21731 = GLOBAL.TFRD2; finsi +si present(GLOBAL.TFRD3) alors CORR.TFRD31731 = GLOBAL.TFRD3; finsi +si present(GLOBAL.TFRD4) alors CORR.TFRD41731 = GLOBAL.TFRD4; finsi +si present(GLOBAL.RNIDF) alors CORR.RNIDF1731 = GLOBAL.RNIDF; finsi +si present(GLOBAL.DFBICNPF) alors CORR.DFBICNPF1731 = GLOBAL.DFBICNPF; finsi +si present(GLOBAL.TDFBICNPF) alors CORR.TDFBICNPF1731 = GLOBAL.TDFBICNPF; finsi +si present(GLOBAL.DNPLOCIMPU) alors CORR.DNPLOCIMPU1731 = GLOBAL.DNPLOCIMPU; finsi +si present(GLOBAL.DEFBNCNP) alors CORR.DEFBNCNP1731 = GLOBAL.DEFBNCNP; finsi +si present(GLOBAL.TDEFBNCNP) alors CORR.TDEFBNCNP1731 = GLOBAL.TDEFBNCNP; finsi +si present(GLOBAL.DIDABNCNP1) alors CORR.DIDABNCNP11731 = GLOBAL.DIDABNCNP1; finsi +si present(GLOBAL.TDIDABNCNP1) alors CORR.TDIDABNCNP11731 = GLOBAL.TDIDABNCNP1; finsi +si present(GLOBAL.DEFBANI) alors CORR.DEFBANI1731 = GLOBAL.DEFBANI; finsi +si present(GLOBAL.DEFBANI470) alors CORR.DEFBANI4701731 = GLOBAL.DEFBANI470; finsi +si present(GLOBAL.DEFBANI470BIS) alors CORR.DEFBANI470BIS1731 = GLOBAL.DEFBANI470BIS; finsi +si present(GLOBAL.DEFBANIH470) alors CORR.DEFBANIH4701731 = GLOBAL.DEFBANIH470; finsi +si present(GLOBAL.DEFBNCNP470) alors CORR.DEFBNCNP4701731 = GLOBAL.DEFBNCNP470; finsi +si present(GLOBAL.DEFBNCNPH470) alors CORR.DEFBNCNPH4701731 = GLOBAL.DEFBNCNPH470; finsi +si present(GLOBAL.DEFBICNP470) alors CORR.DEFBICNP4701731 = GLOBAL.DEFBICNP470; finsi +si present(GLOBAL.DEFBICNPH470) alors CORR.DEFBICNPH4701731 = GLOBAL.DEFBICNPH470; finsi +si present(GLOBAL.TDEFBANI) alors CORR.TDEFBANI1731 = GLOBAL.TDEFBANI; finsi +si present(GLOBAL.SFDEFBANI) alors CORR.SFDEFBANI1731 = GLOBAL.SFDEFBANI; finsi +si present(GLOBAL.SFDEFBANI470) alors CORR.SFDEFBANI4701731 = GLOBAL.SFDEFBANI470; finsi +si present(GLOBAL.SFDEFBANIH470) alors CORR.SFDEFBANIH4701731 = GLOBAL.SFDEFBANIH470; finsi +si present(GLOBAL.DEFLOCNP) alors CORR.DEFLOCNP1731 = GLOBAL.DEFLOCNP; finsi +si present(GLOBAL.DEFLOCNPBIS) alors CORR.BIDON1731 = GLOBAL.DEFLOCNPBIS; finsi +si present(GLOBAL.BRCMBISB) alors CORR.BRCMBISB1731 = GLOBAL.BRCMBISB; finsi +si present(GLOBAL.BRCMBISQ) alors CORR.BRCMBISQ1731 = GLOBAL.BRCMBISQ; finsi +si present(GLOBAL.BRCMBIS) alors CORR.BRCM1731 = GLOBAL.BRCMBIS; finsi +si present(GLOBAL.BRCMQ) alors CORR.BRCMQ1731 = GLOBAL.BRCMQ; finsi +si present(GLOBAL.DEF4BB) alors CORR.DEF4BB1731 = GLOBAL.DEF4BB; finsi +si present(GLOBAL.DEF4BD) alors CORR.DEF4BD1731 = GLOBAL.DEF4BD; finsi +si present(GLOBAL.DEF4BC) alors CORR.DEF4BC1731 = GLOBAL.DEF4BC; finsi +si present(GLOBAL.TOTALQUO) alors CORR.TOTALQUO1731 = GLOBAL.TOTALQUO; finsi +si present(GLOBAL.SPENETPV) alors CORR.SPENETPV1731 = GLOBAL.SPENETPV; finsi +si present(GLOBAL.SPENETPC) alors CORR.SPENETPC1731 = GLOBAL.SPENETPC; finsi +si present(GLOBAL.SPENETPP) alors CORR.SPENETPP1731 = GLOBAL.SPENETPP; finsi +si present(GLOBAL.BNCPROPVV) alors CORR.BNCPROPVV1731 = GLOBAL.BNCPROPVV; finsi +si present(GLOBAL.BNCPROPVC) alors CORR.BNCPROPVC1731 = GLOBAL.BNCPROPVC; finsi +si present(GLOBAL.BNCPROPVP) alors CORR.BNCPROPVP1731 = GLOBAL.BNCPROPVP; finsi +si present(GLOBAL.MIBRNETV) alors CORR.MIBRNETV1731 = GLOBAL.MIBRNETV; finsi +si present(GLOBAL.MIBRNETC) alors CORR.MIBRNETC1731 = GLOBAL.MIBRNETC; finsi +si present(GLOBAL.MIBRNETP) alors CORR.MIBRNETP1731 = GLOBAL.MIBRNETP; finsi +si present(GLOBAL.MIBPVV) alors CORR.MIBPVV1731 = GLOBAL.MIBPVV; finsi +si present(GLOBAL.MIBPVC) alors CORR.MIBPVC1731 = GLOBAL.MIBPVC; finsi +si present(GLOBAL.MIBPVP) alors CORR.MIBPVP1731 = GLOBAL.MIBPVP; finsi +si present(GLOBAL.DFANTPROV) alors CORR.DFANTPROV1731 = GLOBAL.DFANTPROV; finsi +si present(GLOBAL.SFDFANTPROV) alors CORR.SFDFANTPROV1731 = GLOBAL.SFDFANTPROV; finsi +si present(GLOBAL.TDFANTPROV) alors CORR.TDFANTPROV1731 = GLOBAL.TDFANTPROV; finsi +si present(GLOBAL.TTSPRT) alors CORR.TTSPRT1731 = GLOBAL.TTSPRT; finsi +si present(GLOBAL.TSPRT) alors CORR.TSPRT1731 = GLOBAL.TSPRT; finsi +si present(GLOBAL.TSPRV) alors CORR.TSPRV1731 = GLOBAL.TSPRV; finsi +si present(GLOBAL.TSPRC) alors CORR.TSPRC1731 = GLOBAL.TSPRC; finsi +si present(GLOBAL.TSPRP) alors CORR.TSPRP1731 = GLOBAL.TSPRP; finsi +si present(GLOBAL.TTSPRV) alors CORR.TTSPRV1731 = GLOBAL.TTSPRV; finsi +si present(GLOBAL.TTSPRC) alors CORR.TTSPRC1731 = GLOBAL.TTSPRC; finsi +si present(GLOBAL.TTSPRP) alors CORR.TTSPRP1731 = GLOBAL.TTSPRP; finsi +si present(GLOBAL.SOMMEBA) alors CORR.SOMMEBA1731 = GLOBAL.SOMMEBA; finsi +si present(GLOBAL.SOMMEBIC) alors CORR.SOMMEBIC1731 = GLOBAL.SOMMEBIC; finsi +si present(GLOBAL.SOMMELOC) alors CORR.SOMMELOC1731 = GLOBAL.SOMMELOC; finsi +si present(GLOBAL.SOMMEBNC) alors CORR.SOMMEBNC1731 = GLOBAL.SOMMEBNC; finsi +si present(GLOBAL.SOMMERF) alors CORR.SOMMERF1731 = GLOBAL.SOMMERF; finsi +si present(GLOBAL.SOMMERCM) alors CORR.SOMMERCM1731 = GLOBAL.SOMMERCM; finsi +si present(GLOBAL.TSBV) alors CORR.TSBV1731 = GLOBAL.TSBV; finsi +si present(GLOBAL.TSBC) alors CORR.TSBC1731 = GLOBAL.TSBC; finsi +si present(GLOBAL.TSB1) alors CORR.TSB11731 = GLOBAL.TSB1; finsi +si present(GLOBAL.TSB2) alors CORR.TSB21731 = GLOBAL.TSB2; finsi +si present(GLOBAL.TSB3) alors CORR.TSB31731 = GLOBAL.TSB3; finsi +si present(GLOBAL.TSB4) alors CORR.TSB41731 = GLOBAL.TSB4; finsi +si present(GLOBAL.TSBP) alors CORR.TSBP1731 = GLOBAL.TSBP; finsi +si present(GLOBAL.SOMDEFLOC) alors CORR.DEFLOC1731 = GLOBAL.SOMDEFLOC; finsi +si present(GLOBAL.SOMBICDF) alors CORR.SOMBICDF1731 = GLOBAL.SOMBICDF; finsi +si present(GLOBAL.SOMLOCDF) alors CORR.SOMLOCDF1731 = GLOBAL.SOMLOCDF; finsi +si present(GLOBAL.SOMBADF) alors CORR.SOMBADF1731 = GLOBAL.SOMBADF; finsi +si present(GLOBAL.SOMBNCDF) alors CORR.SOMBNCDF1731 = GLOBAL.SOMBNCDF; finsi +si present(GLOBAL.RIDEFRI) alors CORR.RIDEFRI1731 = GLOBAL.RIDEFRI; finsi +si present(GLOBAL.RDOMSOC1) alors CORR.RDOMSOC11731 = GLOBAL.RDOMSOC1; finsi +si present(GLOBAL.RLOGSOC) alors CORR.RLOGSOC1731 = GLOBAL.RLOGSOC; finsi +si present(GLOBAL.RCOLENT) alors CORR.RCOLENT1731 = GLOBAL.RCOLENT; finsi +si present(GLOBAL.RLOCENT_1) alors CORR.RLOCENT1731 = GLOBAL.RLOCENT_1; finsi +si present(GLOBAL.COD2TT) alors CORR.COD2TT1731 = GLOBAL.COD2TT; finsi +si present(GLOBAL.RCM1) alors CORR.RCM1731 = GLOBAL.RCM1; finsi +si present(GLOBAL.RRIREP_1) alors CORR.RRIREP1731 = GLOBAL.RRIREP_1; finsi +si present(GLOBAL.BSURV) alors CORR.BSURV1731 = GLOBAL.BSURV; finsi +si present(GLOBAL.DEFIBA) alors CORR.DEFIBA1731 = GLOBAL.DEFIBA; finsi +si present(GLOBAL.DBAIP) alors CORR.DBAIP1731 = GLOBAL.DBAIP; finsi +si present(GLOBAL.LOCNPCF) alors CORR.LOCNPCF1731 = GLOBAL.LOCNPCF; finsi +si present(GLOBAL.NPLOCNETBIS) alors CORR.NPLOCNETBIS1731 = GLOBAL.NPLOCNETBIS; finsi +si present(GLOBAL.SOMDLOC) alors CORR.SOMDLOC1731 = GLOBAL.SOMDLOC; finsi +si present(GLOBAL.BICIFBIS) alors CORR.BICIFBIS1731 = GLOBAL.BICIFBIS; finsi +si present(GLOBAL.SOMDBIC) alors CORR.SOMDBIC1731 = GLOBAL.SOMDBIC; finsi +si present(GLOBAL.BICPROOF) alors CORR.BICPROOF1731 = GLOBAL.BICPROOF; finsi +si present(GLOBAL.BICPROQF) alors CORR.BICPROQF1731 = GLOBAL.BICPROQF; finsi +si present(GLOBAL.BICNPOCF) alors CORR.BICNPOCF1731 = GLOBAL.BICNPOCF; finsi +si present(GLOBAL.BICNPQCF) alors CORR.BICNPQCF1731 = GLOBAL.BICNPQCF; finsi +si present(GLOBAL.BACIFBIS) alors CORR.BACIFBIS1731 = GLOBAL.BACIFBIS; finsi +si present(GLOBAL.BAHQNODEFF) alors CORR.BAHQNODEFF1731 = GLOBAL.BAHQNODEFF; finsi +si present(GLOBAL.BAQNODEFF) alors CORR.BAQNODEFF1731 = GLOBAL.BAQNODEFF; finsi +si present(GLOBAL.BNCNPHQCF) alors CORR.BNCNPHQCF1731 = GLOBAL.BNCNPHQCF; finsi +si present(GLOBAL.BNCNPQCF) alors CORR.BNCNPQCF1731 = GLOBAL.BNCNPQCF; finsi +si present(GLOBAL.BNCPHQCF) alors CORR.BNCPHQCF1731 = GLOBAL.BNCPHQCF; finsi +si present(GLOBAL.BNCPQCF) alors CORR.BNCPQCF1731 = GLOBAL.BNCPQCF; finsi +si present(GLOBAL.RRBGPROV) alors CORR.RRBGPROV1731 = GLOBAL.RRBGPROV; finsi +si present(GLOBAL.DRCF) alors CORR.DRCF1731 = GLOBAL.DRCF; finsi +si present(GLOBAL.RFCE) alors CORR.RFCE1731 = GLOBAL.RFCE; finsi +si present(GLOBAL.RFCF) alors CORR.RFCF1731 = GLOBAL.RFCF; finsi +si present(GLOBAL.RFCD) alors CORR.RFCD1731 = GLOBAL.RFCD; finsi +si present(GLOBAL.DFCG) alors CORR.DFCG1731 = GLOBAL.DFCG; finsi +si present(GLOBAL.DFCE) alors CORR.DFCE1731 = GLOBAL.DFCE; finsi +si present(GLOBAL.RFCG) alors CORR.RFCG1731 = GLOBAL.RFCG; finsi +si present(GLOBAL.RFON) alors CORR.RFON1731 = GLOBAL.RFON; finsi +si present(GLOBAL.RMF) alors CORR.RMF1731 = GLOBAL.RMF; finsi +si present(GLOBAL.SOMDBNC) alors CORR.SOMDBNC1731 = GLOBAL.SOMDBNC; finsi +si present(GLOBAL.BNCIFBIS) alors CORR.BNCIFBIS1731 = GLOBAL.BNCIFBIS; finsi +si present(GLOBAL.RED_1) alors CORR.RED1731 = GLOBAL.RED_1; finsi +si present(GLOBAL.MLOCNET) alors CORR.MLOCNET1731 = GLOBAL.MLOCNET; finsi +si present(GLOBAL.NPLOCNETV) alors CORR.NPLOCNETV1731 = GLOBAL.NPLOCNETV; finsi +si present(GLOBAL.NPLOCNETC) alors CORR.NPLOCNETC1731 = GLOBAL.NPLOCNETC; finsi +si present(GLOBAL.NPLOCNETPAC) alors CORR.NPLOCNETPAC1731 = GLOBAL.NPLOCNETPAC; finsi +si present(GLOBAL.RGPROV) alors CORR.RGPROV1731 = GLOBAL.RGPROV; finsi +si present(GLOBAL.REVDON) alors CORR.REVDON1731 = GLOBAL.REVDON; finsi +si present(GLOBAL.DRFRP) alors CORR.DRFRP1731 = GLOBAL.DRFRP; finsi +si present(GLOBAL.RDONIFI_1) alors CORR.RDONIFI11731 = GLOBAL.RDONIFI_1; finsi +si present(GLOBAL.RDONIFI2_1) alors CORR.RDONIFI21731 = GLOBAL.RDONIFI2_1; finsi +si present(GLOBAL.IFIACT) alors CORR.IFIACT1731 = GLOBAL.IFIACT; finsi +si present(GLOBAL.AREHAB_1) alors CORR.AREHAB1731 = GLOBAL.AREHAB_1; finsi +si present(GLOBAL.APRESSE_1) alors CORR.APRESSE1731 = GLOBAL.APRESSE_1; finsi +si present(GLOBAL.AFORET_1) alors CORR.AFORET1731 = GLOBAL.AFORET_1; finsi +si present(GLOBAL.AFIPDOM_1) alors CORR.AFIPDOM1731 = GLOBAL.AFIPDOM_1; finsi +si present(GLOBAL.AFIPC_1) alors CORR.AFIPC1731 = GLOBAL.AFIPC_1; finsi +si present(GLOBAL.ACINE_1) alors CORR.ACINE1731 = GLOBAL.ACINE_1; finsi +si present(GLOBAL.ASOUFIP_1) alors CORR.ASOUFIP1731 = GLOBAL.ASOUFIP_1; finsi +si present(GLOBAL.BRENOV) alors CORR.BRENOV1731 = GLOBAL.BRENOV; finsi +si present(GLOBAL.ACOMP_1) alors CORR.ACOMP1731 = GLOBAL.ACOMP_1; finsi +si present(GLOBAL.ADUFREPFV_1) alors CORR.ADUFREPFV1731 = GLOBAL.ADUFREPFV_1; finsi +si present(GLOBAL.ADUFREPFW_1) alors CORR.ADUFREPFW1731 = GLOBAL.ADUFREPFW_1; finsi +si present(GLOBAL.ADUFREPFX_1) alors CORR.ADUFREPFX1731 = GLOBAL.ADUFREPFX_1; finsi +si present(GLOBAL.ADUFREPFU_1) alors CORR.ADUFREPFU1731 = GLOBAL.ADUFREPFU_1; finsi +si present(GLOBAL.APIREPRZ_1) alors CORR.APIREPRZ1731 = GLOBAL.APIREPRZ_1; finsi +si present(GLOBAL.APIREPTZ_1) alors CORR.APIREPTZ1731 = GLOBAL.APIREPTZ_1; finsi +si present(GLOBAL.APIREPRB_1) alors CORR.APIREPRB1731 = GLOBAL.APIREPRB_1; finsi +si present(GLOBAL.APIREPRD_1) alors CORR.APIREPRD1731 = GLOBAL.APIREPRD_1; finsi +si present(GLOBAL.APIREPRF_1) alors CORR.APIREPRF1731 = GLOBAL.APIREPRF_1; finsi +si present(GLOBAL.APIREPRH_1) alors CORR.APIREPRH1731 = GLOBAL.APIREPRH_1; finsi +si present(GLOBAL.APIREPJM_1) alors CORR.APIREPJM1731 = GLOBAL.APIREPJM_1; finsi +si present(GLOBAL.APIREPKM_1) alors CORR.APIREPKM1731 = GLOBAL.APIREPKM_1; finsi +si present(GLOBAL.APIREPLM_1) alors CORR.APIREPLM1731 = GLOBAL.APIREPLM_1; finsi +si present(GLOBAL.APIREPMM_1) alors CORR.APIREPMM1731 = GLOBAL.APIREPMM_1; finsi +si present(GLOBAL.ANORMJA_1) alors CORR.ANORMJA1731 = GLOBAL.ANORMJA_1; finsi +si present(GLOBAL.ANORMJB_1) alors CORR.ANORMJB1731 = GLOBAL.ANORMJB_1; finsi +si present(GLOBAL.ANORMJC_1) alors CORR.ANORMJC1731 = GLOBAL.ANORMJC_1; finsi +si present(GLOBAL.ANORMJD_1) alors CORR.ANORMJD1731 = GLOBAL.ANORMJD_1; finsi +si present(GLOBAL.ACELREPWW_1) alors CORR.ACELREPWW1731 = GLOBAL.ACELREPWW_1; finsi +si present(GLOBAL.ACELREPWV_1) alors CORR.ACELREPWV1731 = GLOBAL.ACELREPWV_1; finsi +si present(GLOBAL.ACELREPWU_1) alors CORR.ACELREPWU1731 = GLOBAL.ACELREPWU_1; finsi +si present(GLOBAL.ACELREPWT_1) alors CORR.ACELREPWT1731 = GLOBAL.ACELREPWT_1; finsi +si present(GLOBAL.ACELRU_1) alors CORR.ACELRU1731 = GLOBAL.ACELRU_1; finsi +si present(GLOBAL.ACELRT_1) alors CORR.ACELRT1731 = GLOBAL.ACELRT_1; finsi +si present(GLOBAL.ATOUREPA_1) alors CORR.ATOUREPA1731 = GLOBAL.ATOUREPA_1; finsi +si present(GLOBAL.BAH) alors CORR.BAH1731 = GLOBAL.BAH; finsi +si present(GLOBAL.BAALIM) alors CORR.BAALIM1731 = GLOBAL.BAALIM; finsi +si present(GLOBAL.BSN1) alors CORR.BSN11731 = GLOBAL.BSN1; finsi +si present(GLOBAL.BSN2) alors CORR.BSN21731 = GLOBAL.BSN2; finsi +si present(GLOBAL.APENTCY_1) alors CORR.APENTCY1731 = GLOBAL.APENTCY_1; finsi +si present(GLOBAL.APENTDY_1) alors CORR.APENTDY1731 = GLOBAL.APENTDY_1; finsi +si present(GLOBAL.APENTEY_1) alors CORR.APENTEY1731 = GLOBAL.APENTEY_1; finsi +si present(GLOBAL.APENTFY_1) alors CORR.APENTFY1731 = GLOBAL.APENTFY_1; finsi +si present(GLOBAL.APENTGY_1) alors CORR.APENTGY1731 = GLOBAL.APENTGY_1; finsi +si present(GLOBAL.APENTEK_1) alors CORR.APENTEK1731 = GLOBAL.APENTEK_1; finsi +si present(GLOBAL.ASOFON_1) alors CORR.ASOFON1731 = GLOBAL.ASOFON_1; finsi +si present(GLOBAL.AILMPF_1) alors CORR.AILMPF1731 = GLOBAL.AILMPF_1; finsi +si present(GLOBAL.AILMHO_1) alors CORR.AILMHO1731 = GLOBAL.AILMHO_1; finsi +si present(GLOBAL.AILMHT_1) alors CORR.AILMHT1731 = GLOBAL.AILMHT_1; finsi +si present(GLOBAL.AILMPG_1) alors CORR.AILMPG1731 = GLOBAL.AILMPG_1; finsi +si present(GLOBAL.AILMHP_1) alors CORR.AILMHP1731 = GLOBAL.AILMHP_1; finsi +si present(GLOBAL.AILMHU_1) alors CORR.AILMHU1731 = GLOBAL.AILMHU_1; finsi +si present(GLOBAL.AILMPH_1) alors CORR.AILMPH1731 = GLOBAL.AILMPH_1; finsi +si present(GLOBAL.AILMHQ_1) alors CORR.AILMHQ1731 = GLOBAL.AILMHQ_1; finsi +si present(GLOBAL.AILMHV_1) alors CORR.AILMHV1731 = GLOBAL.AILMHV_1; finsi +si present(GLOBAL.AILMPI_1) alors CORR.AILMPI1731 = GLOBAL.AILMPI_1; finsi +si present(GLOBAL.AILMHR_1) alors CORR.AILMHR1731 = GLOBAL.AILMHR_1; finsi +si present(GLOBAL.AILMHW_1) alors CORR.AILMHW1731 = GLOBAL.AILMHW_1; finsi +si present(GLOBAL.AILMPJ_1) alors CORR.AILMPJ1731 = GLOBAL.AILMPJ_1; finsi +si present(GLOBAL.AILMHS_1) alors CORR.AILMHS1731 = GLOBAL.AILMHS_1; finsi +si present(GLOBAL.AILMHX_1) alors CORR.AILMHX1731 = GLOBAL.AILMHX_1; finsi +si present(GLOBAL.AILMJY_1) alors CORR.AILMJY1731 = GLOBAL.AILMJY_1; finsi +si present(GLOBAL.AILMJX_1) alors CORR.AILMJX1731 = GLOBAL.AILMJX_1; finsi +si present(GLOBAL.AILMJW_1) alors CORR.AILMJW1731 = GLOBAL.AILMJW_1; finsi +si present(GLOBAL.AILMJV_1) alors CORR.AILMJV1731 = GLOBAL.AILMJV_1; finsi +si present(GLOBAL.AILMOT_1) alors CORR.AILMOT1731 = GLOBAL.AILMOT_1; finsi +si present(GLOBAL.AILMOS_1) alors CORR.AILMOS1731 = GLOBAL.AILMOS_1; finsi +si present(GLOBAL.AILMOR_1) alors CORR.AILMOR1731 = GLOBAL.AILMOR_1; finsi +si present(GLOBAL.AILMOQ_1) alors CORR.AILMOQ1731 = GLOBAL.AILMOQ_1; finsi +si present(GLOBAL.AILMOP_1) alors CORR.AILMOP1731 = GLOBAL.AILMOP_1; finsi +si present(GLOBAL.AILMSA_1) alors CORR.AILMSA1731 = GLOBAL.AILMSA_1; finsi +si present(GLOBAL.AILMSB_1) alors CORR.AILMSB1731 = GLOBAL.AILMSB_1; finsi +si present(GLOBAL.AILMSC_1) alors CORR.AILMSC1731 = GLOBAL.AILMSC_1; finsi +si present(GLOBAL.AILMSN_1) alors CORR.AILMSN1731 = GLOBAL.AILMSN_1; finsi +si present(GLOBAL.AILMSO_1) alors CORR.AILMSO1731 = GLOBAL.AILMSO_1; finsi +si present(GLOBAL.AILMSP_1) alors CORR.AILMSP1731 = GLOBAL.AILMSP_1; finsi +si present(GLOBAL.ACODMZ_1) alors CORR.ACODMZ1731 = GLOBAL.ACODMZ_1; finsi +si present(GLOBAL.ACODPZ_1) alors CORR.ACODPZ1731 = GLOBAL.ACODPZ_1; finsi +si present(GLOBAL.ACODOY_1) alors CORR.ACODOY1731 = GLOBAL.ACODOY_1; finsi +si present(GLOBAL.ACODOU_1) alors CORR.ACODOU1731 = GLOBAL.ACODOU_1; finsi +si present(GLOBAL.ACODJTJU_1) alors CORR.ACODJTJU1731 = GLOBAL.ACODJTJU_1; finsi +si present(GLOBAL.BSOCREP) alors CORR.BSOCREP1731 = GLOBAL.BSOCREP; finsi +si present(GLOBAL.ARESTIMO_1) alors CORR.ARESTIMO1731 = GLOBAL.ARESTIMO_1; finsi +si present(GLOBAL.ARESTIMO1_1) alors CORR.ARESTIMO11731 = GLOBAL.ARESTIMO1_1; finsi +si present(GLOBAL.ADONS_1) alors CORR.ADONS1731 = GLOBAL.ADONS_1; finsi +si present(GLOBAL.BPRESCOMP) alors CORR.BPRESCOMP1731 = GLOBAL.BPRESCOMP; finsi +si present(GLOBAL.BDIFAGRI) alors CORR.BDIFAGRI1731 = GLOBAL.BDIFAGRI; finsi +si present(GLOBAL.ALOGDOM_1) alors CORR.ALOGDOM1731 = GLOBAL.ALOGDOM_1; finsi +si present(GLOBAL.RLOGDOM) alors CORR.RLOGDOM1731 = GLOBAL.RLOGDOM; finsi +si present(GLOBAL.ALOGSOC_1) alors CORR.ALOGSOC1731 = GLOBAL.ALOGSOC_1; finsi +si present(GLOBAL.ADOMSOC1_1) alors CORR.ADOMSOC11731 = GLOBAL.ADOMSOC1_1; finsi +si present(GLOBAL.ALOCENT_1) alors CORR.ALOCENT1731 = GLOBAL.ALOCENT_1; finsi +si present(GLOBAL.ACOLENT_1) alors CORR.ACOLENT1731 = GLOBAL.ACOLENT_1; finsi +si present(GLOBAL.RPRESSE_1) alors CORR.RPRESSE1731 = GLOBAL.RPRESSE_1; finsi +si present(GLOBAL.RFORET_1) alors CORR.RFORET1731 = GLOBAL.RFORET_1; finsi +si present(GLOBAL.RFIPDOM_1) alors CORR.RFIPDOM1731 = GLOBAL.RFIPDOM_1; finsi +si present(GLOBAL.RFIPC_1) alors CORR.RFIPC1731 = GLOBAL.RFIPC_1; finsi +si present(GLOBAL.RSURV_1) alors CORR.RSURV1731 = GLOBAL.RSURV_1; finsi +si present(GLOBAL.RCINE_1) alors CORR.RCINE1731 = GLOBAL.RCINE_1; finsi +si present(GLOBAL.RSOUFIP_1) alors CORR.RSOUFIP1731 = GLOBAL.RSOUFIP_1; finsi +si present(GLOBAL.RRIRENOV_1) alors CORR.RRIRENOV1731 = GLOBAL.RRIRENOV_1; finsi +si present(GLOBAL.RCOMP_1) alors CORR.RCOMP1731 = GLOBAL.RCOMP_1; finsi +si present(GLOBAL.RDUFREP_1) alors CORR.RDUFREP1731 = GLOBAL.RDUFREP_1; finsi +si present(GLOBAL.RPIREPRZ_1) alors CORR.RPIREPRZ1731 = GLOBAL.RPIREPRZ_1; finsi +si present(GLOBAL.RPIREPTZ_1) alors CORR.RPIREPTZ1731 = GLOBAL.RPIREPTZ_1; finsi +si present(GLOBAL.RPIREPRB_1) alors CORR.RPIREPRB1731 = GLOBAL.RPIREPRB_1; finsi +si present(GLOBAL.RPIREPRD_1) alors CORR.RPIREPRD1731 = GLOBAL.RPIREPRD_1; finsi +si present(GLOBAL.RPIREPRF_1) alors CORR.RPIREPRF1731 = GLOBAL.RPIREPRF_1; finsi +si present(GLOBAL.RPIREPRH_1) alors CORR.RPIREPRH1731 = GLOBAL.RPIREPRH_1; finsi +si present(GLOBAL.RPIREPJM_1) alors CORR.RPIREPJM1731 = GLOBAL.RPIREPJM_1; finsi +si present(GLOBAL.RNORMJA_1) alors CORR.RNORMJA1731 = GLOBAL.RNORMJA_1; finsi +si present(GLOBAL.RPIREPKM_1) alors CORR.RPIREPKM1731 = GLOBAL.RPIREPKM_1; finsi +si present(GLOBAL.RNORMJB_1) alors CORR.RNORMJB1731 = GLOBAL.RNORMJB_1; finsi +si present(GLOBAL.RPIREPLM_1) alors CORR.RPIREPLM1731 = GLOBAL.RPIREPLM_1; finsi +si present(GLOBAL.RNORMJC_1) alors CORR.RNORMJC1731 = GLOBAL.RNORMJC_1; finsi +si present(GLOBAL.RPIREPMM_1) alors CORR.RPIREPMM1731 = GLOBAL.RPIREPMM_1; finsi +si present(GLOBAL.RNORMJD_1) alors CORR.RNORMJD1731 = GLOBAL.RNORMJD_1; finsi +si present(GLOBAL.RPIVW_1) alors CORR.RPIVW1731 = GLOBAL.RPIVW_1; finsi +si present(GLOBAL.RPIVX_1) alors CORR.RPIVX1731 = GLOBAL.RPIVX_1; finsi +si present(GLOBAL.RPIVY_1) alors CORR.RPIVY1731 = GLOBAL.RPIVY_1; finsi +si present(GLOBAL.RPIVZ_1) alors CORR.RPIVZ1731 = GLOBAL.RPIVZ_1; finsi +si present(GLOBAL.RPISD_1) alors CORR.RPISD1731 = GLOBAL.RPISD_1; finsi +si present(GLOBAL.RPISE_1) alors CORR.RPISE1731 = GLOBAL.RPISE_1; finsi +si present(GLOBAL.RPISF_1) alors CORR.RPISF1731 = GLOBAL.RPISF_1; finsi +si present(GLOBAL.RPISG_1) alors CORR.RPISG1731 = GLOBAL.RPISG_1; finsi +si present(GLOBAL.RPIVD_1) alors CORR.RPIVD1731 = GLOBAL.RPIVD_1; finsi +si present(GLOBAL.RPIVE_1) alors CORR.RPIVE1731 = GLOBAL.RPIVE_1; finsi +si present(GLOBAL.RPIVF_1) alors CORR.RPIVF1731 = GLOBAL.RPIVF_1; finsi +si present(GLOBAL.RPIVG_1) alors CORR.RPIVG1731 = GLOBAL.RPIVG_1; finsi +si present(GLOBAL.RPIQR_1) alors CORR.RPIQR1731 = GLOBAL.RPIQR_1; finsi +si present(GLOBAL.RPIQS_1) alors CORR.RPIQS1731 = GLOBAL.RPIQS_1; finsi +si present(GLOBAL.RPIQT_1) alors CORR.RPIQT1731 = GLOBAL.RPIQT_1; finsi +si present(GLOBAL.RPIQU_1) alors CORR.RPIQU1731 = GLOBAL.RPIQU_1; finsi +si present(GLOBAL.RNORMGH_1) alors CORR.RNORMGH1731 = GLOBAL.RNORMGH_1; finsi +si present(GLOBAL.RNORMEF_1) alors CORR.RNORMEF1731 = GLOBAL.RNORMEF_1; finsi +si present(GLOBAL.RNORMCD_1) alors CORR.RNORMCD1731 = GLOBAL.RNORMCD_1; finsi +si present(GLOBAL.RNORMAB_1) alors CORR.RNORMAB1731 = GLOBAL.RNORMAB_1; finsi +si present(GLOBAL.RCELMS_1) alors CORR.RCELMS1731 = GLOBAL.RCELMS_1; finsi +si present(GLOBAL.RCELMO_1) alors CORR.RCELMO1731 = GLOBAL.RCELMO_1; finsi +si present(GLOBAL.RCELMT_1) alors CORR.RCELMT1731 = GLOBAL.RCELMT_1; finsi +si present(GLOBAL.RCELMP_1) alors CORR.RCELMP1731 = GLOBAL.RCELMP_1; finsi +si present(GLOBAL.RCELMU_1) alors CORR.RCELMU1731 = GLOBAL.RCELMU_1; finsi +si present(GLOBAL.RCELMQ_1) alors CORR.RCELMQ1731 = GLOBAL.RCELMQ_1; finsi +si present(GLOBAL.RCELMV_1) alors CORR.RCELMV1731 = GLOBAL.RCELMV_1; finsi +si present(GLOBAL.RCELMR_1) alors CORR.RCELMR1731 = GLOBAL.RCELMR_1; finsi +si present(GLOBAL.RCELYI_1) alors CORR.RCELYI1731 = GLOBAL.RCELYI_1; finsi +si present(GLOBAL.RCELYJ_1) alors CORR.RCELYJ1731 = GLOBAL.RCELYJ_1; finsi +si present(GLOBAL.RCELYK_1) alors CORR.RCELYK1731 = GLOBAL.RCELYK_1; finsi +si present(GLOBAL.RCELYL_1) alors CORR.RCELYL1731 = GLOBAL.RCELYL_1; finsi +si present(GLOBAL.RCELZI_1) alors CORR.RCELZI1731 = GLOBAL.RCELZI_1; finsi +si present(GLOBAL.RCELZJ_1) alors CORR.RCELZJ1731 = GLOBAL.RCELZJ_1; finsi +si present(GLOBAL.RCELZK_1) alors CORR.RCELZK1731 = GLOBAL.RCELZK_1; finsi +si present(GLOBAL.RCELZL_1) alors CORR.RCELZL1731 = GLOBAL.RCELZL_1; finsi +si present(GLOBAL.RCELKC_1) alors CORR.RCELKC1731 = GLOBAL.RCELKC_1; finsi +si present(GLOBAL.RCELKD_1) alors CORR.RCELKD1731 = GLOBAL.RCELKD_1; finsi +si present(GLOBAL.RCELHZ_1) alors CORR.RCELHZ1731 = GLOBAL.RCELHZ_1; finsi +si present(GLOBAL.RCELKU_1) alors CORR.RCELKU1731 = GLOBAL.RCELKU_1; finsi +si present(GLOBAL.RCELKT_1) alors CORR.RCELKT1731 = GLOBAL.RCELKT_1; finsi +si present(GLOBAL.RCELKV_1) alors CORR.RCELKV1731 = GLOBAL.RCELKV_1; finsi +si present(GLOBAL.RCELREPWW_1) alors CORR.RCELREPWW1731 = GLOBAL.RCELREPWW_1; finsi +si present(GLOBAL.RCELREPWV_1) alors CORR.RCELREPWV1731 = GLOBAL.RCELREPWV_1; finsi +si present(GLOBAL.RCELREPWU_1) alors CORR.RCELREPWU1731 = GLOBAL.RCELREPWU_1; finsi +si present(GLOBAL.RCELREPWT_1) alors CORR.RCELREPWT1731 = GLOBAL.RCELREPWT_1; finsi +si present(GLOBAL.RCELRU_1) alors CORR.RCELRU1731 = GLOBAL.RCELRU_1; finsi +si present(GLOBAL.RCELRT_1) alors CORR.RCELRT1731 = GLOBAL.RCELRT_1; finsi +si present(GLOBAL.RHEBE_1) alors CORR.RHEBE1731 = GLOBAL.RHEBE_1; finsi +si present(GLOBAL.RREPA_1) alors CORR.RREPA1731 = GLOBAL.RREPA_1; finsi +si present(GLOBAL.RLOCANAH_1) alors CORR.RLOCANAH1731 = GLOBAL.RLOCANAH_1; finsi +si present(GLOBAL.RSNCV_1) alors CORR.RSNCV1731 = GLOBAL.RSNCV_1; finsi +si present(GLOBAL.RSNCS_1) alors CORR.RSNCS1731 = GLOBAL.RSNCS_1; finsi +si present(GLOBAL.RSNCX_1) alors CORR.RSNCX1731 = GLOBAL.RSNCX_1; finsi +si present(GLOBAL.RSNCA_1) alors CORR.RSNCA1731 = GLOBAL.RSNCA_1; finsi +si present(GLOBAL.RSNDC_1) alors CORR.RSNDC1731 = GLOBAL.RSNDC_1; finsi +si present(GLOBAL.RSNCT_1) alors CORR.RSNCT1731 = GLOBAL.RSNCT_1; finsi +si present(GLOBAL.RSNCW_1) alors CORR.RSNCW1731 = GLOBAL.RSNCW_1; finsi +si present(GLOBAL.RSNCU_1) alors CORR.RSNCU1731 = GLOBAL.RSNCU_1; finsi +si present(GLOBAL.RSNCO_1) alors CORR.RSNCO1731 = GLOBAL.RSNCO_1; finsi +si present(GLOBAL.RSNCP_1) alors CORR.RSNCP1731 = GLOBAL.RSNCP_1; finsi +si present(GLOBAL.RSNCQ_1) alors CORR.RSNCQ1731 = GLOBAL.RSNCQ_1; finsi +si present(GLOBAL.RSNCH_1) alors CORR.RSNCH1731 = GLOBAL.RSNCH_1; finsi +si present(GLOBAL.RSNCI_1) alors CORR.RSNCI1731 = GLOBAL.RSNCI_1; finsi +si present(GLOBAL.RSNBS_1) alors CORR.RSNBS1731 = GLOBAL.RSNBS_1; finsi +si present(GLOBAL.RSNBT_1) alors CORR.RSNBT1731 = GLOBAL.RSNBT_1; finsi +si present(GLOBAL.RSNBU_1) alors CORR.RSNBU1731 = GLOBAL.RSNBU_1; finsi +si present(GLOBAL.RSNBW_1) alors CORR.RSNBW1731 = GLOBAL.RSNBW_1; finsi +si present(GLOBAL.RSNGW_1) alors CORR.RSNGW1731 = GLOBAL.RSNGW_1; finsi +si present(GLOBAL.RNOUV_1) alors CORR.RNOUV1731 = GLOBAL.RNOUV_1; finsi +si present(GLOBAL.RPENTCY_1) alors CORR.RPENTCY1731 = GLOBAL.RPENTCY_1; finsi +si present(GLOBAL.RPENTDY_1) alors CORR.RPENTDY1731 = GLOBAL.RPENTDY_1; finsi +si present(GLOBAL.RPENTEY_1) alors CORR.RPENTEY1731 = GLOBAL.RPENTEY_1; finsi +si present(GLOBAL.RPENTFY_1) alors CORR.RPENTFY1731 = GLOBAL.RPENTFY_1; finsi +si present(GLOBAL.RPENTGY_1) alors CORR.RPENTGY1731 = GLOBAL.RPENTGY_1; finsi +si present(GLOBAL.RPENTEK_1) alors CORR.RPENTEK1731 = GLOBAL.RPENTEK_1; finsi +si present(GLOBAL.RILMHO_1) alors CORR.RILMHO1731 = GLOBAL.RILMHO_1; finsi +si present(GLOBAL.RILMHT_1) alors CORR.RILMHT1731 = GLOBAL.RILMHT_1; finsi +si present(GLOBAL.RILMHP_1) alors CORR.RILMHP1731 = GLOBAL.RILMHP_1; finsi +si present(GLOBAL.RILMHU_1) alors CORR.RILMHU1731 = GLOBAL.RILMHU_1; finsi +si present(GLOBAL.RILMHQ_1) alors CORR.RILMHQ1731 = GLOBAL.RILMHQ_1; finsi +si present(GLOBAL.RILMHV_1) alors CORR.RILMHV1731 = GLOBAL.RILMHV_1; finsi +si present(GLOBAL.RILMHR_1) alors CORR.RILMHR1731 = GLOBAL.RILMHR_1; finsi +si present(GLOBAL.RILMHW_1) alors CORR.RILMHW1731 = GLOBAL.RILMHW_1; finsi +si present(GLOBAL.RILMHS_1) alors CORR.RILMHS1731 = GLOBAL.RILMHS_1; finsi +si present(GLOBAL.RILMHX_1) alors CORR.RILMHX1731 = GLOBAL.RILMHX_1; finsi +si present(GLOBAL.RILMOT_1) alors CORR.RILMOT1731 = GLOBAL.RILMOT_1; finsi +si present(GLOBAL.RILMOS_1) alors CORR.RILMOS1731 = GLOBAL.RILMOS_1; finsi +si present(GLOBAL.RILMOR_1) alors CORR.RILMOR1731 = GLOBAL.RILMOR_1; finsi +si present(GLOBAL.RILMOQ_1) alors CORR.RILMOQ1731 = GLOBAL.RILMOQ_1; finsi +si present(GLOBAL.RILMOP_1) alors CORR.RILMOP1731 = GLOBAL.RILMOP_1; finsi +si present(GLOBAL.RILMSC_1) alors CORR.RILMSC1731 = GLOBAL.RILMSC_1; finsi +si present(GLOBAL.RILMSB_1) alors CORR.RILMSB1731 = GLOBAL.RILMSB_1; finsi +si present(GLOBAL.RILMSA_1) alors CORR.RILMSA1731 = GLOBAL.RILMSA_1; finsi +si present(GLOBAL.RILMSO_1) alors CORR.RILMSO1731 = GLOBAL.RILMSO_1; finsi +si present(GLOBAL.RILMSN_1) alors CORR.RILMSN1731 = GLOBAL.RILMSN_1; finsi +si present(GLOBAL.RILMSP_1) alors CORR.RILMSP1731 = GLOBAL.RILMSP_1; finsi +si present(GLOBAL.RCODOY_1) alors CORR.RCODOY1731 = GLOBAL.RCODOY_1; finsi +si present(GLOBAL.RCODPZ_1) alors CORR.RCODPZ1731 = GLOBAL.RCODPZ_1; finsi +si present(GLOBAL.RCODMZ_1) alors CORR.RCODMZ1731 = GLOBAL.RCODMZ_1; finsi +si present(GLOBAL.RSOCREPR_1) alors CORR.RSOCREPR1731 = GLOBAL.RSOCREPR_1; finsi +si present(GLOBAL.RCOD7KZ_1) alors CORR.RCOD7KZ1731 = GLOBAL.RCOD7KZ_1; finsi +si present(GLOBAL.RCOD7KY_1) alors CORR.RCOD7KY1731 = GLOBAL.RCOD7KY_1; finsi +si present(GLOBAL.RCOD7KX_1) alors CORR.RCOD7KX1731 = GLOBAL.RCOD7KX_1; finsi +si present(GLOBAL.RRESTIMONX_1) alors CORR.RRESTIMONX1731 = GLOBAL.RRESTIMONX_1; finsi +si present(GLOBAL.RRESTIMONY_1) alors CORR.RRESTIMONY1731 = GLOBAL.RRESTIMONY_1; finsi +si present(GLOBAL.RRESTIMO_1) alors CORR.RRESTIMO1731 = GLOBAL.RRESTIMO_1; finsi +si present(GLOBAL.RRESTIMO1_1) alors CORR.RRESTIMO11731 = GLOBAL.RRESTIMO1_1; finsi +si present(GLOBAL.RDONS_1) alors CORR.RDONS1731 = GLOBAL.RDONS_1; finsi +si present(GLOBAL.RDONDJ_1) alors CORR.RDONDJ1731 = GLOBAL.RDONDJ_1; finsi +si present(GLOBAL.RDONDO_1) alors CORR.RDONDO1731 = GLOBAL.RDONDO_1; finsi +si present(GLOBAL.BADONJ) alors CORR.BADONJ1731 = GLOBAL.BADONJ; finsi +si present(GLOBAL.BADONO) alors CORR.BADONO1731 = GLOBAL.BADONO; finsi +si present(GLOBAL.RRETU_1) alors CORR.RRETU1731 = GLOBAL.RRETU_1; finsi +si present(GLOBAL.RINNO_1) alors CORR.RINNO1731 = GLOBAL.RINNO_1; finsi +si present(GLOBAL.RRPRESCOMP_1) alors CORR.RRPRESCOMP1731 = GLOBAL.RRPRESCOMP_1; finsi +si present(GLOBAL.RDIFAGRI_1) alors CORR.RDIFAGRI1731 = GLOBAL.RDIFAGRI_1; finsi +si present(GLOBAL.RREHAB_1) alors CORR.RREHAB1731 = GLOBAL.RREHAB_1; finsi +si present(GLOBAL.A10RFOR_1) alors CORR.A10RFOR1731 = GLOBAL.A10RFOR_1; finsi +si present(GLOBAL.RLOG01_1) alors CORR.RLOG011731 = GLOBAL.RLOG01_1; finsi +si present(GLOBAL.RLOG02_1) alors CORR.RLOG021731 = GLOBAL.RLOG02_1; finsi +si present(GLOBAL.RLOG01_1) alors CORR.RLOG031731 = GLOBAL.RLOG01_1; finsi +si present(GLOBAL.RLOG04_1) alors CORR.RLOG041731 = GLOBAL.RLOG04_1; finsi +si present(GLOBAL.RLOG05_1) alors CORR.RLOG051731 = GLOBAL.RLOG05_1; finsi +si present(GLOBAL.RLOG06_1) alors CORR.RLOG061731 = GLOBAL.RLOG06_1; finsi +si present(GLOBAL.RLOG07_1) alors CORR.RLOG071731 = GLOBAL.RLOG07_1; finsi +si present(GLOBAL.RLOG08_1) alors CORR.RLOG081731 = GLOBAL.RLOG08_1; finsi +si present(GLOBAL.RLOG09_1) alors CORR.RLOG091731 = GLOBAL.RLOG09_1; finsi +si present(GLOBAL.RLOG10_1) alors CORR.RLOG101731 = GLOBAL.RLOG10_1; finsi +si present(GLOBAL.RLOG11_1) alors CORR.RLOG111731 = GLOBAL.RLOG11_1; finsi +si present(GLOBAL.RLOG12_1) alors CORR.RLOG121731 = GLOBAL.RLOG12_1; finsi +si present(GLOBAL.RLOG13_1) alors CORR.RLOG131731 = GLOBAL.RLOG13_1; finsi +si present(GLOBAL.RLOG14_1) alors CORR.RLOG141731 = GLOBAL.RLOG14_1; finsi +si present(GLOBAL.RLOG15_1) alors CORR.RLOG151731 = GLOBAL.RLOG15_1; finsi +si present(GLOBAL.RLOG16_1) alors CORR.RLOG161731 = GLOBAL.RLOG16_1; finsi +si present(GLOBAL.RLOG17_1) alors CORR.RLOG171731 = GLOBAL.RLOG17_1; finsi +si present(GLOBAL.RLOG18_1) alors CORR.RLOG181731 = GLOBAL.RLOG18_1; finsi +si present(GLOBAL.RLOG19_1) alors CORR.RLOG191731 = GLOBAL.RLOG19_1; finsi +si present(GLOBAL.RLOG20_1) alors CORR.RLOG201731 = GLOBAL.RLOG20_1; finsi +si present(GLOBAL.RLOG21_1) alors CORR.RLOG211731 = GLOBAL.RLOG21_1; finsi +si present(GLOBAL.RLOG22_1) alors CORR.RLOG221731 = GLOBAL.RLOG22_1; finsi +si present(GLOBAL.RLOG23_1) alors CORR.RLOG231731 = GLOBAL.RLOG23_1; finsi +si present(GLOBAL.RLOG24_1) alors CORR.RLOG241731 = GLOBAL.RLOG24_1; finsi +si present(GLOBAL.RLOG25_1) alors CORR.RLOG251731 = GLOBAL.RLOG25_1; finsi +si present(GLOBAL.RLOG26_1) alors CORR.RLOG261731 = GLOBAL.RLOG26_1; finsi +si present(GLOBAL.RLOG27_1) alors CORR.RLOG271731 = GLOBAL.RLOG27_1; finsi +si present(GLOBAL.RLOG28_1) alors CORR.RLOG281731 = GLOBAL.RLOG28_1; finsi +si present(GLOBAL.RLOG29_1) alors CORR.RLOG291731 = GLOBAL.RLOG29_1; finsi +si present(GLOBAL.RLOG30_1) alors CORR.RLOG301731 = GLOBAL.RLOG30_1; finsi +si present(GLOBAL.RLOG31_1) alors CORR.RLOG311731 = GLOBAL.RLOG31_1; finsi +si present(GLOBAL.RLOG32_1) alors CORR.RLOG321731 = GLOBAL.RLOG32_1; finsi +si present(GLOBAL.RLOG33_1) alors CORR.RLOG331731 = GLOBAL.RLOG33_1; finsi +si present(GLOBAL.RLOG34_1) alors CORR.RLOG341731 = GLOBAL.RLOG34_1; finsi +si present(GLOBAL.RLOG35_1) alors CORR.RLOG351731 = GLOBAL.RLOG35_1; finsi +si present(GLOBAL.RLOG36_1) alors CORR.RLOG361731 = GLOBAL.RLOG36_1; finsi +si present(GLOBAL.RLOG37_1) alors CORR.RLOG371731 = GLOBAL.RLOG37_1; finsi +si present(GLOBAL.RLOG38_1) alors CORR.RLOG381731 = GLOBAL.RLOG38_1; finsi +si present(GLOBAL.RLOG39_1) alors CORR.RLOG391731 = GLOBAL.RLOG39_1; finsi +si present(GLOBAL.RLOG40_1) alors CORR.RLOG401731 = GLOBAL.RLOG40_1; finsi +si present(GLOBAL.RLOG41_1) alors CORR.RLOG411731 = GLOBAL.RLOG41_1; finsi +si present(GLOBAL.RLOG42_1) alors CORR.RLOG421731 = GLOBAL.RLOG42_1; finsi +si present(GLOBAL.RLOG43_1) alors CORR.RLOG431731 = GLOBAL.RLOG43_1; finsi +si present(GLOBAL.RLOG44_1) alors CORR.RLOG441731 = GLOBAL.RLOG44_1; finsi +si present(GLOBAL.RLOG45_1) alors CORR.RLOG451731 = GLOBAL.RLOG45_1; finsi +si present(GLOBAL.RLOG46_1) alors CORR.RLOG461731 = GLOBAL.RLOG46_1; finsi +si present(GLOBAL.RLOG47_1) alors CORR.RLOG471731 = GLOBAL.RLOG47_1; finsi +si present(GLOBAL.RLOG48_1) alors CORR.RLOG481731 = GLOBAL.RLOG48_1; finsi +si present(GLOBAL.RLOG49_1) alors CORR.RLOG491731 = GLOBAL.RLOG49_1; finsi +si present(GLOBAL.RLOG50_1) alors CORR.RLOG501731 = GLOBAL.RLOG50_1; finsi +si present(GLOBAL.RLOG51_1) alors CORR.RLOG511731 = GLOBAL.RLOG51_1; finsi +si present(GLOBAL.RLOG52_1) alors CORR.RLOG521731 = GLOBAL.RLOG52_1; finsi +si present(GLOBAL.RLOG53_1) alors CORR.RLOG531731 = GLOBAL.RLOG53_1; finsi +si present(GLOBAL.RLOG54_1) alors CORR.RLOG541731 = GLOBAL.RLOG54_1; finsi +si present(GLOBAL.RLOG55_1) alors CORR.RLOG551731 = GLOBAL.RLOG55_1; finsi +si present(GLOBAL.RLOG56_1) alors CORR.RLOG561731 = GLOBAL.RLOG56_1; finsi +si present(GLOBAL.RLOG57_1) alors CORR.RLOG571731 = GLOBAL.RLOG57_1; finsi +si present(GLOBAL.RLOG58_1) alors CORR.RLOG581731 = GLOBAL.RLOG58_1; finsi +si present(GLOBAL.RLOG59_1) alors CORR.RLOG591731 = GLOBAL.RLOG59_1; finsi +si present(GLOBAL.RLOG60_1) alors CORR.RLOG601731 = GLOBAL.RLOG60_1; finsi +si present(GLOBAL.RLOGHVJ_1) alors CORR.RLOGHVJ1731 = GLOBAL.RLOGHVJ_1; finsi +si present(GLOBAL.RLOGHVK_1) alors CORR.RLOGHVK1731 = GLOBAL.RLOGHVK_1; finsi +si present(GLOBAL.RLOGHVL_1) alors CORR.RLOGHVL1731 = GLOBAL.RLOGHVL_1; finsi +si present(GLOBAL.RSOC35_1) alors CORR.RSOC351731 = GLOBAL.RSOC35_1; finsi +si present(GLOBAL.RSOC36_1) alors CORR.RSOC361731 = GLOBAL.RSOC36_1; finsi +si present(GLOBAL.RSOC37_1) alors CORR.RSOC371731 = GLOBAL.RSOC37_1; finsi +si present(GLOBAL.RSOC38_1) alors CORR.RSOC381731 = GLOBAL.RSOC38_1; finsi +si present(GLOBAL.RSOC39_1) alors CORR.RSOC391731 = GLOBAL.RSOC39_1; finsi +si present(GLOBAL.RSOC40_1) alors CORR.RSOC401731 = GLOBAL.RSOC40_1; finsi +si present(GLOBAL.RSOC41_1) alors CORR.RSOC411731 = GLOBAL.RSOC41_1; finsi +si present(GLOBAL.RSOC42_1) alors CORR.RSOC421731 = GLOBAL.RSOC42_1; finsi +si present(GLOBAL.RSOC43_1) alors CORR.RSOC431731 = GLOBAL.RSOC43_1; finsi +si present(GLOBAL.RSOC44_1) alors CORR.RSOC441731 = GLOBAL.RSOC44_1; finsi +si present(GLOBAL.RSOCHYD_1) alors CORR.RSOCHYD1731 = GLOBAL.RSOCHYD_1; finsi +si present(GLOBAL.RSOCHYC_1) alors CORR.RSOCHYC1731 = GLOBAL.RSOCHYC_1; finsi +si present(GLOBAL.RSOCHYDR_1) alors CORR.RSOCHYDR1731 = GLOBAL.RSOCHYDR_1; finsi +si present(GLOBAL.RSOCHYCR_1) alors CORR.RSOCHYCR1731 = GLOBAL.RSOCHYCR_1; finsi +si present(GLOBAL.RSOCHYH_1) alors CORR.RSOCHYH1731 = GLOBAL.RSOCHYH_1; finsi +si present(GLOBAL.RSOCHYHR_1) alors CORR.RSOCHYHR1731 = GLOBAL.RSOCHYHR_1; finsi +si present(GLOBAL.RSOCHYI_1) alors CORR.RSOCHYI1731 = GLOBAL.RSOCHYI_1; finsi +si present(GLOBAL.RSOCHYIR_1) alors CORR.RSOCHYIR1731 = GLOBAL.RSOCHYIR_1; finsi +si present(GLOBAL.RSOCHYE_1) alors CORR.RSOCHYE1731 = GLOBAL.RSOCHYE_1; finsi +si present(GLOBAL.RSOCHYER_1) alors CORR.RSOCHYER1731 = GLOBAL.RSOCHYER_1; finsi +si present(GLOBAL.RSOCHYF_1) alors CORR.RSOCHYF1731 = GLOBAL.RSOCHYF_1; finsi +si present(GLOBAL.RSOCHYFR_1) alors CORR.RSOCHYFR1731 = GLOBAL.RSOCHYFR_1; finsi +si present(GLOBAL.RSOCHYG_1) alors CORR.RSOCHYG1731 = GLOBAL.RSOCHYG_1; finsi +si present(GLOBAL.RSOCHYGR_1) alors CORR.RSOCHYGR1731 = GLOBAL.RSOCHYGR_1; finsi +si present(GLOBAL.RLOCHFT_1) alors CORR.RLOCHFT1731 = GLOBAL.RLOCHFT_1; finsi +si present(GLOBAL.RLOCHFO_1) alors CORR.RLOCHFO1731 = GLOBAL.RLOCHFO_1; finsi +si present(GLOBAL.RLOCHFS_1) alors CORR.RLOCHFS1731 = GLOBAL.RLOCHFS_1; finsi +si present(GLOBAL.RLOCHFN_1) alors CORR.RLOCHFN1731 = GLOBAL.RLOCHFN_1; finsi +si present(GLOBAL.RLOCHFP_1) alors CORR.RLOCHFP1731 = GLOBAL.RLOCHFP_1; finsi +si present(GLOBAL.RLOCHFU_1) alors CORR.RLOCHFU1731 = GLOBAL.RLOCHFU_1; finsi +si present(GLOBAL.RLOCHFR_1) alors CORR.RLOCHFR1731 = GLOBAL.RLOCHFR_1; finsi +si present(GLOBAL.RLOCHFW_1) alors CORR.RLOCHFW1731 = GLOBAL.RLOCHFW_1; finsi +si present(GLOBAL.RLOCHFTR_1) alors CORR.RLOCHFTR1731 = GLOBAL.RLOCHFTR_1; finsi +si present(GLOBAL.RLOCHFOR_1) alors CORR.RLOCHFOR1731 = GLOBAL.RLOCHFOR_1; finsi +si present(GLOBAL.RLOCHFSR_1) alors CORR.RLOCHFSR1731 = GLOBAL.RLOCHFSR_1; finsi +si present(GLOBAL.RLOCHFNR_1) alors CORR.RLOCHFNR1731 = GLOBAL.RLOCHFNR_1; finsi +si present(GLOBAL.RLOCHGT_1) alors CORR.RLOCHGT1731 = GLOBAL.RLOCHGT_1; finsi +si present(GLOBAL.RLOCHGS_1) alors CORR.RLOCHGS1731 = GLOBAL.RLOCHGS_1; finsi +si present(GLOBAL.RLOCHGU_1) alors CORR.RLOCHGU1731 = GLOBAL.RLOCHGU_1; finsi +si present(GLOBAL.RLOCHGW_1) alors CORR.RLOCHGW1731 = GLOBAL.RLOCHGW_1; finsi +si present(GLOBAL.RLOCHGTR_1) alors CORR.RLOCHGTR1731 = GLOBAL.RLOCHGTR_1; finsi +si present(GLOBAL.RLOCHGSR_1) alors CORR.RLOCHGSR1731 = GLOBAL.RLOCHGSR_1; finsi +si present(GLOBAL.RLOCHHT_1) alors CORR.RLOCHHT1731 = GLOBAL.RLOCHHT_1; finsi +si present(GLOBAL.RLOCHHS_1) alors CORR.RLOCHHS1731 = GLOBAL.RLOCHHS_1; finsi +si present(GLOBAL.RLOCHHU_1) alors CORR.RLOCHHU1731 = GLOBAL.RLOCHHU_1; finsi +si present(GLOBAL.RLOCHHW_1) alors CORR.RLOCHHW1731 = GLOBAL.RLOCHHW_1; finsi +si present(GLOBAL.RLOCHHTR_1) alors CORR.RLOCHHTR1731 = GLOBAL.RLOCHHTR_1; finsi +si present(GLOBAL.RLOCHHSR_1) alors CORR.RLOCHHSR1731 = GLOBAL.RLOCHHSR_1; finsi +si present(GLOBAL.RLOCHIT_1) alors CORR.RLOCHIT1731 = GLOBAL.RLOCHIT_1; finsi +si present(GLOBAL.RLOCHIS_1) alors CORR.RLOCHIS1731 = GLOBAL.RLOCHIS_1; finsi +si present(GLOBAL.RLOCHIU_1) alors CORR.RLOCHIU1731 = GLOBAL.RLOCHIU_1; finsi +si present(GLOBAL.RLOCHIW_1) alors CORR.RLOCHIW1731 = GLOBAL.RLOCHIW_1; finsi +si present(GLOBAL.RLOCHITR_1) alors CORR.RLOCHITR1731 = GLOBAL.RLOCHITR_1; finsi +si present(GLOBAL.RLOCHISR_1) alors CORR.RLOCHISR1731 = GLOBAL.RLOCHISR_1; finsi +si present(GLOBAL.RLOCHJS_1) alors CORR.RLOCHJS1731 = GLOBAL.RLOCHJS_1; finsi +si present(GLOBAL.RLOCHJSR_1) alors CORR.RLOCHJSR1731 = GLOBAL.RLOCHJSR_1; finsi +si present(GLOBAL.RLOCHJT_1) alors CORR.RLOCHJT1731 = GLOBAL.RLOCHJT_1; finsi +si present(GLOBAL.RLOCHJTR_1) alors CORR.RLOCHJTR1731 = GLOBAL.RLOCHJTR_1; finsi +si present(GLOBAL.RLOCHJU_1) alors CORR.RLOCHJU1731 = GLOBAL.RLOCHJU_1; finsi +si present(GLOBAL.RLOCHJW_1) alors CORR.RLOCHJW1731 = GLOBAL.RLOCHJW_1; finsi +si present(GLOBAL.RLOCHKS_1) alors CORR.RLOCHKS1731 = GLOBAL.RLOCHKS_1; finsi +si present(GLOBAL.RLOCHKSR_1) alors CORR.RLOCHKSR1731 = GLOBAL.RLOCHKSR_1; finsi +si present(GLOBAL.RLOCHKT_1) alors CORR.RLOCHKT1731 = GLOBAL.RLOCHKT_1; finsi +si present(GLOBAL.RLOCHKTR_1) alors CORR.RLOCHKTR1731 = GLOBAL.RLOCHKTR_1; finsi +si present(GLOBAL.RLOCHKU_1) alors CORR.RLOCHKU1731 = GLOBAL.RLOCHKU_1; finsi +si present(GLOBAL.RLOCHKW_1) alors CORR.RLOCHKW1731 = GLOBAL.RLOCHKW_1; finsi +si present(GLOBAL.RLOGHVM_1) alors CORR.RLOGHVM1731 = GLOBAL.RLOGHVM_1; finsi +si present(GLOBAL.RLOGHVN_1) alors CORR.RLOGHVN1731 = GLOBAL.RLOGHVN_1; finsi +si present(GLOBAL.RSC301_1) alors CORR.RSC3011731 = GLOBAL.RSC301_1; finsi +si present(GLOBAL.RSC302_1) alors CORR.RSC3021731 = GLOBAL.RSC302_1; finsi +si present(GLOBAL.RSC303_1) alors CORR.RSC3031731 = GLOBAL.RSC303_1; finsi +si present(GLOBAL.RSC304_1) alors CORR.RSC3041731 = GLOBAL.RSC304_1; finsi +si present(GLOBAL.RSC305_1) alors CORR.RSC3051731 = GLOBAL.RSC305_1; finsi +si present(GLOBAL.RSC306_1) alors CORR.RSC3061731 = GLOBAL.RSC306_1; finsi +si present(GLOBAL.RSC307_1) alors CORR.RSC3071731 = GLOBAL.RSC307_1; finsi +si present(GLOBAL.RSC308_1) alors CORR.RSC3081731 = GLOBAL.RSC308_1; finsi +si present(GLOBAL.RSC309_1) alors CORR.RSC3091731 = GLOBAL.RSC309_1; finsi +si present(GLOBAL.RSC310_1) alors CORR.RSC3101731 = GLOBAL.RSC310_1; finsi +si present(GLOBAL.RSC311_1) alors CORR.RSC3111731 = GLOBAL.RSC311_1; finsi +si present(GLOBAL.RSC312_1) alors CORR.RSC3121731 = GLOBAL.RSC312_1; finsi +si present(GLOBAL.ASC601_1) alors CORR.ASC6011731 = GLOBAL.ASC601_1; finsi +si present(GLOBAL.RSC601_1) alors CORR.RSC6011731 = GLOBAL.RSC601_1; finsi +si present(GLOBAL.ASC602_1) alors CORR.ASC6021731 = GLOBAL.ASC602_1; finsi +si present(GLOBAL.RSC602_1) alors CORR.RSC6021731 = GLOBAL.RSC602_1; finsi +si present(GLOBAL.ASC603_1) alors CORR.ASC6031731 = GLOBAL.ASC603_1; finsi +si present(GLOBAL.RSC603_1) alors CORR.RSC6031731 = GLOBAL.RSC603_1; finsi +si present(GLOBAL.ASC604_1) alors CORR.ASC6041731 = GLOBAL.ASC604_1; finsi +si present(GLOBAL.RSC604_1) alors CORR.RSC6041731 = GLOBAL.RSC604_1; finsi +si present(GLOBAL.ASC605_1) alors CORR.ASC6051731 = GLOBAL.ASC605_1; finsi +si present(GLOBAL.RSC605_1) alors CORR.RSC6051731 = GLOBAL.RSC605_1; finsi +si present(GLOBAL.ASC606_1) alors CORR.ASC6061731 = GLOBAL.ASC606_1; finsi +si present(GLOBAL.RSC606_1) alors CORR.RSC6061731 = GLOBAL.RSC606_1; finsi +si present(GLOBAL.ASC607_1) alors CORR.ASC6071731 = GLOBAL.ASC607_1; finsi +si present(GLOBAL.RSC607_1) alors CORR.RSC6071731 = GLOBAL.RSC607_1; finsi +si present(GLOBAL.ASC608_1) alors CORR.ASC6081731 = GLOBAL.ASC608_1; finsi +si present(GLOBAL.RSC608_1) alors CORR.RSC6081731 = GLOBAL.RSC608_1; finsi +si present(GLOBAL.ASC609_1) alors CORR.ASC6091731 = GLOBAL.ASC609_1; finsi +si present(GLOBAL.RSC609_1) alors CORR.RSC6091731 = GLOBAL.RSC609_1; finsi +si present(GLOBAL.ASC610_1) alors CORR.ASC6101731 = GLOBAL.ASC610_1; finsi +si present(GLOBAL.RSC610_1) alors CORR.RSC6101731 = GLOBAL.RSC610_1; finsi +si present(GLOBAL.ASC611_1) alors CORR.ASC6111731 = GLOBAL.ASC611_1; finsi +si present(GLOBAL.RSC611_1) alors CORR.RSC6111731 = GLOBAL.RSC611_1; finsi +si present(GLOBAL.ASC612_1) alors CORR.ASC6121731 = GLOBAL.ASC612_1; finsi +si present(GLOBAL.RSC612_1) alors CORR.RSC6121731 = GLOBAL.RSC612_1; finsi +si present(GLOBAL.ASC613_1) alors CORR.ASC6131731 = GLOBAL.ASC613_1; finsi +si present(GLOBAL.RSC613_1) alors CORR.RSC6131731 = GLOBAL.RSC613_1; finsi +si present(GLOBAL.ASC614_1) alors CORR.ASC6141731 = GLOBAL.ASC614_1; finsi +si present(GLOBAL.RSC614_1) alors CORR.RSC6141731 = GLOBAL.RSC614_1; finsi +si present(GLOBAL.ASC615_1) alors CORR.ASC6151731 = GLOBAL.ASC615_1; finsi +si present(GLOBAL.RSC615_1) alors CORR.RSC6151731 = GLOBAL.RSC615_1; finsi +si present(GLOBAL.ASC616_1) alors CORR.ASC6161731 = GLOBAL.ASC616_1; finsi +si present(GLOBAL.RSC616_1) alors CORR.RSC6161731 = GLOBAL.RSC616_1; finsi +si present(GLOBAL.ASC617_1) alors CORR.ASC6171731 = GLOBAL.ASC617_1; finsi +si present(GLOBAL.RSC617_1) alors CORR.RSC6171731 = GLOBAL.RSC617_1; finsi +si present(GLOBAL.ASC618_1) alors CORR.ASC6181731 = GLOBAL.ASC618_1; finsi +si present(GLOBAL.RSC618_1) alors CORR.RSC6181731 = GLOBAL.RSC618_1; finsi +si present(GLOBAL.ASC619_1) alors CORR.ASC6191731 = GLOBAL.ASC619_1; finsi +si present(GLOBAL.RSC619_1) alors CORR.RSC6191731 = GLOBAL.RSC619_1; finsi +si present(GLOBAL.ASC620_1) alors CORR.ASC6201731 = GLOBAL.ASC620_1; finsi +si present(GLOBAL.RSC620_1) alors CORR.RSC6201731 = GLOBAL.RSC620_1; finsi +si present(GLOBAL.ASC621_1) alors CORR.ASC6211731 = GLOBAL.ASC621_1; finsi +si present(GLOBAL.RSC621_1) alors CORR.RSC6211731 = GLOBAL.RSC621_1; finsi +si present(GLOBAL.ASC622_1) alors CORR.ASC6221731 = GLOBAL.ASC622_1; finsi +si present(GLOBAL.RSC622_1) alors CORR.RSC6221731 = GLOBAL.RSC622_1; finsi +si present(GLOBAL.ASC623_1) alors CORR.ASC6231731 = GLOBAL.ASC623_1; finsi +si present(GLOBAL.RSC623_1) alors CORR.RSC6231731 = GLOBAL.RSC623_1; finsi +si present(GLOBAL.ASC801_1) alors CORR.ASC8011731 = GLOBAL.ASC801_1; finsi +si present(GLOBAL.RSC801_1) alors CORR.RSC8011731 = GLOBAL.RSC801_1; finsi +si present(GLOBAL.ASC802_1) alors CORR.ASC8021731 = GLOBAL.ASC802_1; finsi +si present(GLOBAL.RSC802_1) alors CORR.RSC8021731 = GLOBAL.RSC802_1; finsi +si present(GLOBAL.ASC803_1) alors CORR.ASC8031731 = GLOBAL.ASC803_1; finsi +si present(GLOBAL.RSC803_1) alors CORR.RSC8031731 = GLOBAL.RSC803_1; finsi +si present(GLOBAL.ASC804_1) alors CORR.ASC8041731 = GLOBAL.ASC804_1; finsi +si present(GLOBAL.RSC804_1) alors CORR.RSC8041731 = GLOBAL.RSC804_1; finsi +si present(GLOBAL.ASC805_1) alors CORR.ASC8051731 = GLOBAL.ASC805_1; finsi +si present(GLOBAL.RSC805_1) alors CORR.RSC8051731 = GLOBAL.RSC805_1; finsi +si present(GLOBAL.ASC806_1) alors CORR.ASC8061731 = GLOBAL.ASC806_1; finsi +si present(GLOBAL.RSC806_1) alors CORR.RSC8061731 = GLOBAL.RSC806_1; finsi +si present(GLOBAL.ASC807_1) alors CORR.ASC8071731 = GLOBAL.ASC807_1; finsi +si present(GLOBAL.RSC807_1) alors CORR.RSC8071731 = GLOBAL.RSC807_1; finsi +si present(GLOBAL.ASC808_1) alors CORR.ASC8081731 = GLOBAL.ASC808_1; finsi +si present(GLOBAL.RSC808_1) alors CORR.RSC8081731 = GLOBAL.RSC808_1; finsi +si present(GLOBAL.ASC809_1) alors CORR.ASC8091731 = GLOBAL.ASC809_1; finsi +si present(GLOBAL.RSC809_1) alors CORR.RSC8091731 = GLOBAL.RSC809_1; finsi +si present(GLOBAL.ASC7SJ_1) alors CORR.ASC7SJ1731 = GLOBAL.ASC7SJ_1; finsi +si present(GLOBAL.RSC7SJ_1) alors CORR.RSC7SJ1731 = GLOBAL.RSC7SJ_1; finsi +si present(GLOBAL.ASC7SK_1) alors CORR.ASC7SK1731 = GLOBAL.ASC7SK_1; finsi +si present(GLOBAL.RSC7SK_1) alors CORR.RSC7SK1731 = GLOBAL.RSC7SK_1; finsi +si present(GLOBAL.ASC7SR_1) alors CORR.ASC7SR1731 = GLOBAL.ASC7SR_1; finsi +si present(GLOBAL.RSC7SR_1) alors CORR.RSC7SR1731 = GLOBAL.RSC7SR_1; finsi +si present(GLOBAL.ASC7TC_1) alors CORR.ASC7TC1731 = GLOBAL.ASC7TC_1; finsi +si present(GLOBAL.RSC7TC_1) alors CORR.RSC7TC1731 = GLOBAL.RSC7TC_1; finsi +si present(GLOBAL.ASC7TD_1) alors CORR.ASC7TD1731 = GLOBAL.ASC7TD_1; finsi +si present(GLOBAL.RSC7TD_1) alors CORR.RSC7TD1731 = GLOBAL.RSC7TD_1; finsi +si present(GLOBAL.ASC7UA_1) alors CORR.ASC7UA1731 = GLOBAL.ASC7UA_1; finsi +si present(GLOBAL.RSC7UA_1) alors CORR.RSC7UA1731 = GLOBAL.RSC7UA_1; finsi +si present(GLOBAL.ASC7UB_1) alors CORR.ASC7UB1731 = GLOBAL.ASC7UB_1; finsi +si present(GLOBAL.RSC7UB_1) alors CORR.RSC7UB1731 = GLOBAL.RSC7UB_1; finsi +si present(GLOBAL.ASC7UE_1) alors CORR.ASC7UE1731 = GLOBAL.ASC7UE_1; finsi +si present(GLOBAL.RSC7UE_1) alors CORR.RSC7UE1731 = GLOBAL.RSC7UE_1; finsi +si present(GLOBAL.ASC7UG_1) alors CORR.ASC7UG1731 = GLOBAL.ASC7UG_1; finsi +si present(GLOBAL.RSC7UG_1) alors CORR.RSC7UG1731 = GLOBAL.RSC7UG_1; finsi +si present(GLOBAL.ASC7UI_1) alors CORR.ASC7UI1731 = GLOBAL.ASC7UI_1; finsi +si present(GLOBAL.RSC7UI_1) alors CORR.RSC7UI1731 = GLOBAL.RSC7UI_1; finsi +si present(GLOBAL.ASC7UK_1) alors CORR.ASC7UK1731 = GLOBAL.ASC7UK_1; finsi +si present(GLOBAL.RSC7UK_1) alors CORR.RSC7UK1731 = GLOBAL.RSC7UK_1; finsi +si present(GLOBAL.AILMHD_1) alors CORR.AILMHD1731 = GLOBAL.AILMHD_1; finsi +si present(GLOBAL.RILMHD_1) alors CORR.RILMHD1731 = GLOBAL.RILMHD_1; finsi +si present(GLOBAL.AILMHE_1) alors CORR.AILMHE1731 = GLOBAL.AILMHE_1; finsi +si present(GLOBAL.RILMHE_1) alors CORR.RILMHE1731 = GLOBAL.RILMHE_1; finsi +si present(GLOBAL.AILMHF_1) alors CORR.AILMHF1731 = GLOBAL.AILMHF_1; finsi +si present(GLOBAL.RILMHF_1) alors CORR.RILMHF1731 = GLOBAL.RILMHF_1; finsi +si present(GLOBAL.AILMHG_1) alors CORR.AILMHG1731 = GLOBAL.AILMHG_1; finsi +si present(GLOBAL.RILMHG_1) alors CORR.RILMHG1731 = GLOBAL.RILMHG_1; finsi +si present(GLOBAL.AILMHH_1) alors CORR.AILMHH1731 = GLOBAL.AILMHH_1; finsi +si present(GLOBAL.RILMHH_1) alors CORR.RILMHH1731 = GLOBAL.RILMHH_1; finsi +si present(GLOBAL.AILMKE_1) alors CORR.AILMKE1731 = GLOBAL.AILMKE_1; finsi +si present(GLOBAL.RILMKE_1) alors CORR.RILMKE1731 = GLOBAL.RILMKE_1; finsi +si present(GLOBAL.AILMKF_1) alors CORR.AILMKF1731 = GLOBAL.AILMKF_1; finsi +si present(GLOBAL.RILMKF_1) alors CORR.RILMKF1731 = GLOBAL.RILMKF_1; finsi +si present(GLOBAL.AILMKG_1) alors CORR.AILMKG1731 = GLOBAL.AILMKG_1; finsi +si present(GLOBAL.RILMKG_1) alors CORR.RILMKG1731 = GLOBAL.RILMKG_1; finsi +si present(GLOBAL.AILMKH_1) alors CORR.AILMKH1731 = GLOBAL.AILMKH_1; finsi +si present(GLOBAL.RILMKH_1) alors CORR.RILMKH1731 = GLOBAL.RILMKH_1; finsi +si present(GLOBAL.AILMKI_1) alors CORR.AILMKI1731 = GLOBAL.AILMKI_1; finsi +si present(GLOBAL.RILMKI_1) alors CORR.RILMKI1731 = GLOBAL.RILMKI_1; finsi +si present(GLOBAL.AILMOA_1) alors CORR.AILMOA1731 = GLOBAL.AILMOA_1; finsi +si present(GLOBAL.RILMOA_1) alors CORR.RILMOA1731 = GLOBAL.RILMOA_1; finsi +si present(GLOBAL.AILMOB_1) alors CORR.AILMOB1731 = GLOBAL.AILMOB_1; finsi +si present(GLOBAL.RILMOB_1) alors CORR.RILMOB1731 = GLOBAL.RILMOB_1; finsi +si present(GLOBAL.AILMOC_1) alors CORR.AILMOC1731 = GLOBAL.AILMOC_1; finsi +si present(GLOBAL.RILMOC_1) alors CORR.RILMOC1731 = GLOBAL.RILMOC_1; finsi +si present(GLOBAL.AILMOD_1) alors CORR.AILMOD1731 = GLOBAL.AILMOD_1; finsi +si present(GLOBAL.RILMOD_1) alors CORR.RILMOD1731 = GLOBAL.RILMOD_1; finsi +si present(GLOBAL.AILMOE_1) alors CORR.AILMOE1731 = GLOBAL.AILMOE_1; finsi +si present(GLOBAL.RILMOE_1) alors CORR.RILMOE1731 = GLOBAL.RILMOE_1; finsi +si present(GLOBAL.AILMPO_1) alors CORR.AILMPO1731 = GLOBAL.AILMPO_1; finsi +si present(GLOBAL.RILMPO_1) alors CORR.RILMPO1731 = GLOBAL.RILMPO_1; finsi +si present(GLOBAL.AILMPP_1) alors CORR.AILMPP1731 = GLOBAL.AILMPP_1; finsi +si present(GLOBAL.RILMPP_1) alors CORR.RILMPP1731 = GLOBAL.RILMPP_1; finsi +si present(GLOBAL.AILMPQ_1) alors CORR.AILMPQ1731 = GLOBAL.AILMPQ_1; finsi +si present(GLOBAL.RILMPQ_1) alors CORR.RILMPQ1731 = GLOBAL.RILMPQ_1; finsi +si present(GLOBAL.AILMPR_1) alors CORR.AILMPR1731 = GLOBAL.AILMPR_1; finsi +si present(GLOBAL.RILMPR_1) alors CORR.RILMPR1731 = GLOBAL.RILMPR_1; finsi +si present(GLOBAL.AILMPS_1) alors CORR.AILMPS1731 = GLOBAL.AILMPS_1; finsi +si present(GLOBAL.RILMPS_1) alors CORR.RILMPS1731 = GLOBAL.RILMPS_1; finsi +si present(GLOBAL.APIREPJN_1) alors CORR.APIREPJN1731 = GLOBAL.APIREPJN_1; finsi +si present(GLOBAL.RPIJN_1) alors CORR.RPIJN1731 = GLOBAL.RPIJN_1; finsi +si present(GLOBAL.APIREPJO_1) alors CORR.APIREPJO1731 = GLOBAL.APIREPJO_1; finsi +si present(GLOBAL.RPIJO_1) alors CORR.RPIJO1731 = GLOBAL.RPIJO_1; finsi +si present(GLOBAL.APIREPJP_1) alors CORR.APIREPJP1731 = GLOBAL.APIREPJP_1; finsi +si present(GLOBAL.RPIJP_1) alors CORR.RPIJP1731 = GLOBAL.RPIJP_1; finsi +si present(GLOBAL.APIREPJQ_1) alors CORR.APIREPJQ1731 = GLOBAL.APIREPJQ_1; finsi +si present(GLOBAL.RPIJQ_1) alors CORR.RPIJQ1731 = GLOBAL.RPIJQ_1; finsi +si present(GLOBAL.APIJV_1) alors CORR.APIJV1731 = GLOBAL.APIJV_1; finsi +si present(GLOBAL.RPIJV_1) alors CORR.RPIJV1731 = GLOBAL.RPIJV_1; finsi +si present(GLOBAL.APIJW_1) alors CORR.APIJW1731 = GLOBAL.APIJW_1; finsi +si present(GLOBAL.RPIJW_1) alors CORR.RPIJW1731 = GLOBAL.RPIJW_1; finsi +si present(GLOBAL.APIJX_1) alors CORR.APIJX1731 = GLOBAL.APIJX_1; finsi +si present(GLOBAL.RPIJX_1) alors CORR.RPIJX1731 = GLOBAL.RPIJX_1; finsi +si present(GLOBAL.APIJY_1) alors CORR.APIJY1731 = GLOBAL.APIJY_1; finsi +si present(GLOBAL.RPIJY_1) alors CORR.RPIJY1731 = GLOBAL.RPIJY_1; finsi +si present(GLOBAL.ANORMJR_1) alors CORR.ANORMJR1731 = GLOBAL.ANORMJR_1; finsi +si present(GLOBAL.RNORMJR_1) alors CORR.RNORMJR1731 = GLOBAL.RNORMJR_1; finsi +si present(GLOBAL.ANORMJS_1) alors CORR.ANORMJS1731 = GLOBAL.ANORMJS_1; finsi +si present(GLOBAL.RNORMJS_1) alors CORR.RNORMJS1731 = GLOBAL.RNORMJS_1; finsi +si present(GLOBAL.ANORMJT_1) alors CORR.ANORMJT1731 = GLOBAL.ANORMJT_1; finsi +si present(GLOBAL.RNORMJT_1) alors CORR.RNORMJT1731 = GLOBAL.RNORMJT_1; finsi +si present(GLOBAL.ANORMJU_1) alors CORR.ANORMJU1731 = GLOBAL.ANORMJU_1; finsi +si present(GLOBAL.RNORMJU_1) alors CORR.RNORMJU1731 = GLOBAL.RNORMJU_1; finsi +si present(GLOBAL.ANORMLG_1) alors CORR.ANORMLG1731 = GLOBAL.ANORMLG_1; finsi +si present(GLOBAL.RNORMLG_1) alors CORR.RNORMLG1731 = GLOBAL.RNORMLG_1; finsi +si present(GLOBAL.ANORMLH_1) alors CORR.ANORMLH1731 = GLOBAL.ANORMLH_1; finsi +si present(GLOBAL.RNORMLH_1) alors CORR.RNORMLH1731 = GLOBAL.RNORMLH_1; finsi +si present(GLOBAL.ANORMLI_1) alors CORR.ANORMLI1731 = GLOBAL.ANORMLI_1; finsi +si present(GLOBAL.RNORMLI_1) alors CORR.RNORMLI1731 = GLOBAL.RNORMLI_1; finsi +si present(GLOBAL.ANORMLJ_1) alors CORR.ANORMLJ1731 = GLOBAL.ANORMLJ_1; finsi +si present(GLOBAL.RNORMLJ_1) alors CORR.RNORMLJ1731 = GLOBAL.RNORMLJ_1; finsi +si present(GLOBAL.ANOJE_1) alors CORR.ANOJE1731 = GLOBAL.ANOJE_1; finsi +si present(GLOBAL.RNOJE_1) alors CORR.RNOJE1731 = GLOBAL.RNOJE_1; finsi +si present(GLOBAL.ANOJF_1) alors CORR.ANOJF1731 = GLOBAL.ANOJF_1; finsi +si present(GLOBAL.RNOJF_1) alors CORR.RNOJF1731 = GLOBAL.RNOJF_1; finsi +si present(GLOBAL.ANOJG_1) alors CORR.ANOJG1731 = GLOBAL.ANOJG_1; finsi +si present(GLOBAL.RNOJG_1) alors CORR.RNOJG1731 = GLOBAL.RNOJG_1; finsi +si present(GLOBAL.ANOJH_1) alors CORR.ANOJH1731 = GLOBAL.ANOJH_1; finsi +si present(GLOBAL.RNOJH_1) alors CORR.RNOJH1731 = GLOBAL.RNOJH_1; finsi +si present(GLOBAL.ANOIE_1) alors CORR.ANOIE1731 = GLOBAL.ANOIE_1; finsi +si present(GLOBAL.RNOIE_1) alors CORR.RNOIE1731 = GLOBAL.RNOIE_1; finsi +si present(GLOBAL.ANOIF_1) alors CORR.ANOIF1731 = GLOBAL.ANOIF_1; finsi +si present(GLOBAL.RNOIF_1) alors CORR.RNOIF1731 = GLOBAL.RNOIF_1; finsi +si present(GLOBAL.ANOIG_1) alors CORR.ANOIG1731 = GLOBAL.ANOIG_1; finsi +si present(GLOBAL.RNOIG_1) alors CORR.RNOIG1731 = GLOBAL.RNOIG_1; finsi +si present(GLOBAL.ANOIH_1) alors CORR.ANOIH1731 = GLOBAL.ANOIH_1; finsi +si present(GLOBAL.RNOIH_1) alors CORR.RNOIH1731 = GLOBAL.RNOIH_1; finsi +si present(GLOBAL.RNONO_1) alors CORR.RNONO1731 = GLOBAL.RNONO_1; finsi +si present(GLOBAL.RNONP_1) alors CORR.RNONP1731 = GLOBAL.RNONP_1; finsi +si present(GLOBAL.RNONQ_1) alors CORR.RNONQ1731 = GLOBAL.RNONQ_1; finsi +si present(GLOBAL.RNONR_1) alors CORR.RNONR1731 = GLOBAL.RNONR_1; finsi +si present(GLOBAL.RCOD7KW_1) alors CORR.RCOD7KW1731 = GLOBAL.RCOD7KW_1; finsi +si present(GLOBAL.RCELMA_1) alors CORR.RCELMA1731 = GLOBAL.RCELMA_1; finsi +si present(GLOBAL.RCELMB_1) alors CORR.RCELMB1731 = GLOBAL.RCELMB_1; finsi +si present(GLOBAL.RCELMC_1) alors CORR.RCELMC1731 = GLOBAL.RCELMC_1; finsi +si present(GLOBAL.RCELMD_1) alors CORR.RCELMD1731 = GLOBAL.RCELMD_1; finsi +si present(GLOBAL.RCELMI_1) alors CORR.RCELMI1731 = GLOBAL.RCELMI_1; finsi +si present(GLOBAL.RCELMJ_1) alors CORR.RCELMJ1731 = GLOBAL.RCELMJ_1; finsi +si present(GLOBAL.RCELMK_1) alors CORR.RCELMK1731 = GLOBAL.RCELMK_1; finsi +si present(GLOBAL.RCELML_1) alors CORR.RCELML1731 = GLOBAL.RCELML_1; finsi +si present(GLOBAL.RCELOJ_1) alors CORR.RCELOJ1731 = GLOBAL.RCELOJ_1; finsi +si present(GLOBAL.RCELOU_1) alors CORR.RCELOU1731 = GLOBAL.RCELOU_1; finsi +si present(GLOBAL.RCELOV_1) alors CORR.RCELOV1731 = GLOBAL.RCELOV_1; finsi +si present(GLOBAL.RCELOW_1) alors CORR.RCELOW1731 = GLOBAL.RCELOW_1; finsi +si present(GLOBAL.RCELNS_1) alors CORR.RCELNS1731 = GLOBAL.RCELNS_1; finsi +si present(GLOBAL.RCELNT_1) alors CORR.RCELNT1731 = GLOBAL.RCELNT_1; finsi +si present(GLOBAL.RCELNU_1) alors CORR.RCELNU1731 = GLOBAL.RCELNU_1; finsi +si present(GLOBAL.RCELNV_1) alors CORR.RCELNV1731 = GLOBAL.RCELNV_1; finsi +si present(GLOBAL.ACODMW_1) alors CORR.ACODMW1731 = GLOBAL.ACODMW_1; finsi +si present(GLOBAL.RCODMW_1) alors CORR.RCODMW1731 = GLOBAL.RCODMW_1; finsi +si present(GLOBAL.ACODMN_1) alors CORR.ACODMN1731 = GLOBAL.ACODMN_1; finsi +si present(GLOBAL.RCODMN_1) alors CORR.RCODMN1731 = GLOBAL.RCODMN_1; finsi +si present(GLOBAL.RNONI_1) alors CORR.RNONI1731 = GLOBAL.RNONI_1; finsi +si present(GLOBAL.RNONJ_1) alors CORR.RNONJ1731 = GLOBAL.RNONJ_1; finsi +si present(GLOBAL.RNONK_1) alors CORR.RNONK1731 = GLOBAL.RNONK_1; finsi +si present(GLOBAL.RNONL_1) alors CORR.RNONL1731 = GLOBAL.RNONL_1; finsi +si present(GLOBAL.RNONM_1) alors CORR.RNONM1731 = GLOBAL.RNONM_1; finsi +si present(GLOBAL.RNONN_1) alors CORR.RNONN1731 = GLOBAL.RNONN_1; finsi +si present(GLOBAL.RNOPF_1) alors CORR.RNOPF1731 = GLOBAL.RNOPF_1; finsi +si present(GLOBAL.RNOPG_1) alors CORR.RNOPG1731 = GLOBAL.RNOPG_1; finsi +si present(GLOBAL.RCELPC_1) alors CORR.RCELPC1731 = GLOBAL.RCELPC_1; finsi +si present(GLOBAL.RCELPD_1) alors CORR.RCELPD1731 = GLOBAL.RCELPD_1; finsi +si present(GLOBAL.RCELPE_1) alors CORR.RCELPE1731 = GLOBAL.RCELPE_1; finsi +si present(GLOBAL.RPIQI_1) alors CORR.RPIQI1731 = GLOBAL.RPIQI_1; finsi +si present(GLOBAL.RPIQJ_1) alors CORR.RPIQJ1731 = GLOBAL.RPIQJ_1; finsi +si present(GLOBAL.RPIQK_1) alors CORR.RPIQK1731 = GLOBAL.RPIQK_1; finsi +si present(GLOBAL.RPIQL_1) alors CORR.RPIQL1731 = GLOBAL.RPIQL_1; finsi +si present(GLOBAL.RPIQM_1) alors CORR.RPIQM1731 = GLOBAL.RPIQM_1; finsi +si present(GLOBAL.RPIQN_1) alors CORR.RPIQN1731 = GLOBAL.RPIQN_1; finsi +si present(GLOBAL.RPIQO_1) alors CORR.RPIQO1731 = GLOBAL.RPIQO_1; finsi +si present(GLOBAL.RPIQP_1) alors CORR.RPIQP1731 = GLOBAL.RPIQP_1; finsi +si present(GLOBAL.RPIRR_1) alors CORR.RPIRR1731 = GLOBAL.RPIRR_1; finsi +si present(GLOBAL.RPIRS_1) alors CORR.RPIRS1731 = GLOBAL.RPIRS_1; finsi +si present(GLOBAL.RPIRX_1) alors CORR.RPIRX1731 = GLOBAL.RPIRX_1; finsi +si present(GLOBAL.RPIRY_1) alors CORR.RPIRY1731 = GLOBAL.RPIRY_1; finsi +si present(GLOBAL.RPIWA_1) alors CORR.RPIWA1731 = GLOBAL.RPIWA_1; finsi +si present(GLOBAL.RPIWB_1) alors CORR.RPIWB1731 = GLOBAL.RPIWB_1; finsi +si present(GLOBAL.RPIXA_1) alors CORR.RPIXA1731 = GLOBAL.RPIXA_1; finsi +si present(GLOBAL.RPIXB_1) alors CORR.RPIXB1731 = GLOBAL.RPIXB_1; finsi +si present(GLOBAL.RPIRV_1) alors CORR.RPIRV1731 = GLOBAL.RPIRV_1; finsi +si present(GLOBAL.RPIRW_1) alors CORR.RPIRW1731 = GLOBAL.RPIRW_1; finsi +si present(GLOBAL.RPISH_1) alors CORR.RPISH1731 = GLOBAL.RPISH_1; finsi +si present(GLOBAL.RPISI_1) alors CORR.RPISI1731 = GLOBAL.RPISI_1; finsi +si present(GLOBAL.AILMSM_1) alors CORR.AILMSM1731 = GLOBAL.AILMSM_1; finsi +si present(GLOBAL.RILMSM_1) alors CORR.RILMSM1731 = GLOBAL.RILMSM_1; finsi +si present(GLOBAL.AILMSS_1) alors CORR.AILMSS1731 = GLOBAL.AILMSS_1; finsi +si present(GLOBAL.AILMST_1) alors CORR.AILMST1731 = GLOBAL.AILMST_1; finsi +si present(GLOBAL.RILMSS_1) alors CORR.RILMSS1731 = GLOBAL.RILMSS_1; finsi +si present(GLOBAL.RILMST_1) alors CORR.RILMST1731 = GLOBAL.RILMST_1; finsi +si present(GLOBAL.ACELP1A_1) alors CORR.ACELP1A1731 = GLOBAL.ACELP1A_1; finsi +si present(GLOBAL.ACELP1B_1) alors CORR.ACELP1B1731 = GLOBAL.ACELP1B_1; finsi +si present(GLOBAL.ACELP1C_1) alors CORR.ACELP1C1731 = GLOBAL.ACELP1C_1; finsi +si present(GLOBAL.ACELP1D_1) alors CORR.ACELP1D1731 = GLOBAL.ACELP1D_1; finsi +si present(GLOBAL.ACELP1E_1) alors CORR.ACELP1E1731 = GLOBAL.ACELP1E_1; finsi +si present(GLOBAL.RCELP1A_1) alors CORR.RCELP1A1731 = GLOBAL.RCELP1A_1; finsi +si present(GLOBAL.RCELP1B_1) alors CORR.RCELP1B1731 = GLOBAL.RCELP1B_1; finsi +si present(GLOBAL.RCELP1C_1) alors CORR.RCELP1C1731 = GLOBAL.RCELP1C_1; finsi +si present(GLOBAL.RCELP1D_1) alors CORR.RCELP1D1731 = GLOBAL.RCELP1D_1; finsi +si present(GLOBAL.RCELP1E_1) alors CORR.RCELP1E1731 = GLOBAL.RCELP1E_1; finsi +si present(GLOBAL.ACELP2A_1) alors CORR.ACELP2A1731 = GLOBAL.ACELP2A_1; finsi +si present(GLOBAL.ACELP2B_1) alors CORR.ACELP2B1731 = GLOBAL.ACELP2B_1; finsi +si present(GLOBAL.ACELP2C_1) alors CORR.ACELP2C1731 = GLOBAL.ACELP2C_1; finsi +si present(GLOBAL.ACELP2D_1) alors CORR.ACELP2D1731 = GLOBAL.ACELP2D_1; finsi +si present(GLOBAL.ACELP2E_1) alors CORR.ACELP2E1731 = GLOBAL.ACELP2E_1; finsi +si present(GLOBAL.APIPK_1) alors CORR.APIPK1731 = GLOBAL.APIPK_1; finsi +si present(GLOBAL.RPIPK_1) alors CORR.RPIPK1731 = GLOBAL.RPIPK_1; finsi +si present(GLOBAL.APIPL_1) alors CORR.APIPL1731 = GLOBAL.APIPL_1; finsi +si present(GLOBAL.RPIPL_1) alors CORR.RPIPL1731 = GLOBAL.RPIPL_1; finsi +si present(GLOBAL.APIPM_1) alors CORR.APIPM1731 = GLOBAL.APIPM_1; finsi +si present(GLOBAL.RPIPM_1) alors CORR.RPIPM1731 = GLOBAL.RPIPM_1; finsi +si present(GLOBAL.APIPN_1) alors CORR.APIPN1731 = GLOBAL.APIPN_1; finsi +si present(GLOBAL.RPIPN_1) alors CORR.RPIPN1731 = GLOBAL.RPIPN_1; finsi +si present(GLOBAL.APIOF_1) alors CORR.APIOF1731 = GLOBAL.APIOF_1; finsi +si present(GLOBAL.RPIOF_1) alors CORR.RPIOF1731 = GLOBAL.RPIOF_1; finsi +si present(GLOBAL.APIOG_1) alors CORR.APIOG1731 = GLOBAL.APIOG_1; finsi +si present(GLOBAL.RPIOG_1) alors CORR.RPIOG1731 = GLOBAL.RPIOG_1; finsi +si present(GLOBAL.APINA_1) alors CORR.APINA1731 = GLOBAL.APINA_1; finsi +si present(GLOBAL.RPINA_1) alors CORR.RPINA1731 = GLOBAL.RPINA_1; finsi +si present(GLOBAL.APINB_1) alors CORR.APINB1731 = GLOBAL.APINB_1; finsi +si present(GLOBAL.RPINB_1) alors CORR.RPINB1731 = GLOBAL.RPINB_1; finsi +si present(GLOBAL.APINC_1) alors CORR.APINC1731 = GLOBAL.APINC_1; finsi +si present(GLOBAL.RPINC_1) alors CORR.RPINC1731 = GLOBAL.RPINC_1; finsi +si present(GLOBAL.APIND_1) alors CORR.APIND1731 = GLOBAL.APIND_1; finsi +si present(GLOBAL.RPIND_1) alors CORR.RPIND1731 = GLOBAL.RPIND_1; finsi +si present(GLOBAL.APISY_1) alors CORR.APISY1731 = GLOBAL.APISY_1; finsi +si present(GLOBAL.RPISY_1) alors CORR.RPISY1731 = GLOBAL.RPISY_1; finsi +si present(GLOBAL.APISZ_1) alors CORR.APISZ1731 = GLOBAL.APISZ_1; finsi +si present(GLOBAL.RPISZ_1) alors CORR.RPISZ1731 = GLOBAL.RPISZ_1; finsi +si present(GLOBAL.RCELUU_1) alors CORR.RCELUU1731 = GLOBAL.RCELUU_1; finsi +si present(GLOBAL.RCELUV_1) alors CORR.RCELUV1731 = GLOBAL.RCELUV_1; finsi +si present(GLOBAL.RCELUW_1) alors CORR.RCELUW1731 = GLOBAL.RCELUW_1; finsi +si present(GLOBAL.RCELUX_1) alors CORR.RCELUX1731 = GLOBAL.RCELUX_1; finsi +si present(GLOBAL.RCELRK_1) alors CORR.RCELRK1731 = GLOBAL.RCELRK_1; finsi +si present(GLOBAL.RCELRL_1) alors CORR.RCELRL1731 = GLOBAL.RCELRL_1; finsi +si present(GLOBAL.RCELRM_1) alors CORR.RCELRM1731 = GLOBAL.RCELRM_1; finsi +si present(GLOBAL.RCELRN_1) alors CORR.RCELRN1731 = GLOBAL.RCELRN_1; finsi +si present(GLOBAL.RCELIV_1) alors CORR.RCELIV1731 = GLOBAL.RCELIV_1; finsi +si present(GLOBAL.RCELIX_1) alors CORR.RCELIX1731 = GLOBAL.RCELIX_1; finsi +si present(GLOBAL.RCELIY_1) alors CORR.RCELIY1731 = GLOBAL.RCELIY_1; finsi +si present(GLOBAL.RCELIZ_1) alors CORR.RCELIZ1731 = GLOBAL.RCELIZ_1; finsi +si present(GLOBAL.RCELIM_1) alors CORR.RCELIM1731 = GLOBAL.RCELIM_1; finsi +si present(GLOBAL.RCELIN_1) alors CORR.RCELIN1731 = GLOBAL.RCELIN_1; finsi +si present(GLOBAL.RCELIO_1) alors CORR.RCELIO1731 = GLOBAL.RCELIO_1; finsi +si present(GLOBAL.RCELIP_1) alors CORR.RCELIP1731 = GLOBAL.RCELIP_1; finsi +si present(GLOBAL.RCELVJ_1) alors CORR.RCELVJ1731 = GLOBAL.RCELVJ_1; finsi +si present(GLOBAL.RCELVL_1) alors CORR.RCELVL1731 = GLOBAL.RCELVL_1; finsi +si present(GLOBAL.RCELVK_1) alors CORR.RCELVK1731 = GLOBAL.RCELVK_1; finsi +si present(GLOBAL.RCELVO_1) alors CORR.RCELVO1731 = GLOBAL.RCELVO_1; finsi +si present(GLOBAL.RPIIA_1) alors CORR.RPIIA1731 = GLOBAL.RPIIA_1; finsi +si present(GLOBAL.RPIIB_1) alors CORR.RPIIB1731 = GLOBAL.RPIIB_1; finsi +si present(GLOBAL.RPIIC_1) alors CORR.RPIIC1731 = GLOBAL.RPIIC_1; finsi +si present(GLOBAL.RPIID_1) alors CORR.RPIID1731 = GLOBAL.RPIID_1; finsi +si present(GLOBAL.RPIJI_1) alors CORR.RPIJI1731 = GLOBAL.RPIJI_1; finsi +si present(GLOBAL.RPIJJ_1) alors CORR.RPIJJ1731 = GLOBAL.RPIJJ_1; finsi +si present(GLOBAL.RPIJK_1) alors CORR.RPIJK1731 = GLOBAL.RPIJK_1; finsi +si present(GLOBAL.RPIJL_1) alors CORR.RPIJL1731 = GLOBAL.RPIJL_1; finsi +si present(GLOBAL.RCELLK_1) alors CORR.RCELLK1731 = GLOBAL.RCELLK_1; finsi +si present(GLOBAL.RCELLL_1) alors CORR.RCELLL1731 = GLOBAL.RCELLL_1; finsi +si present(GLOBAL.RCELLO_1) alors CORR.RCELLO1731 = GLOBAL.RCELLO_1; finsi +si present(GLOBAL.RCELLP_1) alors CORR.RCELLP1731 = GLOBAL.RCELLP_1; finsi +si present(GLOBAL.APIIA_1) alors CORR.APIIA1731 = GLOBAL.APIIA_1; finsi +si present(GLOBAL.APIIB_1) alors CORR.APIIB1731 = GLOBAL.APIIB_1; finsi +si present(GLOBAL.APIIC_1) alors CORR.APIIC1731 = GLOBAL.APIIC_1; finsi +si present(GLOBAL.APIID_1) alors CORR.APIID1731 = GLOBAL.APIID_1; finsi +si present(GLOBAL.APIJI_1) alors CORR.APIJI1731 = GLOBAL.APIJI_1; finsi +si present(GLOBAL.APIJJ_1) alors CORR.APIJJ1731 = GLOBAL.APIJJ_1; finsi +si present(GLOBAL.APIJK_1) alors CORR.APIJK1731 = GLOBAL.APIJK_1; finsi +si present(GLOBAL.APIJL_1) alors CORR.APIJL1731 = GLOBAL.APIJL_1; finsi +si present(GLOBAL.RPTZM_1) alors CORR.RPTZM1731 = GLOBAL.RPTZM_1; finsi +si present(GLOBAL.APTZM_1) alors CORR.APTZM1731 = GLOBAL.APTZM_1; finsi +si present(GLOBAL.RPMEJEI_1) alors CORR.RPMEJEI1731 = GLOBAL.RPMEJEI_1; finsi +si present(GLOBAL.APMEJEI_1) alors CORR.APMEJEI1731 = GLOBAL.APMEJEI_1; finsi +si present(GLOBAL.RNOLQ_1) alors CORR.RNOLQ1731 = GLOBAL.RNOLQ_1; finsi +si present(GLOBAL.RNOLR_1) alors CORR.RNOLR1731 = GLOBAL.RNOLR_1; finsi +si present(GLOBAL.RNOLS_1) alors CORR.RNOLS1731 = GLOBAL.RNOLS_1; finsi +si present(GLOBAL.RNOLT_1) alors CORR.RNOLT1731 = GLOBAL.RNOLT_1; finsi +si present(GLOBAL.RILMSX_1) alors CORR.RILMSX1731 = GLOBAL.RILMSX_1; finsi +si present(GLOBAL.AILMSX_1) alors CORR.AILMSX1731 = GLOBAL.AILMSX_1; finsi +si present(GLOBAL.REPRCMBIS) alors CORR.REPRCMBIS1731 = GLOBAL.REPRCMBIS; finsi +si present(GLOBAL.RRFI) alors CORR.RRFI1731 = GLOBAL.RRFI; finsi +si present(GLOBAL.RCM1) alors CORR.RCM11731 = GLOBAL.RCM1; finsi +si present(GLOBAL.BIN) alors CORR.BIN1731 = GLOBAL.BIN; finsi +si present(GLOBAL.NPLOCNETF) alors CORR.NPLOCNETF1731 = GLOBAL.NPLOCNETF; finsi +si present(GLOBAL.RGPROVHBA) alors CORR.RGPROVHBA1731 = GLOBAL.RGPROVHBA; finsi +si present(GLOBAL.TOTRCM) alors CORR.TOTRCM1731 = GLOBAL.TOTRCM; finsi +si present(GLOBAL.BNN) alors CORR.BNN1731 = GLOBAL.BNN; finsi + diff --git a/m_ext/2024/commence_par_5.m b/m_ext/2024/commence_par_5.m new file mode 100644 index 000000000..aa6f2fee0 --- /dev/null +++ b/m_ext/2024/commence_par_5.m @@ -0,0 +1,370 @@ +cible alias_commence_par_5: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 5AC) + ou meme_variable(VAR, 5AD) + ou meme_variable(VAR, 5AE) + ou meme_variable(VAR, 5AF) + ou meme_variable(VAR, 5AG) + ou meme_variable(VAR, 5AH) + ou meme_variable(VAR, 5AI) + ou meme_variable(VAR, 5AK) + ou meme_variable(VAR, 5AN) + ou meme_variable(VAR, 5AO) + ou meme_variable(VAR, 5AP) + ou meme_variable(VAR, 5AQ) + ou meme_variable(VAR, 5AT) + ou meme_variable(VAR, 5AX) + ou meme_variable(VAR, 5AY) + ou meme_variable(VAR, 5BC) + ou meme_variable(VAR, 5BD) + ou meme_variable(VAR, 5BE) + ou meme_variable(VAR, 5BF) + ou meme_variable(VAR, 5BG) + ou meme_variable(VAR, 5BH) + ou meme_variable(VAR, 5BI) + ou meme_variable(VAR, 5BK) + ou meme_variable(VAR, 5BN) + ou meme_variable(VAR, 5BO) + ou meme_variable(VAR, 5BP) + ou meme_variable(VAR, 5BQ) + ou meme_variable(VAR, 5BT) + ou meme_variable(VAR, 5BX) + ou meme_variable(VAR, 5BY) + ou meme_variable(VAR, 5CC) + ou meme_variable(VAR, 5CD) + ou meme_variable(VAR, 5CE) + ou meme_variable(VAR, 5CF) + ou meme_variable(VAR, 5CG) + ou meme_variable(VAR, 5CI) + ou meme_variable(VAR, 5CK) + ou meme_variable(VAR, 5CM) + ou meme_variable(VAR, 5CN) + ou meme_variable(VAR, 5CQ) + ou meme_variable(VAR, 5CR) + ou meme_variable(VAR, 5CT) + ou meme_variable(VAR, 5CU) + ou meme_variable(VAR, 5CV) + ou meme_variable(VAR, 5CX) + ou meme_variable(VAR, 5DB) + ou meme_variable(VAR, 5DD) + ou meme_variable(VAR, 5DF) + ou meme_variable(VAR, 5DK) + ou meme_variable(VAR, 5DM) + ou meme_variable(VAR, 5EA) + ou meme_variable(VAR, 5EB) + ou meme_variable(VAR, 5ED) + ou meme_variable(VAR, 5EF) + ou meme_variable(VAR, 5EI) + ou meme_variable(VAR, 5EK) + ou meme_variable(VAR, 5EM) + ou meme_variable(VAR, 5EU) + ou meme_variable(VAR, 5EY) + ou meme_variable(VAR, 5FA) + ou meme_variable(VAR, 5FB) + ou meme_variable(VAR, 5FD) + ou meme_variable(VAR, 5FF) + ou meme_variable(VAR, 5FK) + ou meme_variable(VAR, 5FM) + ou meme_variable(VAR, 5FY) + ou meme_variable(VAR, 5GA) + ou meme_variable(VAR, 5GB) + ou meme_variable(VAR, 5GC) + ou meme_variable(VAR, 5GD) + ou meme_variable(VAR, 5GE) + ou meme_variable(VAR, 5GF) + ou meme_variable(VAR, 5GG) + ou meme_variable(VAR, 5GH) + ou meme_variable(VAR, 5GI) + ou meme_variable(VAR, 5GJ) + ou meme_variable(VAR, 5GY) + ou meme_variable(VAR, 5HA) + ou meme_variable(VAR, 5HB) + ou meme_variable(VAR, 5HC) + ou meme_variable(VAR, 5HD) + ou meme_variable(VAR, 5HE) + ou meme_variable(VAR, 5HF) + ou meme_variable(VAR, 5HG) + ou meme_variable(VAR, 5HK) + ou meme_variable(VAR, 5HM) + ou meme_variable(VAR, 5HP) + ou meme_variable(VAR, 5HQ) + ou meme_variable(VAR, 5HR) + ou meme_variable(VAR, 5HS) + ou meme_variable(VAR, 5HT) + ou meme_variable(VAR, 5HV) + ou meme_variable(VAR, 5HW) + ou meme_variable(VAR, 5HX) + ou meme_variable(VAR, 5HY) + ou meme_variable(VAR, 5IA) + ou meme_variable(VAR, 5IB) + ou meme_variable(VAR, 5IC) + ou meme_variable(VAR, 5ID) + ou meme_variable(VAR, 5IE) + ou meme_variable(VAR, 5IF) + ou meme_variable(VAR, 5IG) + ou meme_variable(VAR, 5IM) + ou meme_variable(VAR, 5IP) + ou meme_variable(VAR, 5IQ) + ou meme_variable(VAR, 5IR) + ou meme_variable(VAR, 5IS) + ou meme_variable(VAR, 5IT) + ou meme_variable(VAR, 5IU) + ou meme_variable(VAR, 5IV) + ou meme_variable(VAR, 5IW) + ou meme_variable(VAR, 5IX) + ou meme_variable(VAR, 5IY) + ou meme_variable(VAR, 5JA) + ou meme_variable(VAR, 5JB) + ou meme_variable(VAR, 5JC) + ou meme_variable(VAR, 5JD) + ou meme_variable(VAR, 5JE) + ou meme_variable(VAR, 5JF) + ou meme_variable(VAR, 5JG) + ou meme_variable(VAR, 5JJ) + ou meme_variable(VAR, 5JK) + ou meme_variable(VAR, 5JM) + ou meme_variable(VAR, 5JP) + ou meme_variable(VAR, 5JQ) + ou meme_variable(VAR, 5JR) + ou meme_variable(VAR, 5JS) + ou meme_variable(VAR, 5JT) + ou meme_variable(VAR, 5JU) + ou meme_variable(VAR, 5JV) + ou meme_variable(VAR, 5JW) + ou meme_variable(VAR, 5JX) + ou meme_variable(VAR, 5JY) + ou meme_variable(VAR, 5KB) + ou meme_variable(VAR, 5KC) + ou meme_variable(VAR, 5KE) + ou meme_variable(VAR, 5KF) + ou meme_variable(VAR, 5KJ) + ou meme_variable(VAR, 5KN) + ou meme_variable(VAR, 5KO) + ou meme_variable(VAR, 5KP) + ou meme_variable(VAR, 5KQ) + ou meme_variable(VAR, 5KR) + ou meme_variable(VAR, 5KT) + ou meme_variable(VAR, 5KU) + ou meme_variable(VAR, 5KV) + ou meme_variable(VAR, 5KW) + ou meme_variable(VAR, 5KX) + ou meme_variable(VAR, 5KY) + ou meme_variable(VAR, 5KZ) + ou meme_variable(VAR, 5LB) + ou meme_variable(VAR, 5LC) + ou meme_variable(VAR, 5LD) + ou meme_variable(VAR, 5LE) + ou meme_variable(VAR, 5LF) + ou meme_variable(VAR, 5LJ) + ou meme_variable(VAR, 5LK) + ou meme_variable(VAR, 5LN) + ou meme_variable(VAR, 5LO) + ou meme_variable(VAR, 5LP) + ou meme_variable(VAR, 5LQ) + ou meme_variable(VAR, 5LR) + ou meme_variable(VAR, 5LT) + ou meme_variable(VAR, 5LU) + ou meme_variable(VAR, 5LV) + ou meme_variable(VAR, 5LW) + ou meme_variable(VAR, 5LX) + ou meme_variable(VAR, 5LY) + ou meme_variable(VAR, 5LZ) + ou meme_variable(VAR, 5MB) + ou meme_variable(VAR, 5MC) + ou meme_variable(VAR, 5MD) + ou meme_variable(VAR, 5ME) + ou meme_variable(VAR, 5MF) + ou meme_variable(VAR, 5MJ) + ou meme_variable(VAR, 5MN) + ou meme_variable(VAR, 5MO) + ou meme_variable(VAR, 5MP) + ou meme_variable(VAR, 5MQ) + ou meme_variable(VAR, 5MR) + ou meme_variable(VAR, 5MT) + ou meme_variable(VAR, 5MU) + ou meme_variable(VAR, 5MV) + ou meme_variable(VAR, 5MW) + ou meme_variable(VAR, 5MX) + ou meme_variable(VAR, 5MY) + ou meme_variable(VAR, 5MZ) + ou meme_variable(VAR, 5NA) + ou meme_variable(VAR, 5NB) + ou meme_variable(VAR, 5NC) + ou meme_variable(VAR, 5ND) + ou meme_variable(VAR, 5NE) + ou meme_variable(VAR, 5NF) + ou meme_variable(VAR, 5NG) + ou meme_variable(VAR, 5NJ) + ou meme_variable(VAR, 5NM) + ou meme_variable(VAR, 5NN) + ou meme_variable(VAR, 5NO) + ou meme_variable(VAR, 5NP) + ou meme_variable(VAR, 5NQ) + ou meme_variable(VAR, 5NR) + ou meme_variable(VAR, 5NT) + ou meme_variable(VAR, 5NW) + ou meme_variable(VAR, 5NX) + ou meme_variable(VAR, 5NY) + ou meme_variable(VAR, 5OA) + ou meme_variable(VAR, 5OB) + ou meme_variable(VAR, 5OC) + ou meme_variable(VAR, 5OD) + ou meme_variable(VAR, 5OE) + ou meme_variable(VAR, 5OF) + ou meme_variable(VAR, 5OG) + ou meme_variable(VAR, 5OJ) + ou meme_variable(VAR, 5OM) + ou meme_variable(VAR, 5ON) + ou meme_variable(VAR, 5OO) + ou meme_variable(VAR, 5OP) + ou meme_variable(VAR, 5OQ) + ou meme_variable(VAR, 5OR) + ou meme_variable(VAR, 5OT) + ou meme_variable(VAR, 5OW) + ou meme_variable(VAR, 5OX) + ou meme_variable(VAR, 5OY) + ou meme_variable(VAR, 5PA) + ou meme_variable(VAR, 5PB) + ou meme_variable(VAR, 5PC) + ou meme_variable(VAR, 5PD) + ou meme_variable(VAR, 5PE) + ou meme_variable(VAR, 5PF) + ou meme_variable(VAR, 5PG) + ou meme_variable(VAR, 5PJ) + ou meme_variable(VAR, 5PM) + ou meme_variable(VAR, 5PN) + ou meme_variable(VAR, 5PO) + ou meme_variable(VAR, 5PP) + ou meme_variable(VAR, 5PQ) + ou meme_variable(VAR, 5PR) + ou meme_variable(VAR, 5PW) + ou meme_variable(VAR, 5PX) + ou meme_variable(VAR, 5PY) + ou meme_variable(VAR, 5QA) + ou meme_variable(VAR, 5QB) + ou meme_variable(VAR, 5QC) + ou meme_variable(VAR, 5QD) + ou meme_variable(VAR, 5QE) + ou meme_variable(VAR, 5QF) + ou meme_variable(VAR, 5QG) + ou meme_variable(VAR, 5QJ) + ou meme_variable(VAR, 5QL) + ou meme_variable(VAR, 5QM) + ou meme_variable(VAR, 5QN) + ou meme_variable(VAR, 5QO) + ou meme_variable(VAR, 5QP) + ou meme_variable(VAR, 5QQ) + ou meme_variable(VAR, 5RA) + ou meme_variable(VAR, 5RB) + ou meme_variable(VAR, 5RC) + ou meme_variable(VAR, 5RD) + ou meme_variable(VAR, 5RE) + ou meme_variable(VAR, 5RF) + ou meme_variable(VAR, 5RG) + ou meme_variable(VAR, 5RJ) + ou meme_variable(VAR, 5RL) + ou meme_variable(VAR, 5RM) + ou meme_variable(VAR, 5RN) + ou meme_variable(VAR, 5RO) + ou meme_variable(VAR, 5RP) + ou meme_variable(VAR, 5RQ) + ou meme_variable(VAR, 5RR) + ou meme_variable(VAR, 5RW) + ou meme_variable(VAR, 5RZ) + ou meme_variable(VAR, 5SA) + ou meme_variable(VAR, 5SB) + ou meme_variable(VAR, 5SC) + ou meme_variable(VAR, 5SD) + ou meme_variable(VAR, 5SE) + ou meme_variable(VAR, 5SF) + ou meme_variable(VAR, 5SG) + ou meme_variable(VAR, 5SJ) + ou meme_variable(VAR, 5SL) + ou meme_variable(VAR, 5SO) + ou meme_variable(VAR, 5SV) + ou meme_variable(VAR, 5SW) + ou meme_variable(VAR, 5SX) + ou meme_variable(VAR, 5SZ) + ou meme_variable(VAR, 5TA) + ou meme_variable(VAR, 5TB) + ou meme_variable(VAR, 5TC) + ou meme_variable(VAR, 5TE) + ou meme_variable(VAR, 5TF) + ou meme_variable(VAR, 5TH) + ou meme_variable(VAR, 5TP) + ou meme_variable(VAR, 5UA) + ou meme_variable(VAR, 5UB) + ou meme_variable(VAR, 5UC) + ou meme_variable(VAR, 5UE) + ou meme_variable(VAR, 5UF) + ou meme_variable(VAR, 5UH) + ou meme_variable(VAR, 5UI) + ou meme_variable(VAR, 5UP) + ou meme_variable(VAR, 5UR) + ou meme_variable(VAR, 5UT) + ou meme_variable(VAR, 5UY) + ou meme_variable(VAR, 5VA) + ou meme_variable(VAR, 5VB) + ou meme_variable(VAR, 5VC) + ou meme_variable(VAR, 5VE) + ou meme_variable(VAR, 5VF) + ou meme_variable(VAR, 5VH) + ou meme_variable(VAR, 5VI) + ou meme_variable(VAR, 5VM) + ou meme_variable(VAR, 5VP) + ou meme_variable(VAR, 5VQ) + ou meme_variable(VAR, 5VR) + ou meme_variable(VAR, 5VT) + ou meme_variable(VAR, 5VV) + ou meme_variable(VAR, 5VY) + ou meme_variable(VAR, 5WE) + ou meme_variable(VAR, 5WI) + ou meme_variable(VAR, 5WM) + ou meme_variable(VAR, 5WR) + ou meme_variable(VAR, 5XA) + ou meme_variable(VAR, 5XB) + ou meme_variable(VAR, 5XE) + ou meme_variable(VAR, 5XH) + ou meme_variable(VAR, 5XI) + ou meme_variable(VAR, 5XJ) + ou meme_variable(VAR, 5XM) + ou meme_variable(VAR, 5XN) + ou meme_variable(VAR, 5XO) + ou meme_variable(VAR, 5XP) + ou meme_variable(VAR, 5XR) + ou meme_variable(VAR, 5XS) + ou meme_variable(VAR, 5XT) + ou meme_variable(VAR, 5XU) + ou meme_variable(VAR, 5XY) + ou meme_variable(VAR, 5YA) + ou meme_variable(VAR, 5YB) + ou meme_variable(VAR, 5YE) + ou meme_variable(VAR, 5YH) + ou meme_variable(VAR, 5YI) + ou meme_variable(VAR, 5YJ) + ou meme_variable(VAR, 5YM) + ou meme_variable(VAR, 5YN) + ou meme_variable(VAR, 5YO) + ou meme_variable(VAR, 5YP) + ou meme_variable(VAR, 5YR) + ou meme_variable(VAR, 5YS) + ou meme_variable(VAR, 5YT) + ou meme_variable(VAR, 5YU) + ou meme_variable(VAR, 5YY) + ou meme_variable(VAR, 5ZA) + ou meme_variable(VAR, 5ZB) + ou meme_variable(VAR, 5ZH) + ou meme_variable(VAR, 5ZI) + ou meme_variable(VAR, 5ZJ) + ou meme_variable(VAR, 5ZM) + ou meme_variable(VAR, 5ZN) + ou meme_variable(VAR, 5ZO) + ou meme_variable(VAR, 5ZP) + ou meme_variable(VAR, 5ZR) + ou meme_variable(VAR, 5ZS) + ou meme_variable(VAR, 5ZT) + ou meme_variable(VAR, 5ZU) + ou meme_variable(VAR, 5ZY); + diff --git a/m_ext/2024/commence_par_7.m b/m_ext/2024/commence_par_7.m new file mode 100644 index 000000000..4dfce454a --- /dev/null +++ b/m_ext/2024/commence_par_7.m @@ -0,0 +1,501 @@ +cible alias_commence_par_7: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 7AA) + ou meme_variable(VAR, 7AC) + ou meme_variable(VAR, 7AE) + ou meme_variable(VAR, 7AG) + ou meme_variable(VAR, 7AK) + ou meme_variable(VAR, 7AL) + ou meme_variable(VAR, 7AM) + ou meme_variable(VAR, 7AN) + ou meme_variable(VAR, 7AO) + ou meme_variable(VAR, 7AV) + ou meme_variable(VAR, 7AW) + ou meme_variable(VAR, 7AX) + ou meme_variable(VAR, 7AY) + ou meme_variable(VAR, 7AZ) + ou meme_variable(VAR, 7BI) + ou meme_variable(VAR, 7BK) + ou meme_variable(VAR, 7BL) + ou meme_variable(VAR, 7BM) + ou meme_variable(VAR, 7BN) + ou meme_variable(VAR, 7BO) + ou meme_variable(VAR, 7BP) + ou meme_variable(VAR, 7BQ) + ou meme_variable(VAR, 7BR) + ou meme_variable(VAR, 7BS) + ou meme_variable(VAR, 7BT) + ou meme_variable(VAR, 7BU) + ou meme_variable(VAR, 7BV) + ou meme_variable(VAR, 7BW) + ou meme_variable(VAR, 7BX) + ou meme_variable(VAR, 7BY) + ou meme_variable(VAR, 7BZ) + ou meme_variable(VAR, 7CA) + ou meme_variable(VAR, 7CB) + ou meme_variable(VAR, 7CC) + ou meme_variable(VAR, 7CD) + ou meme_variable(VAR, 7CE) + ou meme_variable(VAR, 7CF) + ou meme_variable(VAR, 7CG) + ou meme_variable(VAR, 7CH) + ou meme_variable(VAR, 7CI) + ou meme_variable(VAR, 7CJ) + ou meme_variable(VAR, 7CK) + ou meme_variable(VAR, 7CL) + ou meme_variable(VAR, 7CM) + ou meme_variable(VAR, 7CN) + ou meme_variable(VAR, 7CO) + ou meme_variable(VAR, 7CP) + ou meme_variable(VAR, 7CQ) + ou meme_variable(VAR, 7CR) + ou meme_variable(VAR, 7CS) + ou meme_variable(VAR, 7CT) + ou meme_variable(VAR, 7CU) + ou meme_variable(VAR, 7CW) + ou meme_variable(VAR, 7CX) + ou meme_variable(VAR, 7CY) + ou meme_variable(VAR, 7DA) + ou meme_variable(VAR, 7DB) + ou meme_variable(VAR, 7DC) + ou meme_variable(VAR, 7DD) + ou meme_variable(VAR, 7DE) + ou meme_variable(VAR, 7DF) + ou meme_variable(VAR, 7DG) + ou meme_variable(VAR, 7DH) + ou meme_variable(VAR, 7DI) + ou meme_variable(VAR, 7DJ) + ou meme_variable(VAR, 7DK) + ou meme_variable(VAR, 7DL) + ou meme_variable(VAR, 7DM) + ou meme_variable(VAR, 7DN) + ou meme_variable(VAR, 7DQ) + ou meme_variable(VAR, 7DR) + ou meme_variable(VAR, 7DU) + ou meme_variable(VAR, 7DV) + ou meme_variable(VAR, 7DX) + ou meme_variable(VAR, 7DY) + ou meme_variable(VAR, 7DZ) + ou meme_variable(VAR, 7EA) + ou meme_variable(VAR, 7EB) + ou meme_variable(VAR, 7EC) + ou meme_variable(VAR, 7ED) + ou meme_variable(VAR, 7EF) + ou meme_variable(VAR, 7EG) + ou meme_variable(VAR, 7EK) + ou meme_variable(VAR, 7EL) + ou meme_variable(VAR, 7EM) + ou meme_variable(VAR, 7EN) + ou meme_variable(VAR, 7EQ) + ou meme_variable(VAR, 7ER) + ou meme_variable(VAR, 7EV) + ou meme_variable(VAR, 7EW) + ou meme_variable(VAR, 7EX) + ou meme_variable(VAR, 7EY) + ou meme_variable(VAR, 7FA) + ou meme_variable(VAR, 7FC) + ou meme_variable(VAR, 7FD) + ou meme_variable(VAR, 7FF) + ou meme_variable(VAR, 7FG) + ou meme_variable(VAR, 7FH) + ou meme_variable(VAR, 7FL) + ou meme_variable(VAR, 7FM) + ou meme_variable(VAR, 7FN) + ou meme_variable(VAR, 7FQ) + ou meme_variable(VAR, 7FU) + ou meme_variable(VAR, 7FV) + ou meme_variable(VAR, 7FW) + ou meme_variable(VAR, 7FX) + ou meme_variable(VAR, 7FY) + ou meme_variable(VAR, 7GA) + ou meme_variable(VAR, 7GB) + ou meme_variable(VAR, 7GC) + ou meme_variable(VAR, 7GD) + ou meme_variable(VAR, 7GE) + ou meme_variable(VAR, 7GF) + ou meme_variable(VAR, 7GG) + ou meme_variable(VAR, 7GH) + ou meme_variable(VAR, 7GI) + ou meme_variable(VAR, 7GJ) + ou meme_variable(VAR, 7GM) + ou meme_variable(VAR, 7GN) + ou meme_variable(VAR, 7GQ) + ou meme_variable(VAR, 7GW) + ou meme_variable(VAR, 7GY) + ou meme_variable(VAR, 7GZ) + ou meme_variable(VAR, 7HA) + ou meme_variable(VAR, 7HB) + ou meme_variable(VAR, 7HD) + ou meme_variable(VAR, 7HE) + ou meme_variable(VAR, 7HF) + ou meme_variable(VAR, 7HG) + ou meme_variable(VAR, 7HH) + ou meme_variable(VAR, 7HJ) + ou meme_variable(VAR, 7HK) + ou meme_variable(VAR, 7HN) + ou meme_variable(VAR, 7HO) + ou meme_variable(VAR, 7HP) + ou meme_variable(VAR, 7HQ) + ou meme_variable(VAR, 7HR) + ou meme_variable(VAR, 7HS) + ou meme_variable(VAR, 7HT) + ou meme_variable(VAR, 7HU) + ou meme_variable(VAR, 7HV) + ou meme_variable(VAR, 7HW) + ou meme_variable(VAR, 7HX) + ou meme_variable(VAR, 7HY) + ou meme_variable(VAR, 7HZ) + ou meme_variable(VAR, 7IA) + ou meme_variable(VAR, 7IB) + ou meme_variable(VAR, 7IC) + ou meme_variable(VAR, 7ID) + ou meme_variable(VAR, 7IE) + ou meme_variable(VAR, 7IF) + ou meme_variable(VAR, 7IG) + ou meme_variable(VAR, 7IH) + ou meme_variable(VAR, 7II) + ou meme_variable(VAR, 7IJ) + ou meme_variable(VAR, 7IK) + ou meme_variable(VAR, 7IL) + ou meme_variable(VAR, 7IM) + ou meme_variable(VAR, 7IN) + ou meme_variable(VAR, 7IO) + ou meme_variable(VAR, 7IP) + ou meme_variable(VAR, 7IQ) + ou meme_variable(VAR, 7IR) + ou meme_variable(VAR, 7IS) + ou meme_variable(VAR, 7IT) + ou meme_variable(VAR, 7IU) + ou meme_variable(VAR, 7IV) + ou meme_variable(VAR, 7IW) + ou meme_variable(VAR, 7IX) + ou meme_variable(VAR, 7IY) + ou meme_variable(VAR, 7IZ) + ou meme_variable(VAR, 7JA) + ou meme_variable(VAR, 7JB) + ou meme_variable(VAR, 7JC) + ou meme_variable(VAR, 7JD) + ou meme_variable(VAR, 7JE) + ou meme_variable(VAR, 7JF) + ou meme_variable(VAR, 7JG) + ou meme_variable(VAR, 7JH) + ou meme_variable(VAR, 7JI) + ou meme_variable(VAR, 7JJ) + ou meme_variable(VAR, 7JK) + ou meme_variable(VAR, 7JL) + ou meme_variable(VAR, 7JM) + ou meme_variable(VAR, 7JN) + ou meme_variable(VAR, 7JO) + ou meme_variable(VAR, 7JP) + ou meme_variable(VAR, 7JQ) + ou meme_variable(VAR, 7JR) + ou meme_variable(VAR, 7JS) + ou meme_variable(VAR, 7JT) + ou meme_variable(VAR, 7JU) + ou meme_variable(VAR, 7JV) + ou meme_variable(VAR, 7JW) + ou meme_variable(VAR, 7JX) + ou meme_variable(VAR, 7JY) + ou meme_variable(VAR, 7KA) + ou meme_variable(VAR, 7KB) + ou meme_variable(VAR, 7KC) + ou meme_variable(VAR, 7KD) + ou meme_variable(VAR, 7KE) + ou meme_variable(VAR, 7KF) + ou meme_variable(VAR, 7KG) + ou meme_variable(VAR, 7KH) + ou meme_variable(VAR, 7KI) + ou meme_variable(VAR, 7KK) + ou meme_variable(VAR, 7KM) + ou meme_variable(VAR, 7KT) + ou meme_variable(VAR, 7KU) + ou meme_variable(VAR, 7KV) + ou meme_variable(VAR, 7KX) + ou meme_variable(VAR, 7KY) + ou meme_variable(VAR, 7KZ) + ou meme_variable(VAR, 7LG) + ou meme_variable(VAR, 7LH) + ou meme_variable(VAR, 7LI) + ou meme_variable(VAR, 7LJ) + ou meme_variable(VAR, 7LK) + ou meme_variable(VAR, 7LL) + ou meme_variable(VAR, 7LM) + ou meme_variable(VAR, 7LO) + ou meme_variable(VAR, 7LP) + ou meme_variable(VAR, 7LQ) + ou meme_variable(VAR, 7LR) + ou meme_variable(VAR, 7LS) + ou meme_variable(VAR, 7LT) + ou meme_variable(VAR, 7MA) + ou meme_variable(VAR, 7MB) + ou meme_variable(VAR, 7MC) + ou meme_variable(VAR, 7MD) + ou meme_variable(VAR, 7MI) + ou meme_variable(VAR, 7MJ) + ou meme_variable(VAR, 7MK) + ou meme_variable(VAR, 7ML) + ou meme_variable(VAR, 7MM) + ou meme_variable(VAR, 7MN) + ou meme_variable(VAR, 7MO) + ou meme_variable(VAR, 7MP) + ou meme_variable(VAR, 7MQ) + ou meme_variable(VAR, 7MR) + ou meme_variable(VAR, 7MS) + ou meme_variable(VAR, 7MT) + ou meme_variable(VAR, 7MU) + ou meme_variable(VAR, 7MV) + ou meme_variable(VAR, 7MW) + ou meme_variable(VAR, 7MX) + ou meme_variable(VAR, 7MY) + ou meme_variable(VAR, 7MZ) + ou meme_variable(VAR, 7NA) + ou meme_variable(VAR, 7NB) + ou meme_variable(VAR, 7NC) + ou meme_variable(VAR, 7ND) + ou meme_variable(VAR, 7NI) + ou meme_variable(VAR, 7NJ) + ou meme_variable(VAR, 7NK) + ou meme_variable(VAR, 7NL) + ou meme_variable(VAR, 7NM) + ou meme_variable(VAR, 7NN) + ou meme_variable(VAR, 7NO) + ou meme_variable(VAR, 7NP) + ou meme_variable(VAR, 7NQ) + ou meme_variable(VAR, 7NR) + ou meme_variable(VAR, 7NS) + ou meme_variable(VAR, 7NT) + ou meme_variable(VAR, 7NU) + ou meme_variable(VAR, 7NV) + ou meme_variable(VAR, 7NX) + ou meme_variable(VAR, 7NY) + ou meme_variable(VAR, 7NZ) + ou meme_variable(VAR, 7OA) + ou meme_variable(VAR, 7OB) + ou meme_variable(VAR, 7OC) + ou meme_variable(VAR, 7OD) + ou meme_variable(VAR, 7OE) + ou meme_variable(VAR, 7OF) + ou meme_variable(VAR, 7OG) + ou meme_variable(VAR, 7OJ) + ou meme_variable(VAR, 7OP) + ou meme_variable(VAR, 7OQ) + ou meme_variable(VAR, 7OR) + ou meme_variable(VAR, 7OS) + ou meme_variable(VAR, 7OT) + ou meme_variable(VAR, 7OU) + ou meme_variable(VAR, 7OV) + ou meme_variable(VAR, 7OW) + ou meme_variable(VAR, 7OY) + ou meme_variable(VAR, 7OZ) + ou meme_variable(VAR, 7PC) + ou meme_variable(VAR, 7PD) + ou meme_variable(VAR, 7PE) + ou meme_variable(VAR, 7PF) + ou meme_variable(VAR, 7PG) + ou meme_variable(VAR, 7PK) + ou meme_variable(VAR, 7PL) + ou meme_variable(VAR, 7PM) + ou meme_variable(VAR, 7PN) + ou meme_variable(VAR, 7PO) + ou meme_variable(VAR, 7PP) + ou meme_variable(VAR, 7PQ) + ou meme_variable(VAR, 7PR) + ou meme_variable(VAR, 7PS) + ou meme_variable(VAR, 7PZ) + ou meme_variable(VAR, 7QF) + ou meme_variable(VAR, 7QH) + ou meme_variable(VAR, 7QI) + ou meme_variable(VAR, 7QJ) + ou meme_variable(VAR, 7QK) + ou meme_variable(VAR, 7QL) + ou meme_variable(VAR, 7QM) + ou meme_variable(VAR, 7QN) + ou meme_variable(VAR, 7QO) + ou meme_variable(VAR, 7QP) + ou meme_variable(VAR, 7QR) + ou meme_variable(VAR, 7QS) + ou meme_variable(VAR, 7QT) + ou meme_variable(VAR, 7QU) + ou meme_variable(VAR, 7QV) + ou meme_variable(VAR, 7RB) + ou meme_variable(VAR, 7RD) + ou meme_variable(VAR, 7RF) + ou meme_variable(VAR, 7RH) + ou meme_variable(VAR, 7RK) + ou meme_variable(VAR, 7RL) + ou meme_variable(VAR, 7RM) + ou meme_variable(VAR, 7RN) + ou meme_variable(VAR, 7RR) + ou meme_variable(VAR, 7RS) + ou meme_variable(VAR, 7RT) + ou meme_variable(VAR, 7RU) + ou meme_variable(VAR, 7RV) + ou meme_variable(VAR, 7RW) + ou meme_variable(VAR, 7RX) + ou meme_variable(VAR, 7RY) + ou meme_variable(VAR, 7RZ) + ou meme_variable(VAR, 7SA) + ou meme_variable(VAR, 7SB) + ou meme_variable(VAR, 7SC) + ou meme_variable(VAR, 7SD) + ou meme_variable(VAR, 7SE) + ou meme_variable(VAR, 7SF) + ou meme_variable(VAR, 7SG) + ou meme_variable(VAR, 7SH) + ou meme_variable(VAR, 7SI) + ou meme_variable(VAR, 7SJ) + ou meme_variable(VAR, 7SK) + ou meme_variable(VAR, 7SM) + ou meme_variable(VAR, 7SN) + ou meme_variable(VAR, 7SO) + ou meme_variable(VAR, 7SP) + ou meme_variable(VAR, 7SR) + ou meme_variable(VAR, 7SS) + ou meme_variable(VAR, 7ST) + ou meme_variable(VAR, 7SU) + ou meme_variable(VAR, 7SV) + ou meme_variable(VAR, 7SW) + ou meme_variable(VAR, 7SX) + ou meme_variable(VAR, 7SY) + ou meme_variable(VAR, 7SZ) + ou meme_variable(VAR, 7TA) + ou meme_variable(VAR, 7TB) + ou meme_variable(VAR, 7TC) + ou meme_variable(VAR, 7TD) + ou meme_variable(VAR, 7TE) + ou meme_variable(VAR, 7TF) + ou meme_variable(VAR, 7TH) + ou meme_variable(VAR, 7TI) + ou meme_variable(VAR, 7TJ) + ou meme_variable(VAR, 7TP) + ou meme_variable(VAR, 7TQ) + ou meme_variable(VAR, 7TR) + ou meme_variable(VAR, 7TS) + ou meme_variable(VAR, 7TT) + ou meme_variable(VAR, 7TU) + ou meme_variable(VAR, 7TV) + ou meme_variable(VAR, 7TW) + ou meme_variable(VAR, 7TX) + ou meme_variable(VAR, 7TY) + ou meme_variable(VAR, 7TZ) + ou meme_variable(VAR, 7UA) + ou meme_variable(VAR, 7UB) + ou meme_variable(VAR, 7UC) + ou meme_variable(VAR, 7UD) + ou meme_variable(VAR, 7UE) + ou meme_variable(VAR, 7UF) + ou meme_variable(VAR, 7UG) + ou meme_variable(VAR, 7UH) + ou meme_variable(VAR, 7UI) + ou meme_variable(VAR, 7UJ) + ou meme_variable(VAR, 7UK) + ou meme_variable(VAR, 7UL) + ou meme_variable(VAR, 7UM) + ou meme_variable(VAR, 7UN) + ou meme_variable(VAR, 7UO) + ou meme_variable(VAR, 7UP) + ou meme_variable(VAR, 7US) + ou meme_variable(VAR, 7UT) + ou meme_variable(VAR, 7UU) + ou meme_variable(VAR, 7UV) + ou meme_variable(VAR, 7UW) + ou meme_variable(VAR, 7UX) + ou meme_variable(VAR, 7VA) + ou meme_variable(VAR, 7VC) + ou meme_variable(VAR, 7VD) + ou meme_variable(VAR, 7VE) + ou meme_variable(VAR, 7VF) + ou meme_variable(VAR, 7VG) + ou meme_variable(VAR, 7VJ) + ou meme_variable(VAR, 7VK) + ou meme_variable(VAR, 7VL) + ou meme_variable(VAR, 7VM) + ou meme_variable(VAR, 7VN) + ou meme_variable(VAR, 7VO) + ou meme_variable(VAR, 7VQ) + ou meme_variable(VAR, 7VR) + ou meme_variable(VAR, 7VS) + ou meme_variable(VAR, 7VU) + ou meme_variable(VAR, 7VV) + ou meme_variable(VAR, 7VW) + ou meme_variable(VAR, 7VX) + ou meme_variable(VAR, 7VY) + ou meme_variable(VAR, 7VZ) + ou meme_variable(VAR, 7WA) + ou meme_variable(VAR, 7WB) + ou meme_variable(VAR, 7WH) + ou meme_variable(VAR, 7WI) + ou meme_variable(VAR, 7WK) + ou meme_variable(VAR, 7WL) + ou meme_variable(VAR, 7WM) + ou meme_variable(VAR, 7WN) + ou meme_variable(VAR, 7WO) + ou meme_variable(VAR, 7WP) + ou meme_variable(VAR, 7WQ) + ou meme_variable(VAR, 7WR) + ou meme_variable(VAR, 7WS) + ou meme_variable(VAR, 7WT) + ou meme_variable(VAR, 7WU) + ou meme_variable(VAR, 7WV) + ou meme_variable(VAR, 7WW) + ou meme_variable(VAR, 7XA) + ou meme_variable(VAR, 7XB) + ou meme_variable(VAR, 7XC) + ou meme_variable(VAR, 7XD) + ou meme_variable(VAR, 7XE) + ou meme_variable(VAR, 7XF) + ou meme_variable(VAR, 7XG) + ou meme_variable(VAR, 7XL) + ou meme_variable(VAR, 7XM) + ou meme_variable(VAR, 7XN) + ou meme_variable(VAR, 7XR) + ou meme_variable(VAR, 7XS) + ou meme_variable(VAR, 7XT) + ou meme_variable(VAR, 7XU) + ou meme_variable(VAR, 7XV) + ou meme_variable(VAR, 7XW) + ou meme_variable(VAR, 7XX) + ou meme_variable(VAR, 7XY) + ou meme_variable(VAR, 7XZ) + ou meme_variable(VAR, 7YA) + ou meme_variable(VAR, 7YB) + ou meme_variable(VAR, 7YC) + ou meme_variable(VAR, 7YD) + ou meme_variable(VAR, 7YE) + ou meme_variable(VAR, 7YF) + ou meme_variable(VAR, 7YG) + ou meme_variable(VAR, 7YH) + ou meme_variable(VAR, 7YI) + ou meme_variable(VAR, 7YJ) + ou meme_variable(VAR, 7YK) + ou meme_variable(VAR, 7YL) + ou meme_variable(VAR, 7YM) + ou meme_variable(VAR, 7YN) + ou meme_variable(VAR, 7YO) + ou meme_variable(VAR, 7YP) + ou meme_variable(VAR, 7ZA) + ou meme_variable(VAR, 7ZB) + ou meme_variable(VAR, 7ZC) + ou meme_variable(VAR, 7ZD) + ou meme_variable(VAR, 7ZE) + ou meme_variable(VAR, 7ZF) + ou meme_variable(VAR, 7ZG) + ou meme_variable(VAR, 7ZH) + ou meme_variable(VAR, 7ZI) + ou meme_variable(VAR, 7ZJ) + ou meme_variable(VAR, 7ZK) + ou meme_variable(VAR, 7ZL) + ou meme_variable(VAR, 7ZN) + ou meme_variable(VAR, 7ZQ) + ou meme_variable(VAR, 7ZR) + ou meme_variable(VAR, 7ZS) + ou meme_variable(VAR, 7ZT) + ou meme_variable(VAR, 7ZU) + ou meme_variable(VAR, 7ZV) + ou meme_variable(VAR, 7ZW) + ou meme_variable(VAR, 7ZX) + ou meme_variable(VAR, 7ZY) + ou meme_variable(VAR, 7ZZ); + diff --git a/m_ext/2024/commence_par_H.m b/m_ext/2024/commence_par_H.m new file mode 100644 index 000000000..c2caa724b --- /dev/null +++ b/m_ext/2024/commence_par_H.m @@ -0,0 +1,110 @@ +cible alias_commence_par_H: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, HFN) + ou meme_variable(VAR, HFO) + ou meme_variable(VAR, HFP) + ou meme_variable(VAR, HFR) + ou meme_variable(VAR, HFS) + ou meme_variable(VAR, HFT) + ou meme_variable(VAR, HFU) + ou meme_variable(VAR, HFW) + ou meme_variable(VAR, HGS) + ou meme_variable(VAR, HGT) + ou meme_variable(VAR, HGU) + ou meme_variable(VAR, HGW) + ou meme_variable(VAR, HHS) + ou meme_variable(VAR, HHT) + ou meme_variable(VAR, HHU) + ou meme_variable(VAR, HHW) + ou meme_variable(VAR, HIS) + ou meme_variable(VAR, HIT) + ou meme_variable(VAR, HIU) + ou meme_variable(VAR, HIW) + ou meme_variable(VAR, HJA) + ou meme_variable(VAR, HJC) + ou meme_variable(VAR, HJS) + ou meme_variable(VAR, HJT) + ou meme_variable(VAR, HJU) + ou meme_variable(VAR, HJW) + ou meme_variable(VAR, HKC) + ou meme_variable(VAR, HKS) + ou meme_variable(VAR, HKT) + ou meme_variable(VAR, HKU) + ou meme_variable(VAR, HKV) + ou meme_variable(VAR, HKW) + ou meme_variable(VAR, HOA) + ou meme_variable(VAR, HOB) + ou meme_variable(VAR, HOC) + ou meme_variable(VAR, HOD) + ou meme_variable(VAR, HOE) + ou meme_variable(VAR, HOF) + ou meme_variable(VAR, HOG) + ou meme_variable(VAR, HOH) + ou meme_variable(VAR, HOI) + ou meme_variable(VAR, HOJ) + ou meme_variable(VAR, HOK) + ou meme_variable(VAR, HOL) + ou meme_variable(VAR, HOM) + ou meme_variable(VAR, HON) + ou meme_variable(VAR, HOO) + ou meme_variable(VAR, HOP) + ou meme_variable(VAR, HOQ) + ou meme_variable(VAR, HOR) + ou meme_variable(VAR, HOS) + ou meme_variable(VAR, HOT) + ou meme_variable(VAR, HOU) + ou meme_variable(VAR, HOV) + ou meme_variable(VAR, HOW) + ou meme_variable(VAR, HOX) + ou meme_variable(VAR, HOY) + ou meme_variable(VAR, HOZ) + ou meme_variable(VAR, HQA) + ou meme_variable(VAR, HQB) + ou meme_variable(VAR, HQC) + ou meme_variable(VAR, HQD) + ou meme_variable(VAR, HQL) + ou meme_variable(VAR, HQM) + ou meme_variable(VAR, HQT) + ou meme_variable(VAR, HUA) + ou meme_variable(VAR, HUB) + ou meme_variable(VAR, HUC) + ou meme_variable(VAR, HUD) + ou meme_variable(VAR, HUE) + ou meme_variable(VAR, HUF) + ou meme_variable(VAR, HUG) + ou meme_variable(VAR, HUH) + ou meme_variable(VAR, HUI) + ou meme_variable(VAR, HUJ) + ou meme_variable(VAR, HUK) + ou meme_variable(VAR, HUL) + ou meme_variable(VAR, HUM) + ou meme_variable(VAR, HUN) + ou meme_variable(VAR, HUO) + ou meme_variable(VAR, HUP) + ou meme_variable(VAR, HUQ) + ou meme_variable(VAR, HUR) + ou meme_variable(VAR, HUS) + ou meme_variable(VAR, HUT) + ou meme_variable(VAR, HUU) + ou meme_variable(VAR, HVA) + ou meme_variable(VAR, HVB) + ou meme_variable(VAR, HVC) + ou meme_variable(VAR, HVD) + ou meme_variable(VAR, HVE) + ou meme_variable(VAR, HVF) + ou meme_variable(VAR, HVG) + ou meme_variable(VAR, HVJ) + ou meme_variable(VAR, HVK) + ou meme_variable(VAR, HVL) + ou meme_variable(VAR, HVM) + ou meme_variable(VAR, HVN) + ou meme_variable(VAR, HYC) + ou meme_variable(VAR, HYD) + ou meme_variable(VAR, HYE) + ou meme_variable(VAR, HYF) + ou meme_variable(VAR, HYG) + ou meme_variable(VAR, HYH) + ou meme_variable(VAR, HYI); + diff --git a/m_ext/2024/correctif.m b/m_ext/2024/correctif.m new file mode 100644 index 000000000..229944109 --- /dev/null +++ b/m_ext/2024/correctif.m @@ -0,0 +1,7005 @@ +# correctif + +MAX_ID_EVT: calculee primrest = 0 : "" ; + +TMP_ARG1 : calculee primrest = 0 : "" ; +TMP_ARG2 : calculee primrest = 0 : "" ; +TMP_ARG3 : calculee primrest = 0 : "" ; +TMP_ARG4 : calculee primrest = 0 : "" ; +TMP_ARG5 : calculee primrest = 0 : "" ; +TMP_ARG6 : calculee primrest = 0 : "" ; +TMP_ARG7 : calculee primrest = 0 : "" ; +TMP_ARG8 : calculee primrest = 0 : "" ; +TMP_ARG9 : calculee primrest = 0 : "" ; +TMP_RES : calculee primrest = 0 : "" ; +TMP_RES1 : calculee primrest = 0 : "" ; +TMP_RES2 : calculee primrest = 0 : "" ; +TMP_RES3 : calculee primrest = 0 : "" ; +TMP_RES4 : calculee primrest = 0 : "" ; + +N_INDEFINIE : const = 0; +N_REVENU : const = 1; +N_CHARGE : const = 2; + +SENS_R : const = 0; +SENS_M : const = 1; +SENS_P : const = 2; +SENS_C : const = 3; + +SF_INVALIDE : const = 0; +SF_MARIAGE : const = 1; +SF_CELIBAT : const = 2; +SF_DIVORCE : const = 3; +SF_PACSE : const = 4; +SF_VEUVAGE_TRUE : const = 5; +SF_VEUVAGE_FALSE : const = 6; + +TL_TL_ACQUISE : const = 0; +TL_TL_DEFAUT_2042 : const = 1; +TL_TL_MAUVAISE_FOI : const = 2; + +MAJ_TL : const = 0; +MAJ_NON_TL : const = 1; +MAJ_TL15 : const = 2; +MAJ_NON_TL15 : const = 3; +MAJ_RAPPEL_C : const = 4; +MAJ_RAPPEL_CP : const = 5; +MAJ_RAPPEL_CP01 : const = 6; +MAJ_RAPPEL_CP22 : const = 7; +MAJ_RAPPEL_CP24 : const = 8; +MAJ_RAPPEL_F : const = 9; +MAJ_RAPPEL_NF : const = 10; +MAJ_RAPPEL_M : const = 11; +MAJ_RAPPEL_MF : const = 12; +MAJ_RAPPEL_NON_M : const = 13; +MAJ_RAPPEL_P : const = 14; +MAJ_RAPPEL_R : const = 15; +MAJ_RAPPEL_R55 : const = 16; +MAJ_1728 : const = 17; +MAJ_ABAT_20 : const = 18; +MAJ_CODE_1729_2A5 : const = 19; +MAJ_CODE_1729_6 : const = 20; +MAJ_CODE_22 : const = 21; +MAJ_CODE_24 : const = 22; +MAJ_CONTEXTE_22 : const = 23; +MAJ_MENTION_EXP_99 : const = 24; +MAJ_MENTION_EXP_99R : const = 25; +MAJ_NON_MENTION_EXP : const = 26; + +INR_FLAG_INR_NON_TL : const = 2; +INR_FLAG_INR_TL : const = 3; + +ID_SANS_TRAITEMENT : const = 0; +ID_CUMULE_CHAMP_BASE_TL : const = 1; +ID_CUMULE_BASE_TL_INIT : const = 2; +ID_CUMULE_CHAMP_BASE_TL_RECT : const = 3; +ID_TRAITE_MAJO_P : const = 4; + + +cible init_variables: +application: iliad; +GLOBAL.NB_STRATES = 26; +GLOBAL.MAX_ID_EVT = -2; +# Données globales +GLOBAL.PRESENT_8VV = 0; +GLOBAL.PRESENT_8VW = 0; +GLOBAL.PRESENT_9YT = 0; +GLOBAL.MONTANT_9YT = 0; +GLOBAL.PENALITE_9YT = 0; +GLOBAL.SENS_9YT = SENS_R; +GLOBAL.NUM_EVT_9YT = 0; +GLOBAL.IND_20_9YT = 0; +GLOBAL.BASE_TL_9YT = 0; +GLOBAL.PRESENT_9YU = 0; +GLOBAL.MONTANT_9YU = 0; +GLOBAL.PENALITE_9YU = 0; +GLOBAL.SENS_9YU = SENS_R; +GLOBAL.NUM_EVT_9YU = 0; +GLOBAL.DATE_9YU = 0; +GLOBAL.PRESENT_9XT = 0; +GLOBAL.MONTANT_9XT = 0; +GLOBAL.PENALITE_9XT = 0; +GLOBAL.SENS_9XT = SENS_R; +GLOBAL.NUM_EVT_9XT = 0; +GLOBAL.IND_20_9XT = 0; +GLOBAL.BASE_TL_9XT = 0; +GLOBAL.PRESENT_9XU = 0; +GLOBAL.MONTANT_9XU = 0; +GLOBAL.PENALITE_9XU = 0; +GLOBAL.SENS_9XU = SENS_R; +GLOBAL.NUM_EVT_9XU = 0; +GLOBAL.DATE_9XU = 0; +GLOBAL.PRESENT_REGCO = 0; +GLOBAL.PENALITE_REGCO = 0; +GLOBAL.NUM_EVT_REGCO = 0; +GLOBAL.NUM_RAP_REGCO = 0; +GLOBAL.IND_20_REGCO = 0; +GLOBAL.PREMIER_EVT = 0; +GLOBAL.CODE_9ZA = 0; +GLOBAL.SAUVE_INR_R99 = 0; +GLOBAL.ANNEE_DECES_CONJOINT = 0; +GLOBAL.NB_RAPPELS_RES = 0; +# sommes inr 2 +GLOBAL.INR_SOMMEBAND_2 = 0; +GLOBAL.INR_SOMMEBA_2 = 0; +GLOBAL.INR_SOMMEBICND_2 = 0; +GLOBAL.INR_SOMMEBIC_2 = 0; +GLOBAL.INR_SOMMEBNCND_2 = 0; +GLOBAL.INR_SOMMEBNC_2 = 0; +GLOBAL.INR_SOMMEGLOBAL_2 = 0; +GLOBAL.INR_SOMMEGLOBND_2 = 0; +GLOBAL.INR_SOMMELOC_2 = 0; +GLOBAL.INR_SOMMEMOND_2 = 0; +GLOBAL.INR_SOMMERCM_2 = 0; +GLOBAL.INR_SOMMERF_2 = 0; +GLOBAL.INR_SOMMERI_2 = 0; +# Données de Reference +GLOBAL.D2042_NB = 0; +GLOBAL.DEFAUT = 0; +GLOBAL.DEFAUT10 = 0; +GLOBAL.DEFAUT11 = 0; +GLOBAL.DEFAUT1011 = 0; +GLOBAL.RETARD = 0; +GLOBAL.RETARD07 = 0; +GLOBAL.RETARD08 = 0; +GLOBAL.RETARD0718 = 0; +GLOBAL.RETARD101718 = 0; +GLOBAL.RETARD22 = 0; +GLOBAL.RETARD99 = 0; +GLOBAL.RECTIF = 0; +GLOBAL.RECTIF_MAJO = 0; +GLOBAL.MENTION_EXP = 0; +GLOBAL.CORR_RJLJ = 0; +GLOBAL.CODE_PENA = 0; +GLOBAL.CODE_PENA_ISF = 0; +GLOBAL.DATE = 0; +GLOBAL.SF_INITIALE = SF_INVALIDE; +GLOBAL.SF_COURANTE = SF_INVALIDE; +GLOBAL.SF_PRIMITIF = 0; +GLOBAL.R_TARDIF = 0; +GLOBAL.LIMELIGHT = 0; +GLOBAL.ISF_PRIM = 0; +GLOBAL.PRESENT_R10 = 0; +GLOBAL.PRESENT_R30 = 0; +GLOBAL.PRESENT_R32 = 0; +GLOBAL.PREM_8_11 = 0; +GLOBAL.PENA_994 = 0; +GLOBAL.FLAGMENC = 0; +# tl +GLOBAL.TL_D2042_NB = 0; +GLOBAL.TL_D2042_INIT_NB = 0; +GLOBAL.TL_D2042_RECT_NB = 0; +GLOBAL.TL_BASE_TL = 0; +GLOBAL.TL_BASE_TL_INIT = 0; +GLOBAL.TL_BASE_TL_RECT = 0; +GLOBAL.TL_BASE_TL_TBTC = 0; +GLOBAL.TL_BASE_TL_TBTC_INIT = 0; +GLOBAL.TL_BASE_TL_TBTC_RECT = 0; +GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +# tl mauvaise foi +GLOBAL.TL_MF_MFCDIS = 0; +GLOBAL.TL_MF_MFCHR = 0; +GLOBAL.TL_MF_MFCHR7 = 0; +GLOBAL.TL_MF_MFCS = 0; +GLOBAL.TL_MF_MFCSAL = 0; +GLOBAL.TL_MF_MFCVN = 0; +GLOBAL.TL_MF_MFGAIN = 0; +GLOBAL.TL_MF_MFGLO = 0; +GLOBAL.TL_MF_MFIFI = 0; +GLOBAL.TL_MF_MFIR = 0; +GLOBAL.TL_MF_MFLOY = 0; +GLOBAL.TL_MF_MFMCSG820 = 0; +GLOBAL.TL_MF_MFPCAP = 0; +GLOBAL.TL_MF_MFPS = 0; +GLOBAL.TL_MF_MFPSOL = 0; +GLOBAL.TL_MF_MFRD = 0; +GLOBAL.TL_MF_MFREGV = 0; +GLOBAL.TL_MF_MFRSE1 = 0; +GLOBAL.TL_MF_MFRSE2 = 0; +GLOBAL.TL_MF_MFRSE3 = 0; +GLOBAL.TL_MF_MFRSE4 = 0; +GLOBAL.TL_MF_MFRSE5 = 0; +GLOBAL.TL_MF_MFRSE6 = 0; +GLOBAL.TL_MF_MFRSE7 = 0; +GLOBAL.TL_MF_MFTAXAGA = 0; +# inr +GLOBAL.INR_NB_MOIS = 0; +GLOBAL.INR_NB_MOIS2 = 0; +GLOBAL.INR_NB_MOIS_ISF = 0; +GLOBAL.INR_ANNEE_COR = 0; +GLOBAL.INR_PASDINR = 0; +# majo +GLOBAL.MAJO_D2042_STRATE_NB = 0; +GLOBAL.MAJO_D2042_P_NB = 0; +GLOBAL.MAJO_TAUX_STRATE = 0; +GLOBAL.MAJO_CODE_STRATE = 0; +GLOBAL.MAJO_TARDIF_EVT2 = 0; +GLOBAL.MAJO_STR_TR_00 = 0; +GLOBAL.MAJO_STR_TR_01 = 0; +GLOBAL.MAJO_STR_TR_02 = 0; +GLOBAL.MAJO_STR_TR_03 = 0; +GLOBAL.MAJO_STR_TR_04 = 0; +GLOBAL.MAJO_STR_TR_05 = 0; +GLOBAL.MAJO_STR_TR_06 = 0; +GLOBAL.MAJO_STR_TR_07 = 0; +GLOBAL.MAJO_STR_TR_08 = 0; +GLOBAL.MAJO_STR_TR_09 = 0; +GLOBAL.MAJO_STR_TR_10 = 0; +GLOBAL.MAJO_STR_TR_11 = 0; +GLOBAL.MAJO_STR_TR_12 = 0; +GLOBAL.MAJO_STR_TR_13 = 0; +GLOBAL.MAJO_STR_TR_14 = 0; +GLOBAL.MAJO_STR_TR_15 = 0; +GLOBAL.MAJO_STR_TR_16 = 0; +GLOBAL.MAJO_STR_TR_17 = 0; +GLOBAL.MAJO_STR_TR_18 = 0; +GLOBAL.MAJO_STR_TR_19 = 0; +GLOBAL.MAJO_STR_TR_20 = 0; +GLOBAL.MAJO_STR_TR_21 = 0; +GLOBAL.MAJO_STR_TR_22 = 0; +GLOBAL.MAJO_STR_TR_23 = 0; +GLOBAL.MAJO_STR_TR_24 = 0; +GLOBAL.MAJO_STR_TR_25 = 0; +GLOBAL.MAJO_PREM_STR = 0; +GLOBAL.MAJO_NB_STR_TR = 0; +GLOBAL.MAJO_DERN_STR_TR = 0; +GLOBAL.MAJO_NUM_STRATE = 0; +# prorata +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; +# art1731 +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +cible signaler_erreurs: +application: iliad; +si nb_anomalies() > 0 alors + nettoie_erreurs_finalisees; + finalise_erreurs; + exporte_erreurs; + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +sinon + finalise_erreurs; +finsi + +cible signaler_erreur_ano: +application: iliad; +finalise_erreurs; +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) +stop application; + +cible init_majo_str_tr : +application: iliad; +arguments: I, B; +aiguillage (I) : ( + cas 0: MAJO_STR_TR_00 = B; + cas 1: MAJO_STR_TR_01 = B; + cas 2: MAJO_STR_TR_02 = B; + cas 3: MAJO_STR_TR_03 = B; + cas 4: MAJO_STR_TR_04 = B; + cas 5: MAJO_STR_TR_05 = B; + cas 6: MAJO_STR_TR_06 = B; + cas 7: MAJO_STR_TR_07 = B; + cas 8: MAJO_STR_TR_08 = B; + cas 9: MAJO_STR_TR_09 = B; + cas 10: MAJO_STR_TR_10 = B; + cas 11: MAJO_STR_TR_11 = B; + cas 12: MAJO_STR_TR_12 = B; + cas 13: MAJO_STR_TR_13 = B; + cas 14: MAJO_STR_TR_14 = B; + cas 15: MAJO_STR_TR_15 = B; + cas 16: MAJO_STR_TR_16 = B; + cas 17: MAJO_STR_TR_17 = B; + cas 18: MAJO_STR_TR_18 = B; + cas 19: MAJO_STR_TR_19 = B; + cas 20: MAJO_STR_TR_20 = B; + cas 21: MAJO_STR_TR_21 = B; + cas 22: MAJO_STR_TR_22 = B; + cas 23: MAJO_STR_TR_23 = B; + cas 24: MAJO_STR_TR_24 = B; + cas 25: MAJO_STR_TR_25 = B; +) + +cible set_majo_str_tr: +application: iliad; +arguments: I; +variables_temporaires: B; +B = 1; +calculer cible init_majo_str_tr : avec I, B; + +cible set_majo_str_tr_proc: +application: iliad; +variables_temporaires: I; +I = TMP_ARG1; +calculer cible set_majo_str_tr : avec I; + +cible unset_majo_str_tr: +application: iliad; +arguments: I; +variables_temporaires: B; +B = 0; +calculer cible init_majo_str_tr : avec I, B; + +cible unset_majo_str_tr_proc: +application: iliad; +variables_temporaires: I; +I = TMP_ARG1; +calculer cible unset_majo_str_tr : avec I; + +cible clear_majo_str_tr: +application: iliad; +iterer : variable I : entre 0..25 increment 1 : dans ( + calculer cible unset_majo_str_tr : avec I; +) + +cible affect_str_tr: +application: iliad; +CORR.STR_TR00 = MAJO_STR_TR_00; +CORR.STR_TR01 = MAJO_STR_TR_01; +CORR.STR_TR02 = MAJO_STR_TR_02; +CORR.STR_TR03 = MAJO_STR_TR_03; +CORR.STR_TR04 = MAJO_STR_TR_04; +CORR.STR_TR05 = MAJO_STR_TR_05; +CORR.STR_TR06 = MAJO_STR_TR_06; +CORR.STR_TR07 = MAJO_STR_TR_07; +CORR.STR_TR08 = MAJO_STR_TR_08; +CORR.STR_TR09 = MAJO_STR_TR_09; +CORR.STR_TR10 = MAJO_STR_TR_10; +CORR.STR_TR11 = MAJO_STR_TR_11; +CORR.STR_TR12 = MAJO_STR_TR_12; +CORR.STR_TR13 = MAJO_STR_TR_13; +CORR.STR_TR14 = MAJO_STR_TR_14; +CORR.STR_TR15 = MAJO_STR_TR_15; +CORR.STR_TR16 = MAJO_STR_TR_16; +CORR.STR_TR17 = MAJO_STR_TR_17; +CORR.STR_TR18 = MAJO_STR_TR_18; +CORR.STR_TR19 = MAJO_STR_TR_19; +CORR.STR_TR20 = MAJO_STR_TR_20; +CORR.STR_TR21 = MAJO_STR_TR_21; +CORR.STR_TR22 = MAJO_STR_TR_22; +CORR.STR_TR23 = MAJO_STR_TR_23; +CORR.STR_TR24 = MAJO_STR_TR_24; +CORR.STR_TR25 = MAJO_STR_TR_25; + +cible enchaine_calcul_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible effacer_base_etc : espace GLOBAL; + calculer cible traite_double_liquidation_2_prim; + calculer cible sauve_base_initial_prim; + calculer cible sauve_base_1728_prim; + calculer cible sauve_base_anterieure_prim; + calculer cible sauve_base_anterieure_cor_prim; + calculer cible sauve_base_inr_inter22_prim; +sinon + GLOBAL.V_ACO_MTAP = 0; + GLOBAL.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_prim; +finsi + +cible enchaine_calcul_corr: +application: iliad; +si CORR.V_IND_TRAIT = 1 alors + calculer cible effacer_base_etc : espace CORR; + calculer cible traite_double_liquidation_2_corr; + calculer cible sauve_base_initial_corr; + calculer cible sauve_base_1728_corr; + calculer cible sauve_base_anterieure_corr; + calculer cible sauve_base_anterieure_cor_corr; + calculer cible sauve_base_inr_inter22_corr; +sinon + CORR.V_ACO_MTAP = 0; + CORR.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_corr; +finsi + +cible enchaine_verification_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_prim; +sinon + calculer cible verif_saisie_cohe_corrective_prim; +finsi + +cible enchaine_verification_corr: +application: iliad; +si CORR.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_corr; +sinon + calculer cible verif_saisie_cohe_corrective_corr; +finsi + +cible reset_saisie_calc: +application: iliad; +variables_temporaires: IND_TRAIT_SAV; +IND_TRAIT_SAV = CORR.V_IND_TRAIT; +iterer +: variable V +: categorie saisie *, calculee +: espace CORR +: dans ( + V = indefini; +) +CORR.V_IND_TRAIT = IND_TRAIT_SAV; + +cible reset_codes_rappel: +application: iliad; +CORR.PEN_RAPPEL = indefini; +CORR.MOIS_RAPPEL = indefini; +CORR.ANNEE_RAPPEL = indefini; +CORR.SENS_RAPPEL = indefini; +CORR.MONT_RAPPEL = indefini; +CORR.NUM_RAPPEL = indefini; +CORR.AB20_RAPPEL = indefini; +CORR.EVT_RAPPEL = indefini; +CORR.BTOL_RAPPEL = indefini; +CORR.COD_RAPPEL = indefini; + +cible add_majo_T_RABP: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABP07 = GLOBAL.MAJO_T_RABP07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABP08 = GLOBAL.MAJO_T_RABP08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABP09 = GLOBAL.MAJO_T_RABP09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABP10 = GLOBAL.MAJO_T_RABP10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABP11 = GLOBAL.MAJO_T_RABP11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABP12 = GLOBAL.MAJO_T_RABP12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABP17 = GLOBAL.MAJO_T_RABP17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABP31 = GLOBAL.MAJO_T_RABP31 + MONTANT; +) + +cible add_majo_T_RABPPS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31 + MONTANT; +) + +cible add_majo_T_RABPCS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31 + MONTANT; +) + +cible add_majo_T_RABPRD: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31 + MONTANT; +) + +cible add_majo_T_RABPCH: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31 + MONTANT; +) +cible add_majo_T_RABPLO: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31 + MONTANT; +) + +cible contexte_2042_INR: +application: iliad; +CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; +CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; +CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; +CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; +CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; +CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; +CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; +CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; +CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; +CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; +CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; +CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; +CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; + +cible contexte_2042_TL_Ref: +application: iliad; +CORR.SOMMEBAND_2 = 0; +CORR.SOMMEBA_2 = 0; +CORR.SOMMEBICND_2 = 0; +CORR.SOMMEBIC_2 = 0; +CORR.SOMMEBNCND_2 = 0; +CORR.SOMMEBNC_2 = 0; +CORR.SOMMEGLOBAL_2 = 0; +CORR.SOMMEGLOBND_2 = 0; +CORR.SOMMELOC_2 = 0; +CORR.SOMMEMOND_2 = 0; +CORR.SOMMERCM_2 = 0; +CORR.SOMMERF_2 = 0; +CORR.SOMMERI_2 = 0; + +cible affect_code: +application: iliad; +variables_temporaires: PENA, I; + si RETARD > 0 alors + PENA = GLOBAL.CODE_PENA; + sinon + PENA = GLOBAL.MAJO_CODE_STRATE; + finsi + aiguillage (PENA) : ( + cas 1 : I = 25; + cas 2 : I = 23; + cas 3 : I = 14; + cas 4 : I = 9; + cas 5 : I = 7; + cas 6 : I = 3; + cas 7 : + cas 18 : I = 17; + cas 8 : I = 12; + cas 10 : I = 16; + cas 11 : I = 11; + cas 17 : I = 15; + cas 22 : I = 24; + cas 30 : I = 10; + cas 31 : I = 6; + cas 32 : I = 5; + cas 35 : I = 9; + cas 55 : I = 13; + cas 99 : I = 0; + cas indefini : + par_defaut : stop cible; + ) + calculer cible set_majo_str_tr : avec I; + +cible remplit_tgv_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_inr_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_p: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_strate: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_STRATE +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_init: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_INIT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible set_rappel_ifi_prim: +application: iliad; +si + GLOBAL.COD9AA != 0 ou GLOBAL.COD9AB != 0 ou GLOBAL.COD9AC != 0 + ou GLOBAL.COD9AD != 0 ou GLOBAL.COD9AE != 0 ou GLOBAL.COD9BA != 0 + ou GLOBAL.COD9BB != 0 ou GLOBAL.COD9CA != 0 ou GLOBAL.COD9GF != 0 + ou GLOBAL.COD9GH != 0 ou GLOBAL.COD9GL != 0 ou GLOBAL.COD9GM != 0 + ou GLOBAL.COD9GN != 0 ou GLOBAL.COD9NC != 0 ou GLOBAL.COD9NG != 0 + ou GLOBAL.COD9PR != 0 ou GLOBAL.COD9PX != 0 ou GLOBAL.COD9RS != 0 + ou GLOBAL.CMAJ_ISF != 0 # 9XT + ou GLOBAL.MOISAN_ISF != 0 # 9XU +alors + GLOBAL.ISF_PRIM = 1; +finsi + +cible calcul_1731: +application: iliad; +calculer cible range_base_corr_corrige; +CORR.VARR30R32 = GLOBAL.ART1731_SOMME_R3032; +CORR.VARR10 = GLOBAL.ART1731_PRESENT_R10; +CORR.VARR30 = GLOBAL.ART1731_PRESENT_R30; +CORR.VARR32 = GLOBAL.ART1731_PRESENT_R32; + +cible init_1731: +application: iliad; +CORR.VARR30R32 = 0; +CORR.FLAG_INR_REF = 0; +CORR.PREM8_11 = GLOBAL.PREM_8_11; +CORR.PENA994 = GLOBAL.PENA_994; + +cible empty_art1731: +application: iliad; +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +fonction vers_nature: +application: iliad; +arguments: ATTR; +resultat: NAT; +si ATTR = 0 alors + NAT = N_REVENU; +sinon_si ATTR = 1 alors + NAT = N_CHARGE; +sinon + NAT = N_INDEFINIE; +finsi + +cible get_nature: +application: iliad; +arguments: NATURE, VAR; +NATURE = 0; +si + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + si dans_domaine(VAR, saisie contexte) alors + NATURE = vers_nature(attribut(VAR, modcat)); + sinon_si + # Il s'agit de la même condition qu'au dessus ? + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon_si dans_domaine(VAR, calculee *) alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon + NATURE = N_INDEFINIE; + finsi +sinon_si dans_domaine(VAR, saisie contexte) alors + si meme_variable(VAR, V_REGCO) alors + NATURE = N_REVENU; + sinon_si + meme_variable(VAR, V_EAG) + ou meme_variable(VAR, V_EAD) + ou meme_variable(VAR, V_CNR) + ou meme_variable(VAR, V_CNR2) + ou meme_variable(VAR, V_CR2) + alors + NATURE = N_CHARGE; + sinon + NATURE = N_REVENU; + finsi +sinon_si + dans_domaine(VAR, saisie variation) + ou dans_domaine(VAR, saisie penalite) + ou dans_domaine(VAR, calculee *) +alors + NATURE = N_REVENU; +finsi + +cible get_abat: +application: iliad; +arguments: ABAT, VAR; +si + dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + ABAT = attribut(VAR, ind_abat); +sinon + ABAT = 0; +finsi + +cible calcul_cum_p: +application: iliad; +variables_temporaires: NATURE; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: avec + present(VAR) + et non ( + meme_variable(VAR, DAT) ou meme_variable(VAR, ANTCR) + ou meme_variable(VAR, ANTIR) ou meme_variable(VAR, ANTRE) + ou meme_variable(VAR, CSANT) ou meme_variable(VAR, FORCA) + ou meme_variable(VAR, FORPA) ou meme_variable(VAR, FORVA) + ou meme_variable(VAR, IDANT) ou meme_variable(VAR, NIMPA) + ou meme_variable(VAR, NOTRAIT) ou meme_variable(VAR, PSANT) + ou meme_variable(VAR, RDANT) ou meme_variable(VAR, ANC_BAR) + ou meme_variable(VAR, ACO_MTAP) ou meme_variable(VAR, INDG) + ou meme_variable(VAR, CHRANT) ou meme_variable(VAR, CODILIAD) + ) +: dans ( + calculer cible get_nature : avec NATURE, VAR; + si NATURE = N_REVENU alors + aiguillage( attribut(VAR, cotsoc) ) : ( + cas 1: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + cas 5: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + cas 9: + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + cas 10: + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 11: cas 12: cas 13: cas 14: cas 19: cas 20: cas 21: + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 16: + GLOBAL.MAJO_T_RABPLO = GLOBAL.MAJO_T_RABPLO + VAR; + cas 18: + si attribut(VAR, categorie_TL) dans (20, 21) + alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + finsi + ) + finsi +) + +cible process_penalite: +application: iliad; +arguments: PENA_CODE, P; +variables_temporaires: P_MAX, P_OLD, P_MULTI; +P_MAX = inf(PENA_CODE / 1000) % 100; +P_OLD = inf(PENA_CODE / 10) % 100; +P_MULTI = inf(PENA_CODE) % 10; +si P >= P_MAX alors + P_MAX = P; +finsi +si P != P_OLD alors + P_MULTI = si (P_OLD != 0 ou positif(P_MULTI)) alors (1) sinon (0) finsi; + P_OLD = P; +finsi +PENA_CODE = (1000 * P_MAX) + (10 * P_OLD) + P_MULTI; + +fonction get_pMax: +application: iliad; +arguments: CODE; +resultat: R; +R = inf(CODE / 1000); + +fonction get_pMulti: +application: iliad; +arguments: CODE; +resultat: R; +R = positif(inf(CODE) % 10); + +cible detecte_penalites: +application: iliad; +variables_temporaires: + PENA_CODE_I, PENA_CODE_1728, PENA_CODE_ICRP, PENA_CODE_1728CRP, + PENA_CODE_C, PENA_CODE_R, PENA_CODE_P, PENA_CODE_ITAXA, + PENA_CODE_1758AIR, PENA_CODE_1758ATA, PENA_CODE_ICSAL, PENA_CODE_1728CSAL, + PENA_CODE_CSAL, PENA_CODE_ICDIS, PENA_CODE_1728CDIS, PENA_CODE_CDIS, + PENA_CODE_ICAP, PENA_CODE_1728CAP, PENA_CODE_CAP, PENA_CODE_1758ACAP, + PENA_CODE_ICHR, PENA_CODE_1728CHR, PENA_CODE_CHR, PENA_CODE_1758ACHR, + PENA_CODE_IISF, PENA_CODE_1728ISF, PENA_CODE_ISF, PENA_CODE_IGAIN, + PENA_CODE_1728GAIN, PENA_CODE_GAIN, PENA_CODE_IRSE1, PENA_CODE_1728RSE1, + PENA_CODE_RSE1, PENA_CODE_IRSE2, PENA_CODE_1728RSE2, PENA_CODE_RSE2, + PENA_CODE_IRSE3, PENA_CODE_1728RSE3, PENA_CODE_RSE3, PENA_CODE_IRSE4, + PENA_CODE_1728RSE4, PENA_CODE_RSE4, PENA_CODE_ICVN, PENA_CODE_1728CVN, + PENA_CODE_CVN, PENA_CODE_IGLO, PENA_CODE_1728GLO, PENA_CODE_GLO, + PENA_CODE_IRSE5, PENA_CODE_1728RSE5, PENA_CODE_RSE5, PENA_CODE_IRSE6, + PENA_CODE_1728RSE6, PENA_CODE_RSE6, PENA_CODE_IRSE7, PENA_CODE_1728RSE7, + PENA_CODE_RSE7, PENA_CODE_IC820, PENA_CODE_1728C820, PENA_CODE_C820, + PENA_CODE_IRSE8, PENA_CODE_1728RSE8, PENA_CODE_RSE8, PENA_CODE_REGV, + CS, SENS, PENA, P; +PENA_CODE_I = 0; +PENA_CODE_1728 = 0; +PENA_CODE_ICRP = 0; +PENA_CODE_1728CRP = 0; +PENA_CODE_C = 0; +PENA_CODE_R = 0; +PENA_CODE_P = 0; +PENA_CODE_ITAXA = 0; +PENA_CODE_1758AIR = 0; +PENA_CODE_1758ATA = 0; +PENA_CODE_ICSAL = 0; +PENA_CODE_1728CSAL = 0; +PENA_CODE_CSAL = 0; +PENA_CODE_ICDIS = 0; +PENA_CODE_1728CDIS = 0; +PENA_CODE_CDIS = 0; +PENA_CODE_ICAP = 0; +PENA_CODE_1728CAP = 0; +PENA_CODE_CAP = 0; +PENA_CODE_1758ACAP = 0; +PENA_CODE_ICHR = 0; +PENA_CODE_1728CHR = 0; +PENA_CODE_CHR = 0; +PENA_CODE_1758ACHR = 0; +PENA_CODE_IISF = 0; +PENA_CODE_1728ISF = 0; +PENA_CODE_ISF = 0; +PENA_CODE_IGAIN = 0; +PENA_CODE_1728GAIN = 0; +PENA_CODE_GAIN = 0; +PENA_CODE_IRSE1 = 0; +PENA_CODE_1728RSE1 = 0; +PENA_CODE_RSE1 = 0; +PENA_CODE_IRSE2 = 0; +PENA_CODE_1728RSE2 = 0; +PENA_CODE_RSE2 = 0; +PENA_CODE_IRSE3 = 0; +PENA_CODE_1728RSE3 = 0; +PENA_CODE_RSE3 = 0; +PENA_CODE_IRSE4 = 0; +PENA_CODE_1728RSE4 = 0; +PENA_CODE_RSE4 = 0; +PENA_CODE_ICVN = 0; +PENA_CODE_1728CVN = 0; +PENA_CODE_CVN = 0; +PENA_CODE_IGLO = 0; +PENA_CODE_1728GLO = 0; +PENA_CODE_GLO = 0; +PENA_CODE_IRSE5 = 0; +PENA_CODE_1728RSE5 = 0; +PENA_CODE_RSE5 = 0; +PENA_CODE_IRSE6 = 0; +PENA_CODE_1728RSE6 = 0; +PENA_CODE_RSE6 = 0; +PENA_CODE_IRSE7 = 0; +PENA_CODE_1728RSE7 = 0; +PENA_CODE_RSE7 = 0; +PENA_CODE_IC820 = 0; +PENA_CODE_1728C820 = 0; +PENA_CODE_C820 = 0; +PENA_CODE_IRSE8 = 0; +PENA_CODE_1728RSE8 = 0; +PENA_CODE_RSE8 = 0; +PENA_CODE_REGV = 0; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + CS = inf(attribut(champ_evenement(R, code), cotsoc)); + SENS = inf(champ_evenement(R, sens)); + PENA = inf(champ_evenement(R, penalite)); + si (GLOBAL.DEFAUT ou GLOBAL.RETARD) et SENS = SENS_R et PENA = 99 + alors + P = GLOBAL.CODE_PENA; + sinon + P = PENA; + finsi + si non (P dans (0, 1, 99)) alors + si P < 7 ou P dans (22, 24, 30, 32, 35, 55) alors + calculer cible process_penalite : avec PENA_CODE_I, P; + finsi + si non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21) + et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_ICRP, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23) + et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_1728CRP, P; + finsi + si CS dans (17, 18) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICVN, P; + finsi + si CS dans (17, 18) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CVN, P; + finsi + si CS = 18 et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGLO, P; + finsi + si CS = 18 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GLO, P; + finsi + si CS dans (19, 20) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE5, P; + finsi + si CS dans (19, 20) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE5, P; + finsi + si CS = 3 alors + calculer cible process_penalite : avec PENA_CODE_ITAXA, P; + finsi + si P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758AIR, P; + finsi + si CS = 3 et P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758ATA, P; + finsi + si CS = 4 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICSAL, P; + finsi + si CS = 4 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CSAL, P; + finsi + si CS = 8 alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACHR, P; + finsi + si CS = 8 et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CHR, P; + finsi + si CS = 9 alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACAP, P; + finsi + si CS = 9 et (P < 7 ou P dans (22, 24, 35, 55 )) alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CAP, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CDIS, P; + finsi + si CS = 15 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGAIN, P; + finsi + si CS = 15 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GAIN, P; + finsi + si CS = 11 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE1, P; + finsi + si CS = 11 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE1, P; + finsi + si CS dans (12, 21) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE2, P; + finsi + si CS dans (12, 21) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE2, P; + finsi + si CS = 13 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE3, P; + finsi + si CS = 13 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE3, P; + finsi + si CS = 14 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE4, P; + finsi + si CS = 14 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE4, P; + finsi + si CS dans (20, 21, 22) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE6, P; + finsi + si CS dans (20, 21, 22) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE6, P; + finsi + si CS = 23 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IC820, P; + finsi + si CS = 23 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728C820, P; + finsi + si CS = 22 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE8, P; + finsi + si CS = 22 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE8, P; + finsi + si (P < 7 ou P = 35) alors + calculer cible process_penalite : avec PENA_CODE_IISF, P; + finsi + si (P dans (3, 4, 5, 7, 8, 10, 11, 17, 18, 22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728ISF, P; + finsi + si CS dans (1, 7, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_C, P; + finsi + si CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23) alors + calculer cible process_penalite : avec PENA_CODE_R, P; + finsi + si CS dans (1, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_P, P; + finsi + si CS dans (17, 18) alors + calculer cible process_penalite : avec PENA_CODE_CVN, P; + finsi + si CS = 7 alors + calculer cible process_penalite : avec PENA_CODE_REGV, P; + finsi + si CS = 4 alors + calculer cible process_penalite : avec PENA_CODE_CSAL, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_CDIS, P; + finsi + si CS = 11 alors + calculer cible process_penalite : avec PENA_CODE_RSE1, P; + finsi + si CS dans (12, 21) alors + calculer cible process_penalite : avec PENA_CODE_RSE2, P; + finsi + si CS = 13 alors + calculer cible process_penalite : avec PENA_CODE_RSE3, P; + finsi + si CS = 14 alors + calculer cible process_penalite : avec PENA_CODE_RSE4, P; + finsi + si CS dans (19, 20) alors + calculer cible process_penalite : avec PENA_CODE_RSE5, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE6, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE7, P; + finsi + si CS = 23 alors + calculer cible process_penalite : avec PENA_CODE_C820, P; + finsi + si CS = 22 alors + calculer cible process_penalite : avec PENA_CODE_RSE8, P; + finsi + si CS = 15 alors + calculer cible process_penalite : avec PENA_CODE_GAIN, P; + finsi + si CS = 18 alors + calculer cible process_penalite : avec PENA_CODE_GLO, P; + finsi + finsi +) +CORR.V_CODPF1728 = get_pMax(PENA_CODE_1728); +CORR.V_CODPF1728C820 = get_pMax(PENA_CODE_1728C820); +CORR.V_CODPF1728CAP = get_pMax(PENA_CODE_1728CAP); +CORR.V_CODPF1728CDIS = get_pMax(PENA_CODE_1728CDIS); +CORR.V_CODPF1728CHR = get_pMax(PENA_CODE_1728CHR); +CORR.V_CODPF1728CRP = get_pMax(PENA_CODE_1728CRP); +CORR.V_CODPF1728CSAL = get_pMax(PENA_CODE_1728CSAL); +CORR.V_CODPF1728CVN = get_pMax(PENA_CODE_1728CVN); +CORR.V_CODPF1728GAIN = get_pMax(PENA_CODE_1728GAIN); +CORR.V_CODPF1728GLO = get_pMax(PENA_CODE_1728GLO); +CORR.V_CODPF1728ISF = get_pMax(PENA_CODE_1728ISF); +CORR.V_CODPF1728RSE1 = get_pMax(PENA_CODE_1728RSE1); +CORR.V_CODPF1728RSE2 = get_pMax(PENA_CODE_1728RSE2); +CORR.V_CODPF1728RSE3 = get_pMax(PENA_CODE_1728RSE3); +CORR.V_CODPF1728RSE4 = get_pMax(PENA_CODE_1728RSE4); +CORR.V_CODPF1728RSE5 = get_pMax(PENA_CODE_1728RSE5); +CORR.V_CODPF1728RSE6 = get_pMax(PENA_CODE_1728RSE6); +CORR.V_CODPF1728RSE7 = get_pMax(PENA_CODE_1728RSE7); +CORR.V_CODPF1728RSE8 = get_pMax(PENA_CODE_1728RSE8); +CORR.V_CODPFC = get_pMax(PENA_CODE_C); +CORR.V_CODPFC820 = get_pMax(PENA_CODE_C820); +CORR.V_CODPFCAP = get_pMax(PENA_CODE_CAP); +CORR.V_CODPFCDIS = get_pMax(PENA_CODE_CDIS); +CORR.V_CODPFCHR = get_pMax(PENA_CODE_CHR); +CORR.V_CODPFCSAL = get_pMax(PENA_CODE_CSAL); +CORR.V_CODPFCVN = get_pMax(PENA_CODE_CVN); +CORR.V_CODPFGAIN = get_pMax(PENA_CODE_GAIN); +CORR.V_CODPFGLO = get_pMax(PENA_CODE_GLO); +CORR.V_CODPFI = get_pMax(PENA_CODE_I); +CORR.V_CODPFIC820 = get_pMax(PENA_CODE_IC820); +CORR.V_CODPFICAP = get_pMax(PENA_CODE_ICAP); +CORR.V_CODPFICDIS = get_pMax(PENA_CODE_ICDIS); +CORR.V_CODPFICHR = get_pMax(PENA_CODE_ICHR); +CORR.V_CODPFICRP = get_pMax(PENA_CODE_ICRP); +CORR.V_CODPFICSAL = get_pMax(PENA_CODE_ICSAL); +CORR.V_CODPFICVN = get_pMax(PENA_CODE_ICVN); +CORR.V_CODPFIGAIN = get_pMax(PENA_CODE_IGAIN); +CORR.V_CODPFIGLO = get_pMax(PENA_CODE_IGLO); +CORR.V_CODPFIISF = get_pMax(PENA_CODE_IISF); +CORR.V_CODPFIRSE1 = get_pMax(PENA_CODE_IRSE1); +CORR.V_CODPFIRSE2 = get_pMax(PENA_CODE_IRSE2); +CORR.V_CODPFIRSE3 = get_pMax(PENA_CODE_IRSE3); +CORR.V_CODPFIRSE4 = get_pMax(PENA_CODE_IRSE4); +CORR.V_CODPFIRSE5 = get_pMax(PENA_CODE_IRSE5); +CORR.V_CODPFIRSE6 = get_pMax(PENA_CODE_IRSE6); +CORR.V_CODPFIRSE7 = get_pMax(PENA_CODE_IRSE7); +CORR.V_CODPFIRSE8 = get_pMax(PENA_CODE_IRSE8); +CORR.V_CODPFISF = get_pMax(PENA_CODE_ISF); +CORR.V_CODPFITAXA = get_pMax(PENA_CODE_ITAXA); +CORR.V_CODPFP = get_pMax(PENA_CODE_P); +CORR.V_CODPFR = get_pMax(PENA_CODE_R); +CORR.V_CODPFRSE1 = get_pMax(PENA_CODE_RSE1); +CORR.V_CODPFRSE2 = get_pMax(PENA_CODE_RSE2); +CORR.V_CODPFRSE3 = get_pMax(PENA_CODE_RSE3); +CORR.V_CODPFRSE4 = get_pMax(PENA_CODE_RSE4); +CORR.V_CODPFRSE5 = get_pMax(PENA_CODE_RSE5); +CORR.V_CODPFRSE6 = get_pMax(PENA_CODE_RSE6); +CORR.V_CODPFRSE7 = get_pMax(PENA_CODE_RSE7); +CORR.V_CODPFRSE8 = get_pMax(PENA_CODE_RSE8); +CORR.V_NBCOD1728 = get_pMulti(PENA_CODE_1728); +CORR.V_NBCOD1728C820 = get_pMulti(PENA_CODE_1728C820); +CORR.V_NBCOD1728CAP = get_pMulti(PENA_CODE_1728CAP); +CORR.V_NBCOD1728CDIS = get_pMulti(PENA_CODE_1728CDIS); +CORR.V_NBCOD1728CHR = get_pMulti(PENA_CODE_1728CHR); +CORR.V_NBCOD1728CRP = get_pMulti(PENA_CODE_1728CRP); +CORR.V_NBCOD1728CSAL = get_pMulti(PENA_CODE_1728CSAL); +CORR.V_NBCOD1728CVN = get_pMulti(PENA_CODE_1728CVN); +CORR.V_NBCOD1728GAIN = get_pMulti(PENA_CODE_1728GAIN); +CORR.V_NBCOD1728GLO = get_pMulti(PENA_CODE_1728GLO); +CORR.V_NBCOD1728ISF = get_pMulti(PENA_CODE_1728ISF); +CORR.V_NBCOD1728RSE1 = get_pMulti(PENA_CODE_1728RSE1); +CORR.V_NBCOD1728RSE2 = get_pMulti(PENA_CODE_1728RSE2); +CORR.V_NBCOD1728RSE3 = get_pMulti(PENA_CODE_1728RSE3); +CORR.V_NBCOD1728RSE4 = get_pMulti(PENA_CODE_1728RSE4); +CORR.V_NBCOD1728RSE5 = get_pMulti(PENA_CODE_1728RSE5); +CORR.V_NBCOD1728RSE6 = get_pMulti(PENA_CODE_1728RSE6); +CORR.V_NBCOD1728RSE7 = get_pMulti(PENA_CODE_1728RSE7); +CORR.V_NBCOD1728RSE8 = get_pMulti(PENA_CODE_1728RSE8); +CORR.V_NBCOD1758ACAP = get_pMulti(PENA_CODE_1758ACAP); +CORR.V_NBCOD1758ACHR = get_pMulti(PENA_CODE_1758ACHR); +CORR.V_NBCOD1758AIR = get_pMulti(PENA_CODE_1758AIR); +CORR.V_NBCOD1758ATA = get_pMulti(PENA_CODE_1758ATA); +CORR.V_NBCODC = get_pMulti(PENA_CODE_C); +CORR.V_NBCODC820 = get_pMulti(PENA_CODE_C820); +CORR.V_NBCODCDIS = get_pMulti(PENA_CODE_CDIS); +CORR.V_NBCODCSAL = get_pMulti(PENA_CODE_CSAL); +CORR.V_NBCODCVN = get_pMulti(PENA_CODE_CVN); +CORR.V_NBCODGAIN = get_pMulti(PENA_CODE_GAIN); +CORR.V_NBCODGLO = get_pMulti(PENA_CODE_GLO); +CORR.V_NBCODI = get_pMulti(PENA_CODE_I); +CORR.V_NBCODIC820 = get_pMulti(PENA_CODE_IC820); +CORR.V_NBCODICAP = get_pMulti(PENA_CODE_ICAP); +CORR.V_NBCODICDIS = get_pMulti(PENA_CODE_ICDIS); +CORR.V_NBCODICHR = get_pMulti(PENA_CODE_ICHR); +CORR.V_NBCODICRP = get_pMulti(PENA_CODE_ICRP); +CORR.V_NBCODICSAL = get_pMulti(PENA_CODE_ICSAL); +CORR.V_NBCODICVN = get_pMulti(PENA_CODE_ICVN); +CORR.V_NBCODIGAIN = get_pMulti(PENA_CODE_IGAIN); +CORR.V_NBCODIGLO = get_pMulti(PENA_CODE_IGLO); +CORR.V_NBCODIISF = get_pMulti(PENA_CODE_IISF); +CORR.V_NBCODIRSE1 = get_pMulti(PENA_CODE_IRSE1); +CORR.V_NBCODIRSE2 = get_pMulti(PENA_CODE_IRSE2); +CORR.V_NBCODIRSE3 = get_pMulti(PENA_CODE_IRSE3); +CORR.V_NBCODIRSE4 = get_pMulti(PENA_CODE_IRSE4); +CORR.V_NBCODIRSE5 = get_pMulti(PENA_CODE_IRSE5); +CORR.V_NBCODIRSE6 = get_pMulti(PENA_CODE_IRSE6); +CORR.V_NBCODIRSE7 = get_pMulti(PENA_CODE_IRSE7); +CORR.V_NBCODIRSE8 = get_pMulti(PENA_CODE_IRSE8); +CORR.V_NBCODISF = get_pMulti(PENA_CODE_ISF); +CORR.V_NBCODITAXA = get_pMulti(PENA_CODE_ITAXA); +CORR.V_NBCODP = get_pMulti(PENA_CODE_P); +CORR.V_NBCODR = get_pMulti(PENA_CODE_R); +CORR.V_NBCODRSE1 = get_pMulti(PENA_CODE_RSE1); +CORR.V_NBCODRSE2 = get_pMulti(PENA_CODE_RSE2); +CORR.V_NBCODRSE3 = get_pMulti(PENA_CODE_RSE3); +CORR.V_NBCODRSE4 = get_pMulti(PENA_CODE_RSE4); +CORR.V_NBCODRSE5 = get_pMulti(PENA_CODE_RSE5); +CORR.V_NBCODRSE6 = get_pMulti(PENA_CODE_RSE6); +CORR.V_NBCODRSE7 = get_pMulti(PENA_CODE_RSE7); +CORR.V_NBCODRSE8 = get_pMulti(PENA_CODE_RSE8); + +fonction is_1728_defaut: +application: iliad; +arguments: PENA; +resultat: R; +R = (PENA dans (10, 11, 12)); + +EST_CODE_ISF : calculee primrest = 0 : "" ; + +cible est_code_isf: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, COD9AA) + ou meme_variable(VAR, COD9AB) + ou meme_variable(VAR, COD9AC) + ou meme_variable(VAR, COD9AD) + ou meme_variable(VAR, COD9AE) + ou meme_variable(VAR, COD9BA) + ou meme_variable(VAR, COD9BB) + ou meme_variable(VAR, COD9CA) + ou meme_variable(VAR, COD9GF) + ou meme_variable(VAR, COD9GH) + ou meme_variable(VAR, COD9GL) + ou meme_variable(VAR, COD9GM) + ou meme_variable(VAR, COD9GN) + ou meme_variable(VAR, COD9GY) + ou meme_variable(VAR, COD9NC) + ou meme_variable(VAR, COD9NG) + ou meme_variable(VAR, COD9PR) + ou meme_variable(VAR, COD9PX) + ou meme_variable(VAR, COD9RS) + ou meme_variable(VAR, CMAJ_ISF) + ou meme_variable(VAR, MOISAN_ISF); + +cible est_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +calculer cible est_code_isf : avec RESULTAT, VAR; +si positif(RESULTAT) alors + RESULTAT = (PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99)); +sinon + RESULTAT = (PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99)); +finsi + +cible controle_defaut_retard_2042: +application: iliad; +variables_temporaires: RAP_1728_SF, PENA, EST_1728, EST_ISF, NUM_EVT; +RAP_1728_SF = indefini; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si non present(RAP_1728_SF) alors + si + ( + positif(EST_1728) + et ( + meme_variable(champ_evenement(R, code), V_0AM) + ou meme_variable(champ_evenement(R, code), V_0AC) + ou meme_variable(champ_evenement(R, code), V_0AD) + ou meme_variable(champ_evenement(R, code), V_0AO) + ou meme_variable(champ_evenement(R, code), V_0AV) + ) + et non ( + positif(GLOBAL.V_0AM + 0) + ou positif(GLOBAL.V_0AC + 0) + ou positif(GLOBAL.V_0AD + 0) + ou positif(GLOBAL.V_0AO + 0) + ou positif(GLOBAL.V_0AV + 0) + ) + ) + ou (positif(EST_ISF) et GLOBAL.ISF_PRIM + 0 = 0) + alors + RAP_1728_SF = R; + finsi + finsi +) +si present(RAP_1728_SF) alors + PENA = champ_evenement(RAP_1728_SF, penalite); + GLOBAL.CODE_PENA = PENA; + GLOBAL.DATE = champ_evenement(RAP_1728_SF, date); + si PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (PENA = 10); + GLOBAL.DEFAUT11 = (PENA = 11); + GLOBAL.DEFAUT1011 = (PENA dans (10, 11)); + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD101718 = (PENA dans (10, 17, 18)); + GLOBAL.RETARD0718 = (PENA dans (7, 8, 17, 18)); + GLOBAL.RETARD08 = (PENA = 8); + GLOBAL.RETARD07 = (PENA dans (1, 7, 99)); + GLOBAL.RETARD22 = (PENA = 22); + GLOBAL.RETARD99 = (PENA dans (1, 99)); + finsi +finsi +si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9YT; + GLOBAL.DATE = GLOBAL.DATE_9YU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9YT != NUM_EVT et GLOBAL.MONTANT_9YT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9XT; + GLOBAL.DATE = GLOBAL.DATE_9XU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9XT != NUM_EVT et GLOBAL.MONTANT_9XT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7 ou positif(GLOBAL.RETARD07)); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99 ou positif(GLOBAL.RETARD99)); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + +cible prepare_tl: +application: iliad; +variables_temporaires: COMMENCE_PAR_7; +si positif(GLOBAL.DEFAUT) alors + GLOBAL.TL_NON_ACQUISE = TL_TL_DEFAUT_2042; + CORR.IND_TL_MF = 1; +sinon + GLOBAL.TL_D2042_NB = 0; + GLOBAL.TL_D2042_INIT_NB = 0; + GLOBAL.TL_D2042_RECT_NB = 0; + iterer + : variable VAR + : categorie saisie * + : dans ( + si present(D2042.VAR) alors + TL_D2042.VAR = D2042.VAR; + GLOBAL.TL_D2042_NB = GLOBAL.TL_D2042_NB + 1; + TL_D2042_INIT.VAR = D2042.VAR; + GLOBAL.TL_D2042_INIT_NB = GLOBAL.TL_D2042_INIT_NB + 1; + TL_D2042_RECT.VAR = D2042.VAR; + GLOBAL.TL_D2042_RECT_NB = GLOBAL.TL_D2042_RECT_NB + 1; + sinon + TL_D2042.VAR = indefini; + TL_D2042_INIT.VAR = indefini; + TL_D2042_RECT.VAR = indefini; + finsi + si present(D2042_ABAT.VAR) alors + TL_D2042_ABAT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_INIT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_RECT.VAR = D2042_ABAT.VAR; + sinon + TL_D2042_ABAT.VAR = indefini; + TL_D2042_ABAT_INIT.VAR = indefini; + TL_D2042_ABAT_RECT.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) et attribut(VAR, categorie_TL) dans (40, 50) + : espace D2042 + : dans ( + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, VAR; + si positif(COMMENCE_PAR_7) alors + GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + VAR; + GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + VAR; + finsi + ) +finsi + +cible prepare_majo: +application: iliad; +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; + +cible prepare_inr: +application: iliad; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + INR_D2042.VAR = VAR; +) + +fonction taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +cible calcul_tl: +application: iliad; +arguments: EST_PREMIER; +si GLOBAL.TL_D2042_INIT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_init; + si GLOBAL.TL_NON_ACQUISE != TL_TL_ACQUISE alors + CORR.IND_TL_MF = 1; + finsi + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible sauve_base_tl_init_corr; +finsi +si GLOBAL.TL_D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_corr; +finsi +si GLOBAL.TL_D2042_RECT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_rect; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_rect_corr; +finsi +CORR.MFCDIS = GLOBAL.TL_MF_MFCDIS; +CORR.MFCHR = GLOBAL.TL_MF_MFCHR; +CORR.MFCHR7 = GLOBAL.TL_MF_MFCHR7; +CORR.MFCS = GLOBAL.TL_MF_MFCS; +CORR.MFCSAL = GLOBAL.TL_MF_MFCSAL; +CORR.MFCVN = GLOBAL.TL_MF_MFCVN; +CORR.MFGAIN = GLOBAL.TL_MF_MFGAIN; +CORR.MFGLO = GLOBAL.TL_MF_MFGLO; +CORR.MFIFI = GLOBAL.TL_MF_MFIFI; +CORR.MFIR = GLOBAL.TL_MF_MFIR; +CORR.MFMCSG820 = GLOBAL.TL_MF_MFMCSG820; +CORR.MFPCAP = GLOBAL.TL_MF_MFPCAP; +CORR.MFPS = GLOBAL.TL_MF_MFPS; +CORR.MFPSOL = GLOBAL.TL_MF_MFPSOL; +CORR.MFRD = GLOBAL.TL_MF_MFRD; +CORR.MFREGV = GLOBAL.TL_MF_MFREGV; +CORR.MFRSE1 = GLOBAL.TL_MF_MFRSE1; +CORR.MFRSE2 = GLOBAL.TL_MF_MFRSE2; +CORR.MFRSE3 = GLOBAL.TL_MF_MFRSE3; +CORR.MFRSE4 = GLOBAL.TL_MF_MFRSE4; +CORR.MFRSE5 = GLOBAL.TL_MF_MFRSE5; +CORR.MFRSE6 = GLOBAL.TL_MF_MFRSE6; +CORR.MFRSE7 = GLOBAL.TL_MF_MFRSE7; +CORR.MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA; +CORR.RAPCI_TL = GLOBAL.TL_BASE_TL; +CORR.RAPCI_INIT = GLOBAL.TL_BASE_TL_INIT; +CORR.RAPCI_RECT = GLOBAL.TL_BASE_TL_RECT; +CORR.CI_TL = GLOBAL.TL_BASE_TL_TBTC; +CORR.CI_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT; +CORR.CI_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT; +calculer cible ench_tl_corr; + +cible recherche_C22R02: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +variables_temporaires: TROUVE0, TROUVE1; +TROUVE0 = 0; +TROUVE1 = 0; +iterer +: variable R0 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R0, id_evt) = INDICE_EVT + et champ_evenement(R0, sens) = SENS_C + et champ_evenement(R0, penalite) dans (22, 24) + alors + TROUVE0 = 1; + finsi +) +iterer +: variable R1 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R1, id_evt) = INDICE_EVT + et champ_evenement(R1, sens) = SENS_R + et champ_evenement(R1, penalite) = 2 + et positif(TROUVE0) + alors + TROUVE1 = 1; + finsi +) +RESULTAT = TROUVE1; + + +cible recherche_C22R02_proc: +application: iliad; +variables_temporaires: RESULTAT, INDICE_EVT; +INDICE_EVT = TMP_ARG1; +calculer cible recherche_C22R02 : avec RESULTAT, INDICE_EVT; +TMP_RES = RESULTAT; + +cible verif_code_prem_evt: +application: iliad; +arguments: BRES, R; +variables_temporaires: B; +BRES = 0; +B = 1; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(RR, id_evt) != 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + alors + B = 0; + finsi +) +si B = 1 alors + BRES = 1; +sinon + iterer + : variable RR + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + champ_evenement(RR, id_evt) = 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et champ_evenement(R, montant) <= champ_evenement(RR, montant) + alors + BRES = 1; + finsi + ) +finsi + +cible verif_code_prem_evt_proc: +application: iliad; +calculer cible verif_code_prem_evt : avec TMP_RES, TMP_ARG1; + +cible est_code_tax_init: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, COA) ou meme_variable(VAR, COB) ou meme_variable(VAR, COD) + ou meme_variable(VAR, COE) ou meme_variable(VAR, COF) ou meme_variable(VAR, COG) + ou meme_variable(VAR, COH) ou meme_variable(VAR, COJ) ou meme_variable(VAR, COL) + ou meme_variable(VAR, COM) ou meme_variable(VAR, COO) ou meme_variable(VAR, COP) + ou meme_variable(VAR, COQ) ou meme_variable(VAR, COR) ou meme_variable(VAR, COT) + ou meme_variable(VAR, COU) ou meme_variable(VAR, COV) ou meme_variable(VAR, COX) +); + +cible denature_rappels: +application: iliad; +variables_temporaires: + TAUX_PENA_2042, PENA, TAUX_PENA_RAPPEL, + EST_1728, EST_ISF, EST_TAX_INIT, VERIF_PREM_EVT; +si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + si positif(GLOBAL.PRESENT_9YT) et GLOBAL.MONTANT_9YT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) et GLOBAL.MONTANT_9XT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + ) + finsi + TAUX_PENA_2042 = taux_penalite(GLOBAL.CODE_PENA); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + TAUX_PENA_RAPPEL = taux_penalite(champ_evenement(R, penalite)); + si champ_evenement(R, sens) != SENS_M alors + si positif(GLOBAL.RETARD0718) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + non ( + (non positif(EST_1728)) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (10, 17) + et GLOBAL.CODE_PENA dans (7, 18) + ) + ou champ_evenement(R, penalite) dans (22, 99) + ou TAUX_PENA_2042 < TAUX_PENA_RAPPEL + ) + alors + si champ_evenement(R, sens) = SENS_P alors + champ_evenement(R, penalite) = 0; + sinon + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 2 + et GLOBAL.CODE_PENA dans (7, 18) + alors + champ_evenement(R, anc_penalite) = champ_evenement(R, penalite); + champ_evenement(R, penalite) = 7; + sinon_si + champ_evenement(R, penalite) dans (1, 2, 3, 4, 5, 6, 30, 32, 55) + et (GLOBAL.DEFAUT1011 ou GLOBAL.RETARD0718) + et TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + alors + si + champ_evenement(R, penalite) = 2 et GLOBAL.CODE_PENA dans (7, 18) + alors + GLOBAL.LIMELIGHT = 1; + sinon + champ_evenement(R, 2042_rect) = 0; + finsi + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + finsi + si positif(GLOBAL.DEFAUT) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + alors + si non meme_variable(champ_evenement(R, code), ACODELAISINR) alors + champ_evenement(R, date) = GLOBAL.DATE; + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + sinon_si + positif(EST_1728) et champ_evenement(R, sens) != SENS_P + alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + (champ_evenement(R, penalite) dans (2, 3) et non positif(EST_ISF)) + ou ( + TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + et champ_evenement(R, penalite) != 22 + ) + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + sinon_si + non (champ_evenement(R, penalite) dans (6, 22, 24, 30, 32, 35)) + et champ_evenement(R, sens) != SENS_P + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + sinon + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + non ( + positif(EST_TAX_INIT) + ou meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_PREM_EVT, R; + si positif(VERIF_PREM_EVT) alors + champ_evenement(R, penalite) = 0; + finsi + si champ_evenement(R, sens) = SENS_M alors + CORR.V_FLAGMENC = 1; + finsi + finsi + finsi + ) +finsi + +cible mauvaise_foi: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: + MF_DEF, MONTANT_RECT, NATURE, MONTANT, + COMMENCE_PAR_7, COMMENCE_PAR_H, EST_ISF, + COTSOC; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + MF_DEF = 0; + si + champ_evenement(R, sens) != SENS_P + et non (champ_evenement(R, penalite) dans (0, 2, 22, 24, 99)) + alors + MONTANT_RECT = present(D2042_RECT.champ_evenement(R, code)); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + MONTANT = present(D2042.champ_evenement(R, code)); + si inf(MONTANT_RECT) < inf (MONTANT) alors + MF_DEF = 1; + sinon_si inf(MONTANT_RECT) = 0 alors + MF_DEF = -1; + finsi + sinon_si NATURE = N_REVENU alors + MONTANT = 0; + si inf(MONTANT_RECT) > inf(MONTANT) alors + MF_DEF = 1; + sinon_si inf (MONTANT_RECT) = 0 alors + MF_DEF = -1; + finsi + finsi + finsi + si MF_DEF != 0 alors + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); + calculer cible alias_commence_par_H : avec COMMENCE_PAR_H, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + positif(COMMENCE_PAR_7) ou positif(COMMENCE_PAR_H) + # codes_credit_imp + ou meme_variable(champ_evenement(R, code), 8TA) + ou meme_variable(champ_evenement(R, code), 8TB) + ou meme_variable(champ_evenement(R, code), 8TC) + ou meme_variable(champ_evenement(R, code), 8TE) + ou meme_variable(champ_evenement(R, code), 8TG) + ou meme_variable(champ_evenement(R, code), 8TH) + ou meme_variable(champ_evenement(R, code), 8TL) + ou meme_variable(champ_evenement(R, code), 8TO) + ou meme_variable(champ_evenement(R, code), 8TS) + ou meme_variable(champ_evenement(R, code), 8UW) + ou meme_variable(champ_evenement(R, code), 8UY) + ou meme_variable(champ_evenement(R, code), 8UZ) + alors + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + sinon_si positif(EST_ISF) alors + GLOBAL.TL_MF_MFIFI = GLOBAL.TL_MF_MFIFI + MF_DEF; + sinon + aiguillage (attribut(champ_evenement(R, code), cotsoc)) : ( + cas 2: GLOBAL.TL_MF_MFCDIS = GLOBAL.TL_MF_MFCDIS + MF_DEF; + cas 3: GLOBAL.TL_MF_MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA + MF_DEF; + cas 4: GLOBAL.TL_MF_MFCSAL = GLOBAL.TL_MF_MFCSAL + MF_DEF; + cas 5: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + cas 6: GLOBAL.TL_MF_MFGAIN = GLOBAL.TL_MF_MFGAIN + MF_DEF; + cas 7: GLOBAL.TL_MF_MFREGV = GLOBAL.TL_MF_MFREGV + MF_DEF; + cas 8: GLOBAL.TL_MF_MFCHR = GLOBAL.TL_MF_MFCHR + MF_DEF; + cas 9: GLOBAL.TL_MF_MFPCAP = GLOBAL.TL_MF_MFPCAP + MF_DEF; + cas 10 : + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + cas 11: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 12: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 13: + GLOBAL.TL_MF_MFRSE3 = GLOBAL.TL_MF_MFRSE3 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 14: + GLOBAL.TL_MF_MFRSE4 = GLOBAL.TL_MF_MFRSE4 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 16: GLOBAL.TL_MF_MFLOY = GLOBAL.TL_MF_MFLOY + MF_DEF; + cas 17: GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 18: + GLOBAL.TL_MF_MFGLO = GLOBAL.TL_MF_MFGLO + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 19: + GLOBAL.TL_MF_MFRSE5 = GLOBAL.TL_MF_MFRSE5 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 20: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 21: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 22: + GLOBAL.TL_MF_MFRSE7 = GLOBAL.TL_MF_MFRSE7 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 1: + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + par_defaut: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + ) + finsi + finsi + finsi +) + +cible recherche_cpena: +application: iliad; +arguments: CPENA, R; +variables_temporaires: PREM_RAPPEL, MONTANT_INITIAL, PRESENT_2042, MONTANT, TROUVE, NATURE; +PREM_RAPPEL = 0; +si present(D2042.champ_evenement(R, code)) alors + MONTANT_INITIAL = D2042.champ_evenement(R, code); + PRESENT_2042 = 1; +sinon + MONTANT_INITIAL = 0; + PRESENT_2042 = 0; +finsi +MONTANT = MONTANT_INITIAL; +TROUVE = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non (positif(GLOBAL.RETARD) et champ_evenement(RR, numero) = champ_evenement(PREM_RAPPEL, numero)) + et champ_evenement(RR, numero) <= champ_evenement(R, numero) + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(R, penalite) = champ_evenement(RR, penalite) + et champ_evenement(RR, sens) dans (SENS_R, SENS_C) + alors + MONTANT = MONTANT + champ_evenement(RR, montant); + TROUVE = 1; + finsi +) +si positif(TROUVE) alors + si MONTANT < champ_evenement(R, montant) alors + CPENA = 4; + sinon_si + positif(PRESENT_2042) + et MONTANT - MONTANT_INITIAL < champ_evenement(R, montant) + alors + CPENA = 5; + sinon + CPENA = 2; + finsi +sinon_si + (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) + et GLOBAL.CODE_PENA = champ_evenement(R, penalite) +alors + CPENA = 6; +sinon_si MONTANT < champ_evenement(R, montant) alors + si champ_evenement(R, penalite) != champ_evenement(R, anc_penalite) alors + CPENA = 6; + sinon + CPENA = 4; + finsi +sinon + CPENA = 5; +finsi +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si NATURE = N_CHARGE et CPENA dans (3, 4) alors + CPENA = 1; +finsi + +cible transf_rappels_prim: +application: iliad; +variables_temporaires: NATURE, SENS, PENALITE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, numero) >= 0 + et champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT + et non ( + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + ) + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_REVENU alors + SENS = SENS_R; + PENALITE = 99; + sinon_si NATURE = N_CHARGE alors + SENS = SENS_C; + PENALITE = 0; + sinon # interdit + SENS = SENS_R; # = 0 + PENALITE = 0; + finsi + champ_evenement(R, code) reference V_MILLESIME; + champ_evenement(R, montant) = 0; + champ_evenement(R, sens) = SENS; + champ_evenement(R, penalite) = PENALITE; + finsi +) + +cible transfo_pena_regco: +application: iliad; +arguments: R; +si meme_variable(champ_evenement(R, code), REGCO) alors + GLOBAL.PRESENT_REGCO = 1; + GLOBAL.PENALITE_REGCO = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_REGCO = champ_evenement(R, numero); + GLOBAL.NUM_RAP_REGCO = champ_evenement(R, rappel); + GLOBAL.IND_20_REGCO = champ_evenement(R, 2042_rect); +finsi + +fonction get_taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +fonction is_minoration_sf: +application: iliad; +arguments: INITIALE, COURANTE; +resultat: EST_MIN_SF; +si INITIALE = SF_MARIAGE ou INITIALE = SF_PACSE alors + EST_MIN_SF = COURANTE = SF_VEUVAGE_TRUE ou COURANTE = SF_PACSE; +sinon_si INITIALE = SF_VEUVAGE_TRUE alors + EST_MIN_SF = COURANTE = SF_MARIAGE ou COURANTE = SF_PACSE; +sinon + EST_MIN_SF = 1; +finsi + +fonction get_strate_pena: +application: iliad; +arguments: STR; +resultat: PENA; +aiguillage(STR):( + cas 0: PENA = 99; + cas 1 : PENA = -1; + cas 2 : + cas 3 : PENA = 6; + cas 4 : PENA = 12; + cas 5 : PENA = 32; + cas 6 : PENA = 31; + cas 7 : PENA = 5; + cas 8 : PENA = 4; + cas 9 : PENA = 35; + cas 10: PENA = 30; + cas 11: PENA = 11; + cas 12: PENA = 8; + cas 13: PENA = 55; + cas 14: PENA = 3; + cas 15: PENA = 17; + cas 16: PENA = 10; + cas 17: PENA = 7; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: PENA = 2; + cas 24: PENA = 22; + cas 25: PENA = 24; + par_defaut: PENA = -1; +) + +fonction get_strate_taux: +application: iliad; +arguments: STR; +resultat: TAUX; +aiguillage (STR) : ( + cas 0 : + cas 1 : TAUX = -1; + cas 2 : TAUX = 0; + cas 3 : TAUX = 100; + cas 4 : + cas 5 : + cas 6 : + cas 7 : + cas 8 : + cas 9 : TAUX = 80; + cas 10: + cas 11: + cas 12: + cas 13: + cas 14: TAUX = 40; + cas 15: + cas 16: + cas 17: TAUX = 10; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: + cas 24: + cas 25: TAUX = 0; + par_defaut: TAUX = -1; +) + +cible get_code_situation_famille: +application: iliad; +arguments: RESULTAT, CORR, VAR; +si meme_variable(VAR, 0AM) alors + RESULTAT = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RESULTAT = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RESULTAT = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RESULTAT = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si positif(CORR) et GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.V_MILLESIME alors + RESULTAT = SF_VEUVAGE_TRUE; + sinon + RESULTAT = SF_VEUVAGE_FALSE; + finsi +sinon + RESULTAT = SF_INVALIDE; +finsi + +cible is_rappel_strate: +application: iliad; +arguments: RESULTAT, R, S; +variables_temporaires: TAUX_STR, CODE_SIT_FAM, CORR; +si S = 0 alors + RESULTAT = ( + champ_evenement(R, penalite) = 99 + ou (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ); + si positif(RESULTAT) alors + GLOBAL.MAJO_TAUX_STRATE = get_taux_penalite(GLOBAL.CODE_PENA); + finsi +sinon_si S = 1 alors + RESULTAT = ( + dans_domaine(champ_evenement(R, code), saisie contexte) + et non positif(GLOBAL.IND_20_REGCO) + et non ( + meme_variable(champ_evenement(R, code), V_MILLESIME) + ou meme_variable(champ_evenement(R, code), ANCSDED) + ou meme_variable(champ_evenement(R, code), CALCULIR) + ou meme_variable(champ_evenement(R, code), IND_TRAIT) + ou meme_variable(champ_evenement(R, code), ROLCSG) + ) + ); + si positif(RESULTAT) alors + TAUX_STR = get_taux_penalite(GLOBAL.CODE_PENA); + si TAUX_STR != 0 alors + GLOBAL.MAJO_TAUX_STRATE = TAUX_STR; + finsi + si champ_evenement(R, penalite) != 0 alors + GLOBAL.MAJO_CODE_STRATE = champ_evenement(R, penalite); + finsi + finsi +sinon_si S = 2 alors + CORR = 0; + calculer cible get_code_situation_famille : avec CODE_SIT_FAM, CORR, champ_evenement(R, code); + si + GLOBAL.SF_COURANTE != SF_INVALIDE + et ( + CODE_SIT_FAM != SF_INVALIDE + ou ( + meme_variable(champ_evenement(R, code), 0DA) + ou meme_variable(champ_evenement(R, code), 0DB) + ) + ) + alors + RESULTAT = is_minoration_sf(GLOBAL.SF_INITIALE, GLOBAL.SF_COURANTE); + sinon + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + ou ( + positif(GLOBAL.DEFAUT) + et champ_evenement(R, sens) = SENS_R + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + ) + ); + finsi +sinon_si + champ_evenement(R, numero) = GLOBAL.NUM_EVT_REGCO + et meme_variable(champ_evenement(R, code), REGCO) +alors + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +sinon_si S = 18 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 19 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 20 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 21 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon_si S = 23 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +finsi + +cible get_strate: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: TROUVE; +si champ_evenement(R, sens) = SENS_P et champ_evenement(R, penalite) = 0 alors + RESULTAT = 24; +sinon + RESULTAT = -1; + iterer : variable S : entre 0..(GLOBAL.NB_STRATES - 1) increment 1 : dans ( + si RESULTAT = -1 alors + calculer cible is_rappel_strate : avec TROUVE, R, S; + si RESULTAT = -1 et positif(TROUVE) alors + RESULTAT = S; + finsi + finsi + ) +finsi + +fonction vers_mois: +application: iliad; +arguments: D; +resultat: M; +M = inf(D / 10000); + +fonction vers_annee: +application: iliad; +arguments: D; +resultat: A; +A = inf(D % 10000); + +fonction vers_date: +application: iliad; +arguments: M, A; +resultat: D; +D = inf(M) * 10000 + inf(A); + +cible traite_inr: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: MOIS_DEP, ANNEE_DEP, R_EVT; +GLOBAL.MENTION_EXP = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + alors + GLOBAL.MENTION_EXP = 1; + finsi +) +MOIS_DEP = 7; +ANNEE_DEP = GLOBAL.V_MILLESIME + 1; +R_EVT = -1; +iterer +: variable R +: entre (nb_evenements() - 1)..0 increment -1 +: dans ( + si R_EVT = -1 et champ_evenement(R, id_evt) = INDICE_EVT alors + R_EVT = R; + finsi +) +si R_EVT >= 0 alors + GLOBAL.INR_ANNEE_COR = vers_annee(champ_evenement(R_EVT, date)); + si vers_annee(champ_evenement(R_EVT, date)) < 2018 alors + GLOBAL.INR_NB_MOIS = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + GLOBAL.INR_NB_MOIS2 = 0; + sinon_si ANNEE_DEP > 2018 alors + GLOBAL.INR_NB_MOIS = 0; + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + sinon + GLOBAL.INR_NB_MOIS = 12 * (2018 - ANNEE_DEP) + (1 - MOIS_DEP); + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - 2018) + + vers_mois(champ_evenement(R_EVT, date)); + finsi +finsi + +cible is_rappel_abat_20: +application: iliad; +variables_temporaires: RESULTAT, R, NATURE, ABAT; +R = TMP_ARG1; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi +TMP_RES = RESULTAT; + +cible is_rappel_abat_20_proc: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: NATURE, ABAT; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi + + +cible est_code_sf_naiss: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, 0AM) ou meme_variable(VAR, 0AC) ou meme_variable(VAR, 0AD) + ou meme_variable(VAR, 0AO) ou meme_variable(VAR, 0AV) ou meme_variable(VAR, 0DA) + ou meme_variable(VAR, 0DB) +); + +cible is_rappel_autorise_maj: +application: iliad; +arguments: RESULTAT, R, MAJ; +variables_temporaires: EST_SF_NAISS, EST_TAX_INIT; +si MAJ = MAJ_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 10); +sinon_si MAJ = MAJ_NON_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 10); +sinon_si MAJ = MAJ_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 15); +sinon_si MAJ = MAJ_NON_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 15); +sinon_si MAJ = MAJ_RAPPEL_C alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + et GLOBAL.CODE_PENA != 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) > 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP01 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP22 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP24 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 24 + ); +sinon_si MAJ = MAJ_RAPPEL_F alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ); +sinon_si MAJ = MAJ_RAPPEL_NF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et (non positif(EST_SF_NAISS)) + ); +sinon_si MAJ = MAJ_RAPPEL_M alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + et (non positif(EST_SF_NAISS)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99)) + ) + ); +sinon_si MAJ = MAJ_RAPPEL_MF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = (champ_evenement(R, sens) = SENS_M et positif(EST_SF_NAISS)); +sinon_si MAJ = MAJ_RAPPEL_NON_M alors + RESULTAT = (champ_evenement(R, sens) != SENS_M); +sinon_si MAJ = MAJ_RAPPEL_P alors + RESULTAT = (champ_evenement(R, sens) = SENS_P); +sinon_si MAJ = MAJ_RAPPEL_R alors + RESULTAT = (champ_evenement(R, sens) = SENS_R); +sinon_si MAJ = MAJ_RAPPEL_R55 alors + RESULTAT = ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 99)) + ); +sinon_si MAJ = MAJ_1728 alors + RESULTAT = (champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31)); +sinon_si MAJ = MAJ_ABAT_20 alors + calculer cible is_rappel_abat_20_proc : avec RESULTAT, R; +sinon_si MAJ = MAJ_CODE_1729_2A5 alors + RESULTAT = (champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55)); +sinon_si MAJ = MAJ_CODE_1729_6 alors + RESULTAT = (champ_evenement(R, penalite) = 6); +sinon_si MAJ = MAJ_CODE_22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CODE_24 alors + RESULTAT = ( + champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CONTEXTE_22 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)); +sinon_si MAJ = MAJ_MENTION_EXP_99 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et (non positif(GLOBAL.DEFAUT)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_MENTION_EXP_99R alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et GLOBAL.CODE_PENA != 22 + et (non positif(GLOBAL.DEFAUT)) + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_NON_MENTION_EXP alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible is_rappel_autorise: +application: iliad; +arguments: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RES0, RES1, RES2, RES3; +RES0 = 1; +RES1 = 1; +RES2 = 1; +RES3 = 1; +si present(MAJ0) alors + calculer cible is_rappel_autorise_maj : avec RES0, R, MAJ0; +finsi +si present(MAJ1) alors + calculer cible is_rappel_autorise_maj : avec RES1, R, MAJ1; +finsi +si present(MAJ2) alors + calculer cible is_rappel_autorise_maj : avec RES2, R, MAJ2; +finsi +si present(MAJ3) alors + calculer cible is_rappel_autorise_maj : avec RES3, R, MAJ3; +finsi +RESULTAT = (RES0 et RES1 et RES2 et RES3); + +cible is_rappel_autorise_proc: +application: iliad; +variables_temporaires: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +R = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible is_rappel_autorise : avec RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +TMP_RES = RESULTAT; + +cible is_init_1731: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +calculer cible init_1731; +RESULTAT = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + RESULTAT = 1; + finsi +) + +cible calcul_majo_P: +application: iliad; +arguments: NB_RAPPELS_P; +si GLOBAL.MAJO_D2042_P_NB > 0 et NB_RAPPELS_P != 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_majo_d2042_p; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + si GLOBAL.MAJO_T_RABP != 0 alors + CORR.T_RABP = GLOBAL.MAJO_T_RABP; + CORR.T_RABP07 = GLOBAL.MAJO_T_RABP07; + CORR.T_RABP08 = GLOBAL.MAJO_T_RABP08; + CORR.T_RABP09 = GLOBAL.MAJO_T_RABP09; + CORR.T_RABP10 = GLOBAL.MAJO_T_RABP10; + CORR.T_RABP11 = GLOBAL.MAJO_T_RABP11; + CORR.T_RABP12 = GLOBAL.MAJO_T_RABP12; + CORR.T_RABP17 = GLOBAL.MAJO_T_RABP17; + CORR.T_RABP31 = GLOBAL.MAJO_T_RABP31; + finsi + si GLOBAL.MAJO_T_RABPPS != 0 alors + CORR.T_RABPPS = GLOBAL.MAJO_T_RABPPS; + CORR.T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07; + CORR.T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08; + CORR.T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09; + CORR.T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10; + CORR.T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11; + CORR.T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12; + CORR.T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17; + CORR.T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31; + finsi + si GLOBAL.MAJO_T_RABPCS != 0 alors + CORR.T_RABPCS = GLOBAL.MAJO_T_RABPCS; + CORR.T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07; + CORR.T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08; + CORR.T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09; + CORR.T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10; + CORR.T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11; + CORR.T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12; + CORR.T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17; + CORR.T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31; + finsi + si GLOBAL.MAJO_T_RABPRD != 0 alors + CORR.T_RABPRD = GLOBAL.MAJO_T_RABPRD; + CORR.T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07; + CORR.T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08; + CORR.T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09; + CORR.T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10; + CORR.T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11; + CORR.T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12; + CORR.T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17; + CORR.T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31; + finsi + si GLOBAL.MAJO_T_RABPCH != 0 alors + CORR.T_RABPCH = GLOBAL.MAJO_T_RABPCH; + CORR.T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07; + CORR.T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08; + CORR.T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09; + CORR.T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10; + CORR.T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11; + CORR.T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12; + CORR.T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17; + CORR.T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31; + finsi + si GLOBAL.MAJO_T_RABPLO != 0 alors + CORR.T_RABPLO = GLOBAL.MAJO_T_RABPLO; + CORR.T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07; + CORR.T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08; + CORR.T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09; + CORR.T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10; + CORR.T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11; + CORR.T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12; + CORR.T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17; + CORR.T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31; + finsi + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + CORR.FLAG_TRMAJOP = 1; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + calculer cible init_1731; + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_TRMAJOP = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + calculer cible sauve_base_majo_corr; +finsi + +cible cumule_base_tl_aux: +application: iliad; +arguments: M_TL, M_TL_TBTC, R; +variables_temporaires: MONTANT, COMMENCE_PAR_7, CAT_TL; +calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); +si positif(COMMENCE_PAR_7) alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = champ_evenement(R, base_tl); +finsi +si champ_evenement(R, sens) != SENS_R alors + MONTANT = -MONTANT; +finsi +CAT_TL = attribut(champ_evenement(R, code), categorie_TL); +si CAT_TL = 40 alors + M_TL = MONTANT; + M_TL_TBTC = 0; +sinon_si CAT_TL = 50 alors + M_TL = 0; + M_TL_TBTC = MONTANT; +sinon + M_TL = 0; + M_TL_TBTC = 0; +finsi + +cible cumule_base_tl_init: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +si GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI alors + M_TL = 0; + M_TL_TBTC = 0; +sinon + calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +finsi +GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + M_TL_TBTC; + +cible cumule_champ_base_tl: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL = GLOBAL.TL_BASE_TL + M_TL; +GLOBAL.TL_BASE_TL_TBTC = GLOBAL.TL_BASE_TL_TBTC + M_TL_TBTC; + +cible cumule_champ_base_tl_rect: +application: iliad; +variables_temporaires: R, M_TL, M_TL_TBTC; +R = TMP_ARG1; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL_RECT = GLOBAL.TL_BASE_TL_RECT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT + M_TL_TBTC; + +cible traite_majo_P: +application: iliad; +variables_temporaires: R, NATURE, PENA, COTSOC, MONTANT; +R = TMP_ARG1; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +PENA = champ_evenement(R, penalite); +COTSOC = attribut(champ_evenement(R, code), cotsoc); +MONTANT = champ_evenement(R, montant); +si + NATURE = N_REVENU + et ((7 <= PENA et PENA <= 12) ou PENA = 17 ou PENA = 31) +alors + si COTSOC = 1 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 5 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 9 alors + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 10 alors + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC dans (11, 12, 13, 14, 19, 20, 21) alors + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC = 16 alors + calculer cible add_majo_T_RABPLO : avec PENA, MONTANT; + sinon_si COTSOC = 18 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + finsi +finsi + +cible calculer_sommes_2042: +application: iliad; +arguments: R; +variables_temporaires: S, N, MONTANT; +S = attribut(champ_evenement(R, code), sanction); +calculer cible get_nature : avec N, champ_evenement(R, code); +si champ_evenement(R, sens) = SENS_R alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = -champ_evenement(R, montant); +finsi +si S = 1 alors + GLOBAL.INR_SOMMERF_2 = GLOBAL.INR_SOMMERF_2 + MONTANT; +finsi +si S = 2 ou S = 12 alors + GLOBAL.INR_SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2 + MONTANT; +finsi +si S = 3 ou S = 13 alors + GLOBAL.INR_SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2 + MONTANT; +finsi +si S = 4 ou S = 14 alors + GLOBAL.INR_SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2 + MONTANT; +finsi +si S = 5 ou S = 15 alors + GLOBAL.INR_SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2 + MONTANT; +finsi +si S = 6 ou S = 16 alors + GLOBAL.INR_SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2 + MONTANT; +finsi +si (1 <= S et S <= 8) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2 + MONTANT; +finsi +si (1 <= S et S <= 9) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMERI_2 = GLOBAL.INR_SOMMERI_2 + MONTANT; +finsi +si (1 <= S et S <= 6) ou S = 8 ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2 + MONTANT; +finsi +si S = 8 et N = N_REVENU alors + GLOBAL.INR_SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2 + MONTANT; +finsi +si S = 2 et N = N_REVENU alors + GLOBAL.INR_SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2 + MONTANT; +finsi +si S = 3 et N = N_REVENU alors + GLOBAL.INR_SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2 + MONTANT; +finsi +si S = 4 et N = N_REVENU alors + GLOBAL.INR_SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2 + MONTANT; +finsi + +cible calculer_sommes_2042_proc: +application: iliad; +variables_temporaires: R; +R = TMP_ARG1; +calculer cible calculer_sommes_2042 : avec R; + +cible maj_elt_2042: +application: iliad; +arguments: MONTANT_2042, R; +variables_temporaires: NATURE; +si + # codes_dates + meme_variable(MONTANT_2042, 0AX) + ou meme_variable(MONTANT_2042, 0AY) + ou meme_variable(MONTANT_2042, 0AZ) + ou meme_variable(MONTANT_2042, 9YD) + ou meme_variable(MONTANT_2042, 9YR) +alors + MONTANT_2042 = champ_evenement(R, montant); +sinon + calculer cible get_nature : avec NATURE, MONTANT_2042; + si NATURE = N_REVENU alors + si + champ_evenement(R, sens) = SENS_R + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + non (champ_evenement(R, sens) dans (SENS_M, SENS_C)) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi +finsi + +cible set_rappel: +application: iliad; +arguments: MONTANT, R; +variables_temporaires: NATURE; +si present(MONTANT) alors + calculer cible maj_elt_2042 : avec MONTANT, R; +sinon + calculer cible get_nature : avec NATURE, MONTANT; + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si NATURE = N_REVENU alors + MONTANT = - champ_evenement(R, montant); + sinon + MONTANT = champ_evenement(R, montant); + finsi + sinon + si + NATURE = N_REVENU + ou ( + # codes_dates + meme_variable(MONTANT, 0AX) + ou meme_variable(MONTANT, 0AY) + ou meme_variable(MONTANT, 0AZ) + ou meme_variable(MONTANT, 9YD) + ou meme_variable(MONTANT, 9YR) + ) + alors + MONTANT = champ_evenement(R, montant); + sinon + MONTANT = - champ_evenement(R, montant); + finsi + finsi +finsi + +cible met_a_jour_2042_INR_evt: +application: iliad; +arguments: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec INR_D2042.champ_evenement(R, code), R : espace GLOBAL; + si + non ( + positif(IS_PREMIER) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + et GLOBAL.CODE_9ZA = 0 + et champ_evenement(R, sens) != SENS_P + et ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + alors + calculer cible calculer_sommes_2042 : avec R; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) +si GLOBAL.NB_RAPPELS_RES > 0 alors + CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; + CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; + CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; + CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; + CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; + CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; + CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; + CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; + CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; + CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; + CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; + CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; + CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; +finsi + +cible met_a_jour_2042_INR_evt_proc: +application: iliad; +variables_temporaires: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_INR_evt +: avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +cible met_a_jour_2042_evt: +application: iliad; +arguments: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.TMP_ARG1 = R; + si F_TRAITEMENT = 1 alors + calculer cible cumule_champ_base_tl : espace GLOBAL; + sinon_si F_TRAITEMENT = 2 alors + calculer cible cumule_base_tl_init : espace GLOBAL; + sinon_si F_TRAITEMENT = 3 alors + calculer cible cumule_champ_base_tl_rect : espace GLOBAL; + sinon_si F_TRAITEMENT = 4 alors + calculer cible traite_majo_P : espace GLOBAL; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) + +cible met_a_jour_2042_evt_TL_D2042: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042; + +cible met_a_jour_2042_evt_TL_D2042_INIT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_INIT; + +cible met_a_jour_2042_evt_TL_D2042_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_RECT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT_INIT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT_INIT; + +cible met_a_jour_2042_evt_TL_D2042_ABAT_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace TL_D2042_ABAT_RECT; + +cible met_a_jour_2042_evt_D2042_RECT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace D2042_RECT; + +cible met_a_jour_2042_evt_D2042_ABAT: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace D2042_ABAT; + +cible met_a_jour_2042_evt_MAJO_D2042_P: +application: iliad; +variables_temporaires: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +INDICE_EVT = TMP_ARG1; +F_TRAITEMENT = TMP_ARG2; +MAJ0 = TMP_ARG3; +MAJ1 = TMP_ARG4; +MAJ2 = TMP_ARG5; +MAJ3 = TMP_ARG6; +calculer cible met_a_jour_2042_evt +: avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_P; + +cible met_a_jour_2042_strate: +application: iliad; +arguments: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: NUM_PREM_RAPPEL, RAP_AUTH; +NUM_PREM_RAPPEL = champ_evenement(0, numero); +GLOBAL.NB_RAPPELS_RES = 0; +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, strate) = NUM_STRATE alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si + non ( + positif(GLOBAL.RETARD) + et champ_evenement(R, numero) = NUM_PREM_RAPPEL + ) + et positif(RAP_AUTH) + alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi + ) +) + +cible met_a_jour_2042_strate_MAJO_D2042_P: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_P; + +cible met_a_jour_2042_strate_MAJO_D2042_ABAT_P: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_ABAT_P; + +cible met_a_jour_2042_strate_MAJO_D2042_STRATE: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_STRATE; + +cible met_a_jour_2042_strate_MAJO_D2042_ABAT_STRATE: +application: iliad; +variables_temporaires: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +NUM_STRATE = TMP_ARG1; +MAJ0 = TMP_ARG2; +MAJ1 = TMP_ARG3; +MAJ2 = TMP_ARG4; +MAJ3 = TMP_ARG5; +calculer cible met_a_jour_2042_strate +: avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 +: espace MAJO_D2042_ABAT_STRATE; + +cible set_rappel_1731bis: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: MONTANT, NATURE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si + attribut(champ_evenement(R, code), sanction) = 9 + et ( + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et GLOBAL.CODE_PENA dans (3, 8, 11) + ) + ou ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + ) +alors + CORR.SOMMERI1731 = 1; +finsi +MONTANT = GLOBAL.champ_evenement(R, code) + 0; +si + (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C) + et (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) +alors + si + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 2, 3, 7, 8, 10, 11, 17, 18, 22, 24, 99 + ) + ) + ou champ_evenement(R, sens) = SENS_M + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_CHARGE alors + si MONTANT + champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_REVENU alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi +finsi +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et champ_evenement(R, sens) != SENS_C + ) +alors + si NATURE = N_REVENU alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22, 24, 99) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si NATURE = N_CHARGE alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans ( + 2, 3, 4, 5, 6, 7, 8, 10, 11, 17, 18, 22, 24, 30, 31, 32, 35, 55, 99 + ) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + GLOBAL.champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi + finsi +finsi + +cible set_rappel_1731bis_proc: +application: iliad; +variables_temporaires: R, IS_PREMIER; +R = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +calculer cible set_rappel_1731bis : avec R, IS_PREMIER; + +cible prepare_1731_aux: +application: iliad; +arguments: R, IS_PREMIER, MAJ_TGV_COPIE; +si positif(MAJ_TGV_COPIE) alors + calculer cible set_rappel_1731bis : avec R, IS_PREMIER; +finsi +si champ_evenement(R, penalite) = 30 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR30 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R30 = 1; + finsi +finsi +si champ_evenement(R, penalite) = 32 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR32 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R32 = 1; + finsi +finsi +si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 10 alors + GLOBAL.ART1731_PRESENT_R10 = 1; +finsi + +cible prepare_1731_aux_proc: +application: iliad; +variables_temporaires: R, IS_PREMIER, MAJ_TGV_COPIE; +R = TMP_ARG1; +IS_PREMIER = TMP_ARG2; +MAJ_TGV_COPIE = TMP_ARG3; +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo_aux: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: NATURE, MAJ_TGV_COPIE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +MAJ_TGV_COPIE = ( + champ_evenement(R, sens) dans (SENS_M, SENS_C) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (1, 2, 7, 10, 17, 18, 22, 24, 99) + ) + ou ( + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 1, 2, 7, 10, 17, 18, 22, 24, 99, 3, + 4, 5, 6, 8, 11, 30, 31, 32, 35, 55 + ) + ) +); +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo: +application: iliad; +arguments: NUM_STRATE; +variables_temporaires: NUM_EVT_PREMIER, IS_PREMIER, NUM_STRATE_COURANTE; +NUM_EVT_PREMIER = champ_evenement(0, numero); +restaurer +: variable V +: categorie * +: espace GLOBAL +: apres ( + calculer cible empty_art1731; + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + IS_PREMIER = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + si positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C alors + IS_PREMIER = (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C); + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER; + finsi + ) + finsi + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + NUM_STRATE_COURANTE = champ_evenement(R, strate); + IS_PREMIER = champ_evenement(R, numero) = NUM_EVT_PREMIER; + si + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et NUM_STRATE_COURANTE <= NUM_STRATE + et champ_evenement(R, sens) != SENS_C + ) + ou ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et NUM_STRATE_COURANTE <= NUM_STRATE + ) + alors + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER; + finsi + ) + ) + calculer cible enchaine_calcul_prim; + calculer cible calcul_1731; +) + +cible prepare_1731_majo_proc: +application: iliad; +variables_temporaires: NUM_STRATE; +NUM_STRATE = TMP_ARG1; +calculer cible prepare_1731_majo : avec NUM_STRATE; + +cible calcul_inr_aux: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, FLG_INR; +variables_temporaires: FLAG, NINR; +calculer cible reset_saisie_calc; +calculer cible remplit_tgv_inr_d2042; +CORR.PASS_TLIR = CORR.TL_IR + 0; +CORR.PASS_TLIFI = CORR.TL_IFI + 0; +CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; +CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + alors + FLAG = 1; + finsi +) +CORR.FLAG_C22 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 2 + alors + FLAG = 1; + finsi +) +CORR.FLAG_C02 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 99 alors + FLAG = 1; + finsi +) +CORR.FLAG_99 = si (positif(FLAG)) alors (4) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 7 alors + FLAG = 1; + finsi +) +CORR.FLAG_07 = si (positif(FLAG)) alors (5) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 24 alors + FLAG = 1; + finsi +) +CORR.FLAG_24 = si (positif(FLAG)) alors (6) sinon (0) finsi; +NINR = 1; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + non ( + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 2 + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + ) + ) + alors + NINR = 0; + finsi +) +NINR = ((non positif(GLOBAL.DEFAUT)) et nb_evenements() != 0 et positif(NINR)); +CORR.FLAG_NINR = NINR; +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; +CORR.FLAG_9YT = GLOBAL.R_TARDIF; +CORR.FLAG_R99 = GLOBAL.SAUVE_INR_R99; +CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; +CORR.CODE_2042 = GLOBAL.CODE_PENA; +CORR.ANNEECOR = GLOBAL.INR_ANNEE_COR; +CORR.NBMOISI = GLOBAL.INR_NB_MOIS; +CORR.NBMOISI2 = GLOBAL.INR_NB_MOIS2; +CORR.NBMOIS2ISF = 0; +CORR.FLAG_INR = FLG_INR; +calculer cible enchaine_calcul_corr; +calculer cible signaler_erreurs; + +cible calcul_inr_aux_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, FLG_INR; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +FLG_INR = TMP_ARG3; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, FLG_INR; + +cible traite_tl: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +calculer cible mauvaise_foi : avec INDICE_EVT; +GLOBAL.TL_MF_MFCDIS = si (GLOBAL.TL_MF_MFCDIS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR = si (GLOBAL.TL_MF_MFCHR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR7 = si (GLOBAL.TL_MF_MFCHR7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCS = si (GLOBAL.TL_MF_MFCS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCSAL = si (GLOBAL.TL_MF_MFCSAL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCVN = si (GLOBAL.TL_MF_MFCVN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGAIN = si (GLOBAL.TL_MF_MFGAIN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGLO = si (GLOBAL.TL_MF_MFGLO > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIFI = si (GLOBAL.TL_MF_MFIFI > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIR = si (GLOBAL.TL_MF_MFIR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFLOY = si (GLOBAL.TL_MF_MFLOY > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFMCSG820 = si (GLOBAL.TL_MF_MFMCSG820 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPCAP = si (GLOBAL.TL_MF_MFPCAP > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPS = si (GLOBAL.TL_MF_MFPS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPSOL = si (GLOBAL.TL_MF_MFPSOL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRD = si (GLOBAL.TL_MF_MFRD > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFREGV = si (GLOBAL.TL_MF_MFREGV > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE1 = si (GLOBAL.TL_MF_MFRSE1 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE2 = si (GLOBAL.TL_MF_MFRSE2 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE3 = si (GLOBAL.TL_MF_MFRSE3 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE4 = si (GLOBAL.TL_MF_MFRSE4 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE5 = si (GLOBAL.TL_MF_MFRSE5 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE6 = si (GLOBAL.TL_MF_MFRSE6 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE7 = si (GLOBAL.TL_MF_MFRSE7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFTAXAGA = si (GLOBAL.TL_MF_MFTAXAGA > 0) alors (1) sinon (0) finsi; +si + GLOBAL.TL_MF_MFCDIS > 0 ou GLOBAL.TL_MF_MFCHR > 0 ou GLOBAL.TL_MF_MFCHR7 > 0 + ou GLOBAL.TL_MF_MFCS > 0 ou GLOBAL.TL_MF_MFCSAL > 0 ou GLOBAL.TL_MF_MFCVN > 0 + ou GLOBAL.TL_MF_MFGAIN > 0 ou GLOBAL.TL_MF_MFGLO > 0 ou GLOBAL.TL_MF_MFIFI > 0 + ou GLOBAL.TL_MF_MFIR > 0 ou GLOBAL.TL_MF_MFLOY > 0 ou GLOBAL.TL_MF_MFMCSG820 > 0 + ou GLOBAL.TL_MF_MFPCAP > 0 ou GLOBAL.TL_MF_MFPS > 0 ou GLOBAL.TL_MF_MFPSOL > 0 + ou GLOBAL.TL_MF_MFRD > 0 ou GLOBAL.TL_MF_MFREGV > 0 ou GLOBAL.TL_MF_MFRSE1 > 0 + ou GLOBAL.TL_MF_MFRSE2 > 0 ou GLOBAL.TL_MF_MFRSE3 > 0 ou GLOBAL.TL_MF_MFRSE4 > 0 + ou GLOBAL.TL_MF_MFRSE5 > 0 ou GLOBAL.TL_MF_MFRSE6 > 0 ou GLOBAL.TL_MF_MFRSE7 > 0 + ou GLOBAL.TL_MF_MFTAXAGA > 0 +alors + GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI; +sinon_si GLOBAL.TL_NON_ACQUISE != TL_TL_DEFAUT_2042 alors + GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +finsi +si + non ( + positif(GLOBAL.DEFAUT) + ou (positif(GLOBAL.RETARD) et positif(IS_PREMIER)) + ) +alors + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_RAPPEL_NON_M; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_RAPPEL_C; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_MENTION_EXP_99; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL_RECT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_MENTION_EXP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_RECT; +finsi + +cible traite_tl_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + +cible is_def_ret_not_8_11: +application: iliad; +arguments: RESULTAT, R; +RESULTAT = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (8, 11) + ) +); + +cible is_code_rappel_13: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et non positif(EST_SF_NAISS) + ) +); + +cible is_code_rappel_12: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 24 + ) +); + +cible is_code_rappel_11: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)) + ou ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_C + ou ( + champ_evenement(R, sens) = SENS_R + et meme_variable(champ_evenement(R, code), REGCO) + ) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et positif(HAS_C22R02) + ) + ) + ) + ) + ) +); + +cible is_code_rappel_10: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) + ou ( + positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (22, 24) + ) + ) + ) +); + +cible is_code_rappel_09: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (22, 24) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) + ) + ) +); + +cible is_code_rappel_08: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_07: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_06: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, HAS_C22R02; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 10 + et champ_evenement(R, penalite) dans (22, 24) + et ( + ( + champ_evenement(R, sens) = SENS_C + et non positif(HAS_C22R02) + ) + ou champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); + +cible is_code_rappel_05: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) +); + +cible is_code_rappel_04: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + ( + champ_evenement(R, sens) = SENS_C + et ( + ( + # is_rappel_1728_X + champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31) + ) + ou champ_evenement(R, penalite) = 6 + ou ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ou ( + champ_evenement(R, penalite) = 22 + et attribut(champ_evenement(R, code), categorie_TL) = 10 + et positif(HAS_C22R02) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) = 6 + ou ( + ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + ) + ) + ) + ) +); + +cible is_code_rappel_03: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) +); + +cible is_code_rappel_02: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + positif(EST_SF_NAISS) + et ( + (champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1) + ou (champ_evenement(R, sens) = SENS_M et positif(GLOBAL.MENTION_EXP)) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + et GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_C + et GLOBAL.CODE_PENA != 22 + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + ) +); + +cible is_code_rappel_01: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non positif(IS_PREMIER) + et ( + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et positif(GLOBAL.MENTION_EXP) + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) + ) + ) +); + +cible prepare_1731_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, CAS_INR; +variables_temporaires: NUM_PREM_RAPPEL_EVT, NUM_EVT_PREMIER, PREM_EVT, IS_CODE, MAJ_TGV_COPIE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si non present(NUM_PREM_RAPPEL_EVT) et champ_evenement(R, id_evt) = INDICE_EVT alors + NUM_PREM_RAPPEL_EVT = champ_evenement(R, numero); + finsi +) +NUM_EVT_PREMIER = champ_evenement(0, numero); +restaurer : variable V : categorie * : espace GLOBAL : apres ( + calculer cible empty_art1731; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= NUM_PREM_RAPPEL_EVT alors + PREM_EVT = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + IS_CODE = 0; + MAJ_TGV_COPIE = 0; + calculer cible is_code_rappel_13 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 13 et positif(IS_CODE))); + calculer cible is_code_rappel_12 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 12 et positif(IS_CODE))); + calculer cible is_code_rappel_11 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 11 et positif(IS_CODE))); + calculer cible is_code_rappel_10 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 10 et positif(IS_CODE))); + calculer cible is_code_rappel_09 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 9 et positif(IS_CODE))); + calculer cible is_code_rappel_08 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 8 et positif(IS_CODE))); + calculer cible is_code_rappel_07 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 7 et positif(IS_CODE))); + calculer cible is_code_rappel_06 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 6 et positif(IS_CODE))); + calculer cible is_code_rappel_05 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 5 et positif(IS_CODE))); + calculer cible is_code_rappel_04 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 4 et positif(IS_CODE))); + calculer cible is_code_rappel_03 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 3 et positif(IS_CODE))); + calculer cible is_code_rappel_02 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 2 et positif(IS_CODE))); + calculer cible is_code_rappel_01 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 1 et positif(IS_CODE))); + calculer cible prepare_1731_aux : avec R, PREM_EVT, MAJ_TGV_COPIE; + finsi + ) + calculer cible enchaine_calcul_prim; + calculer cible calcul_1731; +) + +cible prepare_1731_inr_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, CAS_INR; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +CAS_INR = TMP_ARG3; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + +cible calcul_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: DEFAUT_RETARD_PREMIER, HAS_C22R02, MAJ0, MAJ1, MAJ2, MAJ3, INR_FLAG, CAS_INR; +DEFAUT_RETARD_PREMIER = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) +); +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_PROV_ANT.VAR = VAR; +) +si INDICE_EVT < 2 alors + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable VAR + : categorie saisie * + : espace INR_D2042_R9901_ANT + : dans ( + INR_D2042.VAR = VAR; + ) + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_r9901_corr; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_R9901_ANT.VAR = VAR; +) +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 1; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_HR_corr; +CORR.REF1731 = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_REFR99R_ANT.VAR = VAR; +) + +si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_R55; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 2; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ref_corr; +CORR.REF1731 = 0; +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + CAS_INR = 3; + calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_ntl_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat98_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_2A5; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +si (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 4; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 5; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_intertl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CONTEXTE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 6; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 7; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_CODE_24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_RAPPEL_CP24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 8; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl24_corr; + +CAS_INR = 9; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_1729_2A5; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 10; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_CONTEXTE_22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 11; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 12; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl24_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_NF; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 13; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_inter22_corr; + +cible calcul_inr_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + +cible traite_reference: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3; +si + non ( + ( + positif(GLOBAL.DEFAUT) # positif(GLOBAL.RETARD) + ou positif(GLOBAL.RETARD) + ) + et positif(IS_PREMIER) + ) +alors + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_ABAT; +finsi + +cible traite_reference_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + +cible calcul_majo_normal: +application: iliad; +arguments: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +variables_temporaires: TAUX_PENALITE; +TAUX_PENALITE = get_strate_taux(NUM_STRATE); +si TAUX_PENALITE = -1 alors + TAUX_PENALITE = GLOBAL.MAJO_TAUX_STRATE; +finsi +si NUM_STRATE = 0 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + GLOBAL.MAJO_PREM_STR = 1; + GLOBAL.MAJO_NB_STR_TR = 0; +finsi +si + (NB_RAPPELS_STRATE != 0 et GLOBAL.MAJO_D2042_STRATE_NB > 0) + ou NUM_STRATE = GLOBAL.NB_STRATES - 1 +alors + # if taux_penalite < 0 then failwith "Taux pénalite négatif"; + calculer cible reset_saisie_calc; + CORR.FLAG_1STRATE = GLOBAL.MAJO_PREM_STR; + calculer cible remplit_tgv_majo_d2042_strate; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + calculer cible set_majo_str_tr : avec NUM_STRATE; + CORR.X = NUM_STRATE; + CORR.TAUX_STRATE = TAUX_PENALITE; + CORR.FLAG_NBSTRTR = GLOBAL.MAJO_NB_STR_TR; + CORR.FLAG_DERSTTR = GLOBAL.MAJO_DERN_STR_TR; + CORR.CSTRATE1 = GLOBAL.MAJO_CODE_STRATE; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; + CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; + CORR.FLAG_RECTIF = GLOBAL.RECTIF; + CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; + CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.TARDIFEVT2 = GLOBAL.MAJO_TARDIF_EVT2; + si positif(GLOBAL.RETARD) et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) alors + CORR.CSTRATE99 = GLOBAL.CODE_PENA; + finsi + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.TAUX_2042 = get_taux_penalite(GLOBAL.CODE_PENA); + calculer cible detecte_penalites; + si NUM_STRATE = 1 alors + calculer cible unset_majo_str_tr : avec NUM_STRATE; + calculer cible affect_code; + finsi + calculer cible affect_str_tr; + si + NUM_STRATE = GLOBAL.NB_STRATES - 1 + et positif(GLOBAL.RETARD) + et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) + alors + CORR.FLAG_TRDEGTR = GLOBAL.CODE_PENA; + sinon + CORR.FLAG_TRDEGTR = 0; + finsi + calculer cible init_1731; + calculer cible prepare_1731_majo : avec PROCHAINE_STRATE; + calculer cible enchaine_calcul_corr; + si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + finsi + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + GLOBAL.MAJO_DERN_STR_TR = NUM_STRATE; + GLOBAL.MAJO_PREM_STR = 0; + GLOBAL.MAJO_NB_STR_TR = GLOBAL.MAJO_NB_STR_TR + 1; +finsi +si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; +finsi + +cible calcul_majo_normal_proc: +application: iliad; +variables_temporaires: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +NUM_STRATE = TMP_ARG3; +NB_RAPPELS_STRATE = TMP_ARG4; +PROCHAINE_STRATE = TMP_ARG5; +calculer cible calcul_majo_normal +: avec IS_PREMIER, INDICE_EVT, NUM_STRATE, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + +cible calcul_majo_tardif: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +variables_temporaires: STRATE_0; +si GLOBAL.D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible init_1731; + STRATE_0 = 0; + calculer cible prepare_1731_majo : avec STRATE_0; + calculer cible remplit_tgv_d2042; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + CORR.TAUX_2042 = TAUX_PENALITE; + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.FLAG_TRTARDIF = 1; + CORR.FLAG_1STRATE = 0; + CORR.FLAG_DERSTTR = 0; + calculer cible affect_code; + calculer cible affect_str_tr; + calculer cible detecte_penalites; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + calculer cible sauve_base_anterieure_corr; + CORR.FLAG_TRTARDIF = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; +finsi +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo_tardif_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +NUM_STRATE = TMP_ARG3; +TAUX_PENALITE = TMP_ARG4; +calculer cible calcul_majo_tardif +: avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; + +cible calcul_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: + NUM_STRATE, TAUX_PENALITE, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3, + NB_RAPPELS_P, NB_RAPPELS_STRATE, PROCHAINE_STRATE; +si non positif(GLOBAL.RETARD) alors + calculer cible clear_majo_str_tr; +finsi +calculer cible remplit_tgv_d2042_rect; +calculer cible enchaine_calcul_corr; +si present(CORR.IRBASE) alors + CORR.IRBASE2042_FIC = CORR.IRBASE; +finsi +si present(CORR.IRBASE_I) alors + CORR.IRBASE_IRECT = CORR.IRBASE_I; +finsi +si present(CORR.CSBASE_MAJO) alors + CORR.CSBASE2042_FIC = CORR.CSBASE_MAJO; +finsi +si present(CORR.RDBASE_MAJO) alors + CORR.RDBASE2042_FIC = CORR.RDBASE_MAJO; +finsi +si present(CORR.PSBASE_MAJO) alors + CORR.PSBASE2042_FIC = CORR.PSBASE_MAJO; +finsi +si present(CORR.TAXABASE_MAJO) alors + CORR.TAXABASE2042_FIC = CORR.TAXABASE_MAJO; +finsi +si present(CORR.TAXABASE_I) alors + CORR.TAXABASE_IRECT = CORR.TAXABASE_I; +finsi +si present(CORR.CSALBASE_MAJO) alors + CORR.CSALBASE2042_FIC = CORR.CSALBASE_MAJO; +finsi +si present(CORR.CDISBASE_MAJO) alors + CORR.CDISBASE2042_FIC = CORR.CDISBASE_MAJO; +finsi +si present(CORR.CAPBASE_MAJO) alors + CORR.CAPBASE2042_FIC = CORR.CAPBASE_MAJO; +finsi +si present(CORR.CAPBASE_I) alors + CORR.CAPBASE_IRECT = CORR.CAPBASE_I; +finsi +si present(CORR.HRBASE_MAJO) alors + CORR.HRBASE2042_FIC = CORR.HRBASE_MAJO; +finsi +si present(CORR.HRBASE_I) alors + CORR.HRBASE_IRECT = CORR.HRBASE_I; +finsi +si present(CORR.GAINBASE_MAJO) alors + CORR.GAINBASE2042_FIC = CORR.GAINBASE_MAJO; +finsi +si present(CORR.RSE1BASE_MAJO) alors + CORR.RSE1BASE2042_FIC = CORR.RSE1BASE_MAJO; +finsi +si present(CORR.RSE2BASE_MAJO) alors + CORR.RSE2BASE2042_FIC = CORR.RSE2BASE_MAJO; +finsi +si present(CORR.RSE3BASE_MAJO) alors + CORR.RSE3BASE2042_FIC = CORR.RSE3BASE_MAJO; +finsi +si present(CORR.RSE4BASE_MAJO) alors + CORR.RSE4BASE2042_FIC = CORR.RSE4BASE_MAJO; +finsi +si present(CORR.RSE5BASE_MAJO) alors + CORR.RSE5BASE2042_FIC = CORR.RSE5BASE_MAJO; +finsi +si present(CORR.RSE6BASE_MAJO) alors + CORR.RSE6BASE2042_FIC = CORR.RSE6BASE_MAJO; +finsi +si present(CORR.RSE8BASE_MAJO) alors + CORR.RSE8BASE2042_FIC = CORR.RSE8BASE_MAJO; +finsi +si present(CORR.CVNBASE_MAJO) alors + CORR.CVNBASE2042_FIC = CORR.CVNBASE_MAJO; +finsi +si present(CORR.GLOBASE_MAJO) alors + CORR.GLOBASE2042_FIC = CORR.GLOBASE_MAJO; +finsi +si present(CORR.PSOLBASE_MAJO) alors + CORR.PSOLBASE2042_FIC = CORR.PSOLBASE_MAJO; +finsi +si present(CORR.C820BASE_MAJO) alors + CORR.C820BASE2042_FIC = CORR.C820BASE_MAJO; +finsi +si present(CORR.IFI4BASE) alors + CORR.IFI4BASE2042_FIC = CORR.IFI4BASE; +finsi +si + positif(IS_PREMIER) + et (non positif(GLOBAL.DEFAUT)) + et positif(GLOBAL.RETARD) +alors + TAUX_PENALITE = get_taux_penalite(GLOBAL.CODE_PENA); + NUM_STRATE = GLOBAL.MAJO_NUM_STRATE; + calculer cible calcul_majo_tardif + : avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +sinon + ID_TRAIT = ID_TRAITE_MAJO_P; + MAJ0 = MAJ_RAPPEL_P; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NB_RAPPELS_P = GLOBAL.NB_RAPPELS_RES; + + NUM_STRATE = 0; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 1; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 0; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + NUM_STRATE = 1; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + si NB_RAPPELS_P != 0 alors + calculer cible calcul_cum_p; + finsi + calculer cible calcul_majo_P : avec NB_RAPPELS_P; + calculer cible clear_majo_str_tr; + iterer + : variable NUM_STR + : entre 0 ..(GLOBAL.NB_STRATES + 0 - 1) increment 1 + : dans ( + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + si NUM_STR = 0 alors + PROCHAINE_STRATE = champ_evenement(0, strate); + sinon + PROCHAINE_STRATE = indefini; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + (non present(PROCHAINE_STRATE)) + et champ_evenement(R, strate) = NUM_STR + alors + PROCHAINE_STRATE = champ_evenement(R, strate); + finsi + ) + si non present(PROCHAINE_STRATE) alors + PROCHAINE_STRATE = champ_evenement(nb_evenements() - 1, strate); + finsi + finsi + ) + si NUM_STR dans (20, 21, 22) alors + MAJ0 = MAJ_TL; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + sinon + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + finsi + NB_RAPPELS_STRATE = GLOBAL.NB_RAPPELS_RES; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_STRATE; + GLOBAL.MAJO_NUM_STRATE = NUM_STR; + calculer cible calcul_majo_normal + : avec IS_PREMIER, INDICE_EVT, NUM_STR, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + ) +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +calculer cible sauve_base_majo_corr; +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + +cible recherche_CR02: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: C0, R0, C1, R1, IM41, PREM_R02, NUM_EVT, NUM_RAP; +C0 = 0; +R0 = 0; +C1 = 0; +R1 = 0; +IM41 = 0; +PREM_R02 = 1; +NUM_EVT = 0; +NUM_RAP = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, penalite) = 2 + alors + si + champ_evenement(RR, sens) = SENS_C + et non positif(champ_evenement(RR, 2042_rect)) + alors + C0 = C0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et non positif(champ_evenement(RR, 2042_rect)) + alors + R0 = R0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_C + et positif(champ_evenement(RR, 2042_rect)) + alors + C1 = C1 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + alors + R1 = R1 + champ_evenement(RR, montant); + finsi + finsi + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + et positif(PREM_R02) + alors + PREM_R02 = 0; + NUM_EVT = champ_evenement(RR, numero); + NUM_RAP = champ_evenement(RR, rappel); + finsi + IM41 = ( + positif(IM41) + ou ( + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et ( + champ_evenement(RR, penalite) != 2 + ou ( + champ_evenement(RR, penalite) = 2 + et non positif(champ_evenement(RR, 2042_rect)) + ) + ) + et champ_evenement(RR, sens) dans (SENS_C, SENS_M) + et (non positif(PREM_R02)) + et ( + champ_evenement(RR, numero) > NUM_EVT + ou ( + champ_evenement(RR, numero) = NUM_EVT + et champ_evenement(RR, rappel) > NUM_RAP + ) + ) + ) + ); +) +si positif(IM41) alors + RESULTAT = 3; +sinon_si positif(champ_evenement(R, 2042_rect)) et C1 > R1 alors + RESULTAT = 2; +sinon_si (non positif(champ_evenement(R, 2042_rect))) et C0 > R0 alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible recherche_CR02_proc: +application: iliad; +variables_temporaires: RESULTAT, R; +R = TMP_ARG1; +calculer cible recherche_CR02 : avec RESULTAT, R; +TMP_RES = RESULTAT; + +cible is_code_situation_famille: +application: iliad; +arguments: RES_SF, VAR; +si meme_variable(VAR, 0AM) alors + RES_SF = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RES_SF = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RES_SF = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RES_SF = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.V_MILLESIME alors + RES_SF = SF_VEUVAGE_TRUE; + sinon + RES_SF = SF_VEUVAGE_FALSE; + finsi +sinon + RES_SF = SF_INVALIDE; +finsi + +cible is_code_situation_famille_r: +application: iliad; +variables_temporaires: SF, R; +R = TMP_ARG1; +calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); +TMP_RES = SF; + +cible traite_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: RAP_SF, RAP_DA, RAP_DB, PENALITE, SF, STR; +RAP_SF = indefini; +RAP_DA = indefini; +RAP_DB = indefini; +PENALITE = -1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); + si SF != SF_INVALIDE alors + si + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) + ) + alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si + GLOBAL.SF_INITIALE dans (SF_MARIAGE, SF_VEUVAGE_TRUE, SF_PACSE) + alors + RAP_SF = R; + finsi + sinon + GLOBAL.SF_COURANTE = SF; + PENALITE = champ_evenement(R, penalite); + finsi + sinon_si positif(IS_PREMIER) alors + GLOBAL.SF_INITIALE = SF; + finsi + finsi + si meme_variable(champ_evenement(R, code), 0DA) alors + RAP_DA = R; + finsi + si meme_variable(champ_evenement(R, code), 0DB) alors + RAP_DB = R; + finsi + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +si PENALITE >= 0 alors + si present(RAP_SF) alors + champ_evenement(RAP_SF, penalite) = PENALITE; + finsi + si present(RAP_DA) alors + champ_evenement(RAP_DA, penalite) = PENALITE; + finsi + si present(RAP_DB) alors + champ_evenement(RAP_DB, penalite) = PENALITE; + finsi +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) <= INDICE_EVT alors + calculer cible get_strate : avec STR, R; + champ_evenement(R, strate) = STR; + sinon + champ_evenement(R, strate) = -1; + finsi +) +si positif(GLOBAL.DEFAUT) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042_CTXT + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + finsi + ) +sinon_si positif(GLOBAL.RETARD) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace MAJO_D2042_REF_ABAT + : dans ( + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + ) +sinon + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) +finsi + +cible traite_majo_proc: +application: iliad; +variables_temporaires: IS_PREMIER, INDICE_EVT; +IS_PREMIER = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + +cible controle: +application: iliad; +arguments: QUELLE_SP, INDICE_EVT; +variables_temporaires: NATURE, ELEM_2042, MONTANT_2042, NAT_RECH, COMMENCE_PAR_5; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si QUELLE_SP = 0 alors + ELEM_2042 = D2042.champ_evenement(R, code); + sinon + ELEM_2042 = INR_D2042.champ_evenement(R, code); + finsi + MONTANT_2042 = ELEM_2042 + 0; + si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) != 0 alors + calculer cible recherche_cpena : avec NAT_RECH, R; + sinon + NAT_RECH = 0; + finsi + si NAT_RECH = 5 alors + nettoie_erreurs_finalisees; + leve_erreur A72207; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, penalite) = 32 + et non meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A045; + calculer cible signaler_erreur_ano; + finsi + si + non (champ_evenement(R, penalite) dans (0, 32)) + et meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A044; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) != SENS_M + et non (champ_evenement(R, penalite) dans (0, 7, 8, 10, 11, 17, 18, 99)) + alors + si meme_variable(champ_evenement(R, code), 8VW) alors + nettoie_erreurs_finalisees; + leve_erreur A042; + calculer cible signaler_erreur_ano; + sinon_si meme_variable(champ_evenement(R, code), 8VV) alors + nettoie_erreurs_finalisees; + leve_erreur A041; + calculer cible signaler_erreur_ano; + finsi + finsi + si + non (champ_evenement(R, penalite) dans (30, 35, 99)) + et meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A046; + calculer cible signaler_erreur_ano; + finsi + calculer cible alias_commence_par_5 : avec COMMENCE_PAR_5, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 31 + et ( + meme_variable(champ_evenement(R, code), 5QM) + ou meme_variable(champ_evenement(R, code), 5RM) + ou non positif(COMMENCE_PAR_5) + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A048; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) = SENS_M + et champ_evenement(R, penalite) != 0 + et non meme_variable(champ_evenement(R, code), REGCO) + alors + nettoie_erreurs_finalisees; + leve_erreur A970; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XT > GLOBAL.NUM_EVT_9XU alors + nettoie_erreurs_finalisees; + leve_erreur A96903; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XU > GLOBAL.NUM_EVT_9XT alors + nettoie_erreurs_finalisees; + leve_erreur A96904; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XT = 0 et GLOBAL.MONTANT_9XU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96803; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XU = 0 et GLOBAL.MONTANT_9XT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96804; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YT > GLOBAL.NUM_EVT_9YU alors + nettoie_erreurs_finalisees; + leve_erreur A96901; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YU > GLOBAL.NUM_EVT_9YT alors + nettoie_erreurs_finalisees; + leve_erreur A96902; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YT = 0 et GLOBAL.MONTANT_9YU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96801; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YU = 0 et GLOBAL.MONTANT_9YT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96802; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 0 alors + nettoie_erreurs_finalisees; + leve_erreur A971; + calculer cible signaler_erreur_ano; + finsi + si present(ELEM_2042) alors + si + type(champ_evenement(R, code), BOOLEEN) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et champ_evenement(R, numero) = champ_evenement(0, numero) + ) + alors + si NATURE = N_REVENU alors + si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + sinon_si NATURE = N_CHARGE alors + si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + finsi + finsi + finsi + si + NAT_RECH dans (0, 6) + et NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + et NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_P et non present(ELEM_2042) alors + nettoie_erreurs_finalisees; + leve_erreur A721; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + alors + si + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, montant) > MONTANT_2042 + alors + si champ_evenement(R, penalite) = 99 alors + nettoie_erreurs_finalisees; + leve_erreur A72204; + calculer cible signaler_erreur_ano; + sinon + nettoie_erreurs_finalisees; + leve_erreur A72201; + calculer cible signaler_erreur_ano; + finsi + finsi + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_M + et ( + non present(ELEM_2042) + ou champ_evenement(R, montant) > MONTANT_2042 + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A72202; + calculer cible signaler_erreur_ano; + finsi + CORR.V_FLAG8OT = positif(GLOBAL.COD8OT + 0); + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + et present(ELEM_2042) + et champ_evenement(R, montant) > MONTANT_2042 + alors + nettoie_erreurs_finalisees; + leve_erreur A72203; + calculer cible signaler_erreur_ano; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_P) + et champ_evenement(R, penalite) dans (9, 12) + et vers_annee(champ_evenement(R, date)) >= 2006 + alors + nettoie_erreurs_finalisees; + leve_erreur A724; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et champ_evenement(R, numero) != champ_evenement(0, numero) + et champ_evenement(R, penalite) = 22 + et non positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A725; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et non ( + # codes_sf + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + et champ_evenement(R, penalite) != 99 + et positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A726; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, numero) = champ_evenement(nb_evenements() - 1, numero) + et champ_evenement(R, sens) dans (SENS_R, SENS_C, SENS_M) + alors + calculer cible recherche_CR02 : avec NAT_RECH, R; + si NAT_RECH = 2 alors + nettoie_erreurs_finalisees; + leve_erreur A72301; + calculer cible signaler_erreur_ano; + sinon_si NAT_RECH = 3 et non positif(GLOBAL.ISF_PRIM) alors + leve_erreur IM41; + finalise_erreurs; + finsi + finsi + finsi +) + +cible controle_proc: +application: iliad; +variables_temporaires: QUELLE_SP, INDICE_EVT; +QUELLE_SP = TMP_ARG1; +INDICE_EVT = TMP_ARG2; +calculer cible controle : avec QUELLE_SP, INDICE_EVT; + +cible make_2042_of_tgv: +application: iliad; +arguments: VAR; +variables_temporaires: SF; +si present(GLOBAL.VAR) alors + calculer cible is_code_situation_famille : avec SF, VAR; + si SF != SF_INVALIDE alors + GLOBAL.SF_INITIALE = SF; + finsi + si meme_variable(VAR, RJLJ) et GLOBAL.VAR != 0 alors + GLOBAL.CORR_RJLJ = 1; + finsi + D2042.VAR = GLOBAL.VAR; + GLOBAL.D2042_NB = GLOBAL.D2042_NB + 1; +finsi + +cible is_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +variables_temporaires: EST_ISF; +calculer cible est_code_isf : avec EST_ISF, VAR; +si positif(EST_ISF) alors + RESULTAT = ( + PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99) + ); +sinon + RESULTAT = ( + PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99) + ); +finsi + + +cible prepare_reference: +application: iliad; +variables_temporaires: + MAKE_2042, MONTANT, NATURE, LEVE_A989, EST_ISF, PENA, EST_RAPPEL_1728; +si non (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9XT)) alors + iterer + : variable VAR + : categorie saisie famille + : avec present(VAR) + : espace GLOBAL + : dans ( + SF_PRIMITIF = 1; + ) +finsi +GLOBAL.D2042_NB = 0; +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = ( + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + ou dans_domaine(VAR, saisie variation) + ); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) + : espace D2042 + : dans ( + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + ) +sinon + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + D2042_CTXT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = (dans_domaine(VAR, saisie revenu)); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + si present(VAR) alors + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + D2042_CTXT.VAR = VAR; + MAJO_D2042_REF_ABAT.VAR = VAR; + sinon + MAJO_D2042_REF_ABAT.VAR = indefini; + finsi + ) + si positif(GLOBAL.PRESENT_9YT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + si non (GLOBAL.MONTANT_9YT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9YT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + si non (GLOBAL.MONTANT_9XT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9XT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, id_evt) = 0 alors + si present(D2042.champ_evenement(R, code)) alors + MONTANT = D2042.champ_evenement(R, code) + champ_evenement(R, montant); + si + type(champ_evenement(R, code), BOOLEEN) + et non (MONTANT dans (0, 1)) + alors + MONTANT = D2042.champ_evenement(R, code); + finsi + sinon + MONTANT = champ_evenement(R, montant); + finsi + D2042.champ_evenement(R, code) = MONTANT; + D2042_RECT.champ_evenement(R, code) = MONTANT; + si positif(GLOBAL.RETARD) et champ_evenement(R, penalite) = 7 alors + D2042_ABAT.champ_evenement(R, code) = MONTANT; + MAJO_D2042_REF_ABAT.champ_evenement(R, code) = MONTANT; + finsi + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, penalite) = 0; + finsi + finsi + ) +finsi +LEVE_A989 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si LEVE_A989 = 0 alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + PENA = champ_evenement(R, penalite); + calculer cible is_rappel_1728 + : avec EST_RAPPEL_1728, PENA, champ_evenement(R, code); + si positif(EST_ISF) et positif(EST_RAPPEL_1728) alors + si + (positif(GLOBAL.ISF_PRIM) et GLOBAL.CODE_PENA_ISF = 1) + ou ((non positif(GLOBAL.ISF_PRIM)) et GLOBAL.CODE_PENA_ISF = 0) + alors + GLOBAL.CODE_PENA_ISF = champ_evenement(R, penalite); + finsi + si + non ( + champ_evenement(R, penalite) dans (1, 2, 3, 22, 99, GLOBAL.CODE_PENA_ISF) + ) + alors + LEVE_A989 = 1; + finsi + finsi + finsi +) +si positif(LEVE_A989) alors + nettoie_erreurs_finalisees; + leve_erreur A989; + calculer cible signaler_erreur_ano; +finsi + +cible calcul_aux: +application: iliad; +variables_temporaires: + HUIT, PENA_0DA, EST_TAX_INIT, VERIF_CODE, + QUELLE_SP, INDICE_EVT_CTRL, ANO_994_1, ANO_994_2, + IS_PREMIER, IS_DERNIER, EXISTE_SENS_RC; +GLOBAL.SAUVE_INR_R99 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si GLOBAL.SAUVE_INR_R99 = 0 alors + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 99 + alors + GLOBAL.SAUVE_INR_R99 = 1; + finsi + finsi +) +HUIT = 0; +PENA_0DA = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si meme_variable(champ_evenement(R, code), 9ZA) alors + GLOBAL.CODE_9ZA = (champ_evenement(R, montant) = 1); + finsi + HUIT = (positif(HUIT) ou champ_evenement(R, penalite) = 8); + si champ_evenement(R, penalite) = 18 alors + champ_evenement(R, penalite) = 7; + sinon_si champ_evenement(R, penalite) = 34 alors + si non positif(HUIT) alors + CORR.V_FLAGR34 = 1; + finsi + champ_evenement(R, penalite) = 8; + sinon_si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 99; + sinon_si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 0; + sinon_si champ_evenement(R, penalite) = 24 alors + CORR.V_FLAGANO726 = 1; + CORR.V_FLAGR24 = 1; + sinon_si champ_evenement(R, penalite) = 22 alors + CORR.V_FLAGR22 = 1; + finsi + si + meme_variable(champ_evenement(R, code), 0DA) + et champ_evenement(R, sens) = SENS_R + et (3 <= champ_evenement(R, penalite) et champ_evenement(R, penalite) <= 98) + alors + PENA_0DA = champ_evenement(R, penalite); + finsi + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + champ_evenement(R, sens) = SENS_M + et non ( + meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + alors + CORR.V_FLAGMENC = 1; + GLOBAL.FLAGMENC = 1; + champ_evenement(R, sens) = SENS_C; + champ_evenement(R, penalite) = 0; + sinon_si + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = PENA_0DA + et non (champ_evenement(R, penalite) dans (2, 22)) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_CODE, R; + si positif(VERIF_CODE) alors + champ_evenement(R, penalite) = 0; + finsi + finsi +) +calculer cible controle_defaut_retard_2042; +GLOBAL.PREM_8_11 = 1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si positif(GLOBAL.PREM_8_11) alors + si + non ( + champ_evenement(R, id_evt) != 0 + ou champ_evenement(R, penalite) dans (8, 11) + ) + alors + GLOBAL.PREM_8_11 = 0; + finsi + finsi +) +GLOBAL.PREM_8_11 = ( + (GLOBAL.PREM_8_11 ou GLOBAL.MONTANT_9XT dans (8, 11)) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) +); +CORR.PREM8_11 = GLOBAL.PREM_8_11; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ou positif(EST_TAX_INIT) + alors + GLOBAL.RECTIF = 0; + finsi + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) dans (1, 99) + alors + GLOBAL.RECTIF_MAJO = 1; + finsi + si + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et ( + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ) + alors + champ_evenement(R, date) = champ_evenement(0, date); + finsi + si + champ_evenement(R, penalite) = 30 + et non meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A047; + calculer cible signaler_erreur_ano; + finsi +) +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (vers_annee(champ_evenement(R1, date)) < vers_annee(champ_evenement(R2, date))) alors (1) + sinon (si (vers_annee(champ_evenement(R1, date)) > vers_annee(champ_evenement(R2, date))) alors (0) + sinon (si (vers_mois(champ_evenement(R1, date)) < vers_mois(champ_evenement(R2, date))) alors (1) + sinon (si (vers_mois(champ_evenement(R1, date)) > vers_mois(champ_evenement(R2, date))) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + calculer cible prepare_reference; + calculer cible prepare_tl; + calculer cible prepare_majo; + calculer cible prepare_inr; + QUELLE_SP = 0; + INDICE_EVT_CTRL = 0; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible denature_rappels; + ANO_994_1 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_1) alors + si + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + alors + ANO_994_1 = 1; + finsi + finsi + ) + ANO_994_2 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_2) alors + si + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22) + alors + ANO_994_2 = 1; + finsi + finsi + ) + GLOBAL.PENA_994 = (positif(ANO_994_1) et positif(ANO_994_2)); + CORR.PENA994 = GLOBAL.PENA_994; + CORR.V_FLAGMENC = 0; + iterer + : variable INDICE_EVT + : entre 0..GLOBAL.MAX_ID_EVT increment 1 + : dans ( + IS_PREMIER = (INDICE_EVT = 0); + IS_DERNIER = (INDICE_EVT = GLOBAL.MAX_ID_EVT); + CORR.V_FLAGR22 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR22) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 22 + alors + CORR.V_FLAGR22 = 1; + finsi + finsi + ) + CORR.V_FLAGR24 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR24) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 24 + alors + CORR.V_FLAGR24 = 1; + finsi + finsi + ) + calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_inr : avec INDICE_EVT; + calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + CORR.FLAGPREM = IS_PREMIER; + GLOBAL.FLAGPREM = IS_PREMIER; + si positif(IS_DERNIER) alors + CORR.FLAGDERNIE = IS_DERNIER; + GLOBAL.FLAGDERNIE = IS_DERNIER; + finsi + calculer cible init_1731; + EXISTE_SENS_RC = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(EXISTE_SENS_RC) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + EXISTE_SENS_RC = 1; + finsi + finsi + ) + si positif(EXISTE_SENS_RC) alors + CORR.ART1731BIS = 0; + GLOBAL.ART1731BIS = 0; + finsi + iterer + : variable VAR + : categorie calculee + : espace CORR + : dans ( + VAR = indefini; + ) + si positif(GLOBAL.FLAGMENC) alors + CORR.FLAGMENC = 1; + finsi + calculer cible calcul_tl : avec IS_PREMIER; + calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + si + positif(IS_DERNIER) + ou ( + positif(IS_PREMIER) + et non positif(GLOBAL.DEFAUT) + et positif(GLOBAL.RETARD) + ) + alors + calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + finsi + si + positif(IS_DERNIER) + et positif(GLOBAL.PRESENT_8VV) + et positif(GLOBAL.PRESENT_8VW) + et CORR.RE168 + 0 > 0 + et CORR.TAX1649 + 0 > 0 + alors + nettoie_erreurs_finalisees; + leve_erreur A043; + calculer cible signaler_erreur_ano; + finsi + si non positif(IS_DERNIER) alors + QUELLE_SP = 1; + INDICE_EVT_CTRL = INDICE_EVT + 1; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible sauve_base_anterieure_cor_corr; + si positif(IS_PREMIER) alors + calculer cible sauve_base_premier_corr; + finsi + finsi + CORR.V_FLAGR22 = 0; + CORR.V_FLAGR24 = 0; + ) +) + +cible nb_transf_2042_rappels: +application: iliad; +variables_temporaires: EST_ISF; +iterer +: variable VAR +: categorie saisie revenu, saisie revenu corrective, saisie variation, saisie penalite, calculee * +: avec present(VAR) +: espace CORR +: dans ( + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + finsi +) + +cible prepare_rappels: +application: iliad; +variables_temporaires: FIN, MOIS, ANNEE; +GLOBAL.DATEINR = 0; +CORR.DATEINR = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YA) + et champ_evenement(R, numero) != champ_evenement(nb_evenements() - 1, numero) + alors + nettoie_erreurs_finalisees; + leve_erreur A99302; + calculer cible signaler_erreur_ano; + finsi + si + type(champ_evenement(R, code), BOOLEEN) + et non (champ_evenement(R, montant) dans (0, 1)) + alors + nettoie_erreurs_finalisees; + leve_erreur A910; + calculer cible signaler_erreur_ano; + finsi +) +calculer cible set_rappel_ifi_prim; +FIN = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(FIN) + et meme_variable(champ_evenement(R, code), REGCO) + alors + calculer cible transfo_pena_regco : avec R; + si present(GLOBAL.REGCO) alors + si GLOBAL.REGCO - champ_evenement(R, montant) < 0 alors + champ_evenement(R, sens) = SENS_R; + champ_evenement(R, montant) = champ_evenement(R, montant) - GLOBAL.REGCO; + sinon + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, montant) = GLOBAL.REGCO - champ_evenement(R, montant); + finsi + FIN = 1; + finsi + finsi +) +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 8VV) alors + GLOBAL.PRESENT_8VV = 1; + sinon_si meme_variable(champ_evenement(R, code), 8VW) alors + GLOBAL.PRESENT_8VW = 1; + sinon_si meme_variable(champ_evenement(R, code), 9YT) alors + GLOBAL.PRESENT_9YT = 1; + si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9YT = 7; + sinon + GLOBAL.MONTANT_9YT = champ_evenement(R, montant); + finsi + GLOBAL.PENALITE_9YT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YT = champ_evenement(R, numero); + CORR.CMAJ2 = champ_evenement(R, montant); + GLOBAL.CMAJ2 = champ_evenement(R, montant); + si GLOBAL.MONTANT_9YT != 0 alors + GLOBAL.SENS_9YT = champ_evenement(R, sens); + GLOBAL.IND_20_9YT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9YT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9YU) alors + GLOBAL.PRESENT_9YU = 1; + GLOBAL.MONTANT_9YU = champ_evenement(R, montant); + GLOBAL.PENALITE_9YU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YU = champ_evenement(R, numero); + GLOBAL.SENS_9YU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + CORR.DATEINR = ANNEE * 10000 + MOIS * 100 + 1; + GLOBAL.DATEINR = CORR.DATEINR; + CORR.MOISAN2 = champ_evenement(R, montant); + GLOBAL.MOISAN2 = champ_evenement(R, montant); + GLOBAL.DATE_9YU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9YU)) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 9XT) alors + GLOBAL.PRESENT_9XT = 1; + si champ_evenement(R, montant) = 34 alors + GLOBAL.MONTANT_9XT = 8; + sinon_si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9XT = 7; + sinon + GLOBAL.MONTANT_9XT = champ_evenement(R, montant); + finsi + si champ_evenement(R, montant) = 34 alors + CORR.V_FLAGR34 = 1; + finsi + GLOBAL.PENALITE_9XT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XT = champ_evenement(R, numero); + si GLOBAL.MONTANT_9XT != 0 alors + GLOBAL.SENS_9XT = champ_evenement(R, sens); + GLOBAL.IND_20_9XT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9XT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9XU) alors + GLOBAL.PRESENT_9XU = 1; + GLOBAL.MONTANT_9XU = champ_evenement(R, montant); + GLOBAL.PENALITE_9XU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XU = champ_evenement(R, numero); + GLOBAL.SENS_9XU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + GLOBAL.DATE_9XU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9XT) ou positif(GLOBAL.PRESENT_9XU)) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + alors + champ_evenement(R, numero) = -1; + sinon + si + positif(GLOBAL.PRESENT_9YT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9YT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + si + positif(GLOBAL.PRESENT_9XT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9XT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + finsi +) +NB_RAPPELS = nb_evenements(); +NB_NOUVEAUX_RAPPELS = 0; +si + positif(GLOBAL.PRESENT_9YT) + et positif(GLOBAL.PRESENT_9YU) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi +si + positif(GLOBAL.PRESENT_9XT) + et positif(GLOBAL.PRESENT_9XU) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi + +cible set_id_evt: +application: iliad; +variables_temporaires: ID_EVT, NUM_EVT, NUM; +ID_EVT = 0; +GLOBAL.MAX_ID_EVT = 0; +NUM_EVT = champ_evenement(0, numero); +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + NUM = champ_evenement(R, numero); + si NUM != NUM_EVT alors + ID_EVT = ID_EVT + 1; + GLOBAL.MAX_ID_EVT = ID_EVT; + NUM_EVT = NUM; + finsi + champ_evenement(R, id_evt) = ID_EVT; +) + +cible test_9YT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9YT dans (0, 7, 8, 10, 11, 17, 18)) + et positif(CORR.APPLI_ILIAD + 0) + et ( + positif(CORR.CALCULIR + 0) + ou ( + (CORR.NOTRAIT + 0) dans (16, 23, 26, 33, 36, 43, 46, 53, 56) + ) + ) +); + +cible test_9XT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9XT dans (0, 7, 8, 10, 11, 17, 18, 34)) + et positif(CORR.APPLI_ILIAD + 0) + et (positif(CORR.CALCULIR + 0) ou CORR.NOTRAIT + 0 >= 16) +); + +cible test_mois_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = (CORR.NOTRAIT + 0 >= 16 et vers_mois(GLOBAL.DATE_9XU) <= 12); + +cible test_an_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + vers_annee(GLOBAL.DATE_9XU) = 0 + ou ( + vers_annee(GLOBAL.DATE_9XU) > GLOBAL.V_MILLESIME + et vers_annee(GLOBAL.DATE_9XU) < GLOBAL.V_MILLESIME + 7 + ) +); + +cible transf_2042_rappels: +application: iliad; +variables_temporaires: NUM_RAP, EST_ISF; +NUM_RAP = 0; +iterer +: variable VAR +: categorie * +: avec present(VAR) +: espace CORR +: dans ( + si dans_domaine(VAR, saisie famille) alors + GLOBAL.SF_PRIMITIF = 1; + sinon_si dans_domaine(VAR, saisie contexte) alors + GLOBAL.VAR = VAR; + sinon + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.VAR = indefini; + GLOBAL.ISF_PRIM = 0; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9XT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9XU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9XT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9XT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.VAR = indefini; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9YT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9YU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9YT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9YT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + finsi + finsi +) + +cible prepare_rappels_puis_calcul: +application: iliad; +variables_temporaires: TEST_9YT, TEST_9XT, TEST_MOIS_9XU, TEST_AN_9XU; +arranger_evenements +: ajouter NB_NOUVEAUX_RAPPELS +: dans ( + iterer + : variable R + : entre NB_RAPPELS..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, numero) = -1; + ) + NOUVEAU_RAPPEL = NB_RAPPELS; + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + si GLOBAL.MONTANT_9YT != 0 et GLOBAL.MONTANT_9YU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + si GLOBAL.MONTANT_9XT != 0 et GLOBAL.MONTANT_9XU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + + arranger_evenements + : trier R1, R2 : avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi + : filtrer R : avec + champ_evenement(R, numero) >= 0 + : dans ( + calculer cible set_id_evt; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, strate) = -1; + ) + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + calculer cible test_9YT : avec TEST_9YT; + si non positif(TEST_9YT) alors + nettoie_erreurs_finalisees; + leve_erreur A96102; + calculer cible signaler_erreur_ano; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + calculer cible test_9XT : avec TEST_9XT; + si non positif(TEST_9XT) alors + nettoie_erreurs_finalisees; + leve_erreur A96103; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_mois_9XU : avec TEST_MOIS_9XU; + si non positif(TEST_MOIS_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96303; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_an_9XU : avec TEST_AN_9XU; + si non positif(TEST_AN_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96304; + calculer cible signaler_erreur_ano; + finsi + finsi + calculer cible calcul_aux; + ) +) + +cible range_rappel: +application: iliad; +arguments: R; +calculer cible reset_codes_rappel; +CORR.PEN_RAPPEL = champ_evenement(R, penalite); +calculer cible verif_cohe_horizontale_corr; +calculer cible reset_codes_rappel; +si nb_anomalies() + nb_discordances() + nb_informatives() > 0 alors + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +finsi + +cible calcul_avec_rappels: +application: iliad; +variables_temporaires: TROUVE_0AZ; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible range_rappel : avec R; +) +TROUVE_0AZ = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(TROUVE_0AZ) + et meme_variable(champ_evenement(R, code), 0AZ) + alors + GLOBAL.ANNEE_DECES_CONJOINT = champ_evenement(R, montant); + TROUVE_0AZ = 1; + finsi +) +calculer cible prepare_rappels; +calculer cible prepare_rappels_puis_calcul; + +cible calcul: +application: iliad; +calculer cible init_variables; +iterer +: variable VAR +: categorie * +: espace GLOBAL +: dans ( + CORR.VAR = VAR; +) +CORR.IND_TRAIT = 5; # correctif +si nb_evenements() = 0 alors + arranger_evenements + : ajouter 1 + : dans ( + champ_evenement(0, rappel) = 1; + champ_evenement(0, numero) = 1; + champ_evenement(0, code) reference V_MILLESIME; + champ_evenement(0, sens) = SENS_R; + champ_evenement(0, montant) = 0; + champ_evenement(0, penalite) = 1; + champ_evenement(0, base_tl) = 0; + champ_evenement(0, date) = vers_date(1, GLOBAL.V_MILLESIME + 1); + champ_evenement(0, 2042_rect) = 0; + champ_evenement(0, anc_penalite) = 0; + champ_evenement(0, id_evt) = -1; + champ_evenement(0, strate) = -1; + calculer cible calcul_avec_rappels; + ) +sinon + calculer cible calcul_avec_rappels; +finsi +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) + +#{ tester l'existence des attributs dans les fonctions attribut(...), + meme_variable(...), dans_domaine(...) }# +#{ contrôler les espaces dans l'usage des références }# +#{ dans_espace(...), dans_tableau(...) }# +#{ tester si la variable d'itération existe déjà ailleurs }# +#{ compléter exec_verif avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ cas des tableaux statiques avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ déplacer les expansions dans mir.ml }# + diff --git a/m_ext/2024/main.m b/m_ext/2024/main.m new file mode 100644 index 000000000..f75dbb6f3 --- /dev/null +++ b/m_ext/2024/main.m @@ -0,0 +1,25 @@ +# primitif iterpréteur + +cible enchaineur_primitif: +application: iliad; +GLOBAL.IND_TRAIT = 4; # primitif +GLOBAL.ANCSDED = ANREV + 1; +calculer cible enchaine_verification_prim; +si nb_anomalies() = 0 alors + calculer cible calcul_primitif_isf_prim; + calculer cible verif_calcul_primitive_isf_prim; + calculer cible enchaine_calcul_prim; +finsi +# finalise_erreurs; +# exporte_erreurs; + +cible enchaineur_correctif: +application: iliad; +calculer cible calcul; + +cible enchainement_primitif_interpreteur: +application: iliad; +V_IND_TRAIT = 4; # primitif +calculer cible enchainement_primitif; +exporte_erreurs; + diff --git a/m_ext/2025/cibles.m b/m_ext/2025/cibles.m new file mode 100644 index 000000000..bb13752dc --- /dev/null +++ b/m_ext/2025/cibles.m @@ -0,0 +1,1217 @@ +# compir + +espace_variables CORR : categorie saisie, calculee, base; +espace_variables PRIM_COPIE : categorie saisie, calculee, base; +espace_variables D2042 : categorie saisie; +espace_variables D2042_ABAT : categorie saisie; +espace_variables D2042_RECT : categorie saisie; +espace_variables D2042_CTXT : categorie saisie; +espace_variables TL_D2042 : categorie saisie; +espace_variables TL_D2042_INIT : categorie saisie; +espace_variables TL_D2042_RECT : categorie saisie; +espace_variables TL_D2042_ABAT : categorie saisie; +espace_variables TL_D2042_ABAT_INIT : categorie saisie; +espace_variables TL_D2042_ABAT_RECT : categorie saisie; +espace_variables INR_D2042 : categorie saisie; +espace_variables INR_D2042_PROV_ANT : categorie saisie; +espace_variables INR_D2042_REFR99R_ANT : categorie saisie; +espace_variables INR_D2042_R9901_ANT : categorie saisie; +espace_variables MAJO_D2042_STRATE : categorie saisie; +espace_variables MAJO_D2042_REF_ABAT : categorie saisie; +espace_variables MAJO_D2042_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_P : categorie saisie; +espace_variables MAJO_D2042_ABAT_STRATE : categorie saisie; + +NB_STRATES : calculee primrest = 0 : "" ; +MODE_CORR : saisie environnement toto = 0 alias EST_CORR : "" ; + +# Données globales +PRESENT_8VV : calculee primrest = 0 : "" ; +PRESENT_8VW : calculee primrest = 0 : "" ; +PRESENT_9YT : calculee primrest = 0 : "" ; +MONTANT_9YT : calculee primrest = 0 : "" ; +PENALITE_9YT : calculee primrest = 0 : "" ; +SENS_9YT : calculee primrest = 0 : "" ; +NUM_EVT_9YT : calculee primrest = 0 : "" ; +IND_20_9YT : calculee primrest = 0 : "" ; +BASE_TL_9YT : calculee primrest = 0 : "" ; +PRESENT_9YU : calculee primrest = 0 : "" ; +MONTANT_9YU : calculee primrest = 0 : "" ; +PENALITE_9YU : calculee primrest = 0 : "" ; +SENS_9YU : calculee primrest = 0 : "" ; +NUM_EVT_9YU : calculee primrest = 0 : "" ; +DATE_9YU : calculee primrest = 0 : "" ; +PRESENT_9XT : calculee primrest = 0 : "" ; +MONTANT_9XT : calculee primrest = 0 : "" ; +PENALITE_9XT : calculee primrest = 0 : "" ; +SENS_9XT : calculee primrest = 0 : "" ; +NUM_EVT_9XT : calculee primrest = 0 : "" ; +IND_20_9XT : calculee primrest = 0 : "" ; +BASE_TL_9XT : calculee primrest = 0 : "" ; +PRESENT_9XU : calculee primrest = 0 : "" ; +MONTANT_9XU : calculee primrest = 0 : "" ; +PENALITE_9XU : calculee primrest = 0 : "" ; +SENS_9XU : calculee primrest = 0 : "" ; +NUM_EVT_9XU : calculee primrest = 0 : "" ; +DATE_9XU : calculee primrest = 0 : "" ; +PRESENT_REGCO : calculee primrest = 0 : "" ; +PENALITE_REGCO : calculee primrest = 0 : "" ; +NUM_EVT_REGCO : calculee primrest = 0 : "" ; +NUM_RAP_REGCO : calculee primrest = 0 : "" ; +IND_20_REGCO : calculee primrest = 0 : "" ; +PREMIER_EVT : calculee primrest = 0 : "" ; +CODE_9ZA : calculee primrest = 0 : "" ; +SAUVE_INR_R99 : calculee primrest = 0 : "" ; +ANNEE_DECES_CONJOINT : calculee primrest = 0 : "" ; +NB_RAPPELS_RES : calculee primrest = 0 : "" ; + +# sommes inr 2 +INR_SOMMEBAND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBA_2 : calculee primrest = 0 : "" ; +INR_SOMMEBICND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBIC_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNCND_2 : calculee primrest = 0 : "" ; +INR_SOMMEBNC_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBAL_2 : calculee primrest = 0 : "" ; +INR_SOMMEGLOBND_2 : calculee primrest = 0 : "" ; +INR_SOMMELOC_2 : calculee primrest = 0 : "" ; +INR_SOMMEMOND_2 : calculee primrest = 0 : "" ; +INR_SOMMERCM_2 : calculee primrest = 0 : "" ; +INR_SOMMERF_2 : calculee primrest = 0 : "" ; +INR_SOMMERI_2 : calculee primrest = 0 : "" ; + +# Données de Reference +D2042_NB : calculee primrest = 0 : "" ; +DEFAUT : calculee primrest = 0 : "" ; +DEFAUT10 : calculee primrest = 0 : "" ; +DEFAUT11 : calculee primrest = 0 : "" ; +DEFAUT1011 : calculee primrest = 0 : "" ; +RETARD : calculee primrest = 0 : "" ; +RETARD07 : calculee primrest = 0 : "" ; +RETARD08 : calculee primrest = 0 : "" ; +RETARD0718 : calculee primrest = 0 : "" ; +RETARD101718 : calculee primrest = 0 : "" ; +RETARD22 : calculee primrest = 0 : "" ; +RETARD99 : calculee primrest = 0 : "" ; +RECTIF : calculee primrest = 0 : "" ; +RECTIF_MAJO : calculee primrest = 0 : "" ; +MENTION_EXP : calculee primrest = 0 : "" ; +CORR_RJLJ : calculee primrest = 0 : "" ; +CODE_PENA : calculee primrest = 0 : "" ; +CODE_PENA_ISF : calculee primrest = 0 : "" ; +DATE : calculee primrest = 0 : "" ; +SF_INITIALE : calculee primrest = 0 : "" ; +SF_COURANTE : calculee primrest = 0 : "" ; +SF_PRIMITIF : calculee primrest = 0 : "" ; +R_TARDIF : calculee primrest = 0 : "" ; +LIMELIGHT : calculee primrest = 0 : "" ; +ISF_PRIM : calculee primrest = 0 : "" ; +PRESENT_R10 : calculee primrest = 0 : "" ; +PRESENT_R30 : calculee primrest = 0 : "" ; +PRESENT_R32 : calculee primrest = 0 : "" ; +PREM_8_11 : calculee primrest = 0 : "" ; +PENA_994 : calculee primrest = 0 : "" ; +FLAGMENC : calculee primrest = 0 : "" ; + +# tl +TL_D2042_NB : calculee primrest = 0 : "" ; +TL_D2042_INIT_NB : calculee primrest = 0 : "" ; +TL_D2042_RECT_NB : calculee primrest = 0 : "" ; +TL_BASE_TL : calculee primrest = 0 : "" ; +TL_BASE_TL_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_RECT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_INIT : calculee primrest = 0 : "" ; +TL_BASE_TL_TBTC_RECT : calculee primrest = 0 : "" ; +TL_NON_ACQUISE : calculee primrest = 0 : "" ; + +# tl mauvaise foi +TL_MF_MFCDIS : calculee primrest = 0 : "" ; +TL_MF_MFCHR : calculee primrest = 0 : "" ; +TL_MF_MFCHR7 : calculee primrest = 0 : "" ; +TL_MF_MFCS : calculee primrest = 0 : "" ; +TL_MF_MFCSAL : calculee primrest = 0 : "" ; +TL_MF_MFCVN : calculee primrest = 0 : "" ; +TL_MF_MFGAIN : calculee primrest = 0 : "" ; +TL_MF_MFGLO : calculee primrest = 0 : "" ; +TL_MF_MFIFI : calculee primrest = 0 : "" ; +TL_MF_MFIR : calculee primrest = 0 : "" ; +TL_MF_MFLOY : calculee primrest = 0 : "" ; +TL_MF_MFMCSG820 : calculee primrest = 0 : "" ; +TL_MF_MFPCAP : calculee primrest = 0 : "" ; +TL_MF_MFPS : calculee primrest = 0 : "" ; +TL_MF_MFPSOL : calculee primrest = 0 : "" ; +TL_MF_MFRD : calculee primrest = 0 : "" ; +TL_MF_MFREGV : calculee primrest = 0 : "" ; +TL_MF_MFRSE1 : calculee primrest = 0 : "" ; +TL_MF_MFRSE2 : calculee primrest = 0 : "" ; +TL_MF_MFRSE3 : calculee primrest = 0 : "" ; +TL_MF_MFRSE4 : calculee primrest = 0 : "" ; +TL_MF_MFRSE5 : calculee primrest = 0 : "" ; +TL_MF_MFRSE6 : calculee primrest = 0 : "" ; +TL_MF_MFRSE7 : calculee primrest = 0 : "" ; +TL_MF_MFTAXAGA : calculee primrest = 0 : "" ; + +# inr +INR_NB_MOIS : calculee primrest = 0 : "" ; +INR_NB_MOIS2 : calculee primrest = 0 : "" ; +INR_NB_MOIS_ISF : calculee primrest = 0 : "" ; +INR_ANNEE_COR : calculee primrest = 0 : "" ; +INR_PASDINR : calculee primrest = 0 : "" ; + +# majo +MAJO_D2042_STRATE_NB : calculee primrest = 0 : "" ; +MAJO_D2042_P_NB : calculee primrest = 0 : "" ; +MAJO_TAUX_STRATE : calculee primrest = 0 : "" ; +MAJO_CODE_STRATE : calculee primrest = 0 : "" ; +MAJO_TARDIF_EVT2 : calculee primrest = 0 : "" ; +MAJO_STR_TR : tableau[26] calculee primrest = 0 : "" ; +MAJO_PREM_STR : calculee primrest = 0 : "" ; +MAJO_NB_STR_TR : calculee primrest = 0 : "" ; +MAJO_DERN_STR_TR : calculee primrest = 0 : "" ; +MAJO_NUM_STRATE : calculee primrest = 0 : "" ; + +# prorata +MAJO_T_RABP : calculee primrest = 0 : "" ; +MAJO_T_RABP07 : calculee primrest = 0 : "" ; +MAJO_T_RABP08 : calculee primrest = 0 : "" ; +MAJO_T_RABP09 : calculee primrest = 0 : "" ; +MAJO_T_RABP10 : calculee primrest = 0 : "" ; +MAJO_T_RABP11 : calculee primrest = 0 : "" ; +MAJO_T_RABP12 : calculee primrest = 0 : "" ; +MAJO_T_RABP17 : calculee primrest = 0 : "" ; +MAJO_T_RABP31 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS : calculee primrest = 0 : "" ; +MAJO_T_RABPPS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPPS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS : calculee primrest = 0 : "" ; +MAJO_T_RABPCS07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCS31 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD : calculee primrest = 0 : "" ; +MAJO_T_RABPRD07 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD08 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD09 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD10 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD11 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD12 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD17 : calculee primrest = 0 : "" ; +MAJO_T_RABPRD31 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH : calculee primrest = 0 : "" ; +MAJO_T_RABPCH07 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH08 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH09 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH10 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH11 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH12 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH17 : calculee primrest = 0 : "" ; +MAJO_T_RABPCH31 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO : calculee primrest = 0 : "" ; +MAJO_T_RABPLO07 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO08 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO09 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO10 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO11 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO12 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO17 : calculee primrest = 0 : "" ; +MAJO_T_RABPLO31 : calculee primrest = 0 : "" ; + +# art1731 +ART1731_SOMME_R3032 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R10 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R30 : calculee primrest = 0 : "" ; +ART1731_PRESENT_R32 : calculee primrest = 0 : "" ; + +# rappels +NB_RAPPELS : calculee primrest = 0 : "" ; +NB_NOUVEAUX_RAPPELS : calculee primrest = 0 : "" ; +NOUVEAU_RAPPEL : calculee primrest = 0 : "" ; + +cible regle_1: +application: iliad; +BIDON = 1; +APPLI_BATCH = 0; +APPLI_ILIAD = 1; + +cible calcul_primitif: +application: iliad; +calculer domaine primitive; + +cible calcul_primitif_isf: +application: iliad; +calculer domaine isf; + +cible calcul_primitif_taux: +application: iliad; +calculer domaine taux; + +cible calcul_correctif: +application: iliad; +calculer domaine corrective; + +cible sauve_base_1728: +application: iliad; +calculer domaine base_1728 corrective; + +cible sauve_base_premier: +application: iliad; +calculer domaine base_premier corrective; + +cible sauve_base_stratemajo: +application: iliad; +calculer domaine base_stratemajo corrective; + +cible sauve_base_anterieure: +application: iliad; +calculer domaine base_anterieure corrective; + +cible sauve_base_anterieure_cor: +application: iliad; +calculer domaine base_anterieure_cor corrective; + +cible sauve_base_inr_tl: +application: iliad; +calculer domaine base_inr_tl corrective; + +cible sauve_base_inr_tl22: +application: iliad; +calculer domaine base_inr_tl22 corrective; + +cible sauve_base_inr_tl24: +application: iliad; +calculer domaine base_inr_tl24 corrective; + +cible sauve_base_inr_ntl: +application: iliad; +calculer domaine base_inr_ntl corrective; + +cible sauve_base_inr_ntl22: +application: iliad; +calculer domaine base_inr_ntl22 corrective; + +cible sauve_base_inr_ntl24: +application: iliad; +calculer domaine base_inr_ntl24 corrective; + +cible sauve_base_inr_ref: +application: iliad; +calculer domaine base_inr_ref corrective; + +cible sauve_base_inr_r9901: +application: iliad; +calculer domaine base_inr_r9901 corrective; + +cible sauve_base_inr_intertl: +application: iliad; +calculer domaine base_inr_intertl corrective; + +cible sauve_base_inr_inter22: +application: iliad; +calculer domaine base_inr_inter22 corrective; + +cible sauve_base_inr_cimr99: +application: iliad; +calculer domaine base_inr_cimr99 corrective; + +cible sauve_base_inr_cimr07: +application: iliad; +calculer domaine base_inr_cimr07 corrective; + +cible sauve_base_inr_cimr24: +application: iliad; +calculer domaine base_inr_cimr24 corrective; + +cible sauve_base_inr_tlcimr07: +application: iliad; +calculer domaine base_inr_tlcimr07 corrective; + +cible sauve_base_inr_tlcimr24: +application: iliad; +calculer domaine base_inr_tlcimr24 corrective; + +cible sauve_base_tlnunv: +application: iliad; +calculer domaine base_TLNUNV corrective; + +cible sauve_base_tl: +application: iliad; +calculer domaine base_tl corrective; + +cible sauve_base_tl_init: +application: iliad; +calculer domaine base_tl_init corrective; + +cible sauve_base_tl_rect: +application: iliad; +calculer domaine base_tl_rect corrective; + +cible sauve_base_initial: +application: iliad; +calculer domaine base_INITIAL corrective; + +cible sauve_base_abat98: +application: iliad; +calculer domaine base_ABAT98 corrective; + +cible sauve_base_abat99: +application: iliad; +calculer domaine base_ABAT99 corrective; + +cible sauve_base_majo: +application: iliad; +calculer domaine base_MAJO corrective; + +cible sauve_base_inr: +application: iliad; +calculer domaine base_INR corrective; + +cible sauve_base_HR: +application: iliad; +calculer domaine base_HR corrective; + +cible sauve_base_primitive_penalisee: +application: iliad; +calculer domaine base_primitive_penalisee corrective; + +cible ENCH_TL: +application: iliad; +calculer enchaineur ENCH_TL; + +cible verif_calcul_primitive_isf: +application: iliad; +nettoie_erreurs; +verifier domaine isf : avec nb_categorie(calculee *) > 0; + +cible verif_calcul_primitive: +application: iliad; +calculer cible verif_calcul_primitive_isf; +si nb_bloquantes() = 0 alors + verifier domaine primitive + : avec + nb_categorie(calculee *) > 0 + ou numero_verif() = 1021; +finsi + +cible verif_calcul_corrective: +application: iliad; +nettoie_erreurs; +calculer cible calcul_primitif_isf; +calculer cible verif_calcul_primitive_isf; +si nb_bloquantes() = 0 alors + verifier domaine corrective + : avec + nb_categorie(calculee *) > 0 + ou numero_verif() = 1021; +finsi + +cible verif_saisie_cohe_primitive_isf_raw: +application: iliad; +nettoie_erreurs; +verifier domaine isf +: avec nb_categorie(saisie *) > 0 et nb_categorie(calculee *) = 0; + +cible verif_saisie_cohe_primitive: +application: iliad; +nettoie_erreurs; +calculer cible verif_saisie_cohe_primitive_isf_raw; +si nb_bloquantes() = 0 alors + calculer cible calcul_primitif_isf; + calculer cible verif_calcul_primitive_isf; + si nb_bloquantes() = 0 alors + verifier domaine primitive + : avec + nb_categorie(saisie *) > 0 et nb_categorie(calculee *) = 0 + et numero_verif() != 1021; + finsi +finsi + +cible verif_saisie_cohe_corrective: +application: iliad; +nettoie_erreurs; +calculer cible verif_saisie_cohe_primitive_isf_raw; +si nb_bloquantes() = 0 alors + verifier domaine corrective + : avec + nb_categorie(saisie *) > 0 et nb_categorie(calculee *) = 0 + et numero_verif() != 1021; +finsi + +cible verif_cohe_horizontale: +application: iliad; +nettoie_erreurs; +verifier domaine horizontale corrective; + +cible verif_contexte_cohe_primitive: +application: iliad; +nettoie_erreurs; +verifier domaine primitive +: avec nb_categorie(saisie contexte) = nb_categorie(*); + +cible verif_contexte_cohe_corrective: +application: iliad; +nettoie_erreurs; +verifier domaine corrective +: avec nb_categorie(saisie contexte) = nb_categorie(*); + +cible verif_famille_cohe_primitive: +application: iliad; +nettoie_erreurs; +verifier domaine primitive +: avec + nb_categorie(saisie famille) > 0 + et nb_categorie(*) = nb_categorie(saisie famille) + nb_categorie(saisie contexte) + et numero_verif() != 1021; + +cible verif_famille_cohe_corrective: +application: iliad; +nettoie_erreurs; +verifier domaine corrective +: avec + nb_categorie(saisie famille) > 0 + et nb_categorie(*) = nb_categorie(saisie famille) + nb_categorie(saisie contexte) + et numero_verif() != 1021; + +cible verif_revenu_cohe_primitive: +application: iliad; +nettoie_erreurs; +verifier domaine primitive +: avec nb_categorie(saisie revenu) > 0 et nb_categorie(calculee *) = 0; + +cible verif_revenu_cohe_corrective: +application: iliad; +nettoie_erreurs; +verifier domaine corrective +: avec nb_categorie(saisie revenu) > 0 et nb_categorie(calculee *) = 0; + +# primitif ml + +cible trace_in: +application: iliad; +variables_temporaires: TOTO; +TOTO = 0; +#afficher_erreur indenter(2); + +cible trace_out: +application: iliad; +variables_temporaires: TOTO; +TOTO = 0; +#afficher_erreur indenter(-2); + +cible calcul_prim_corr: +application: iliad; +#afficher_erreur "calcul_prim_corr[\n"; +calculer cible trace_in; +si V_IND_TRAIT = 4 alors # PRIMITIF + calculer cible calcul_primitif; +sinon + calculer cible calcul_correctif; +finsi +calculer cible trace_out; +#afficher_erreur "]calcul_prim_corr\n"; + +cible effacer_base_etc: +application : iliad; +#afficher_erreur "effacer_base_etc[\n"; +calculer cible trace_in; +iterer +: variable ITBASE +: categorie calculee base +: dans ( + ITBASE = indefini; +) +calculer cible trace_out; +#afficher_erreur "]effacer_base_etc\n"; + +cible effacer_calculee_etc: +application : iliad; +#afficher_erreur "effacer_calculee_etc[\n"; +calculer cible trace_in; +iterer +: variable ITCAL +: categorie calculee +: dans ( + ITCAL = indefini; +) +calculer cible trace_out; +#afficher_erreur "]effacer_calculee_etc\n"; + +cible calcule_acomptes: +application: iliad; +variables_temporaires: SAUV_ART1731BIS, SAUV_PREM8_11; +#afficher_erreur "calcule_acomptes[\n"; +calculer cible trace_in; +FLAG_ACO = 1; +V_CALCUL_ACO = 1; +calculer cible calcul_prim_corr; +V_CALCUL_ACO = 0; +FLAG_ACO = 2; +SAUV_ART1731BIS = ART1731BIS + 0; +SAUV_PREM8_11 = PREM8_11 + 0; +calculer cible effacer_calculee_etc; +si V_IND_TRAIT = 4 alors # PRIMITIF + calculer cible effacer_base_etc; + ART1731BIS = SAUV_ART1731BIS; + PREM8_11 = SAUV_PREM8_11; +finsi +calculer cible trace_out; +#afficher_erreur "]calcule_acomptes\n"; + +cible effacer_avfisc_1: +application: iliad; +#afficher_erreur "effacer_avfisc_1[\n"; +calculer cible trace_in; +iterer +: variable REV_AV +: categorie saisie revenu, saisie revenu corrective +: avec attribut(REV_AV, avfisc) = 1 et present(REV_AV) +: dans ( + REV_AV = indefini; +) +calculer cible trace_out; +#afficher_erreur "]effacer_avfisc_1\n"; + +cible est_code_supp_avfisc: +application: iliad; +arguments: EXISTE_CODE_SUPP; +#afficher_erreur "est_code_supp_avfisc[\n"; +calculer cible trace_in; +EXISTE_CODE_SUPP = 0; +#si +# present(COD7QD) ou present(COD7QB) ou present(COD7QC) +# ou present(RFORDI) ou present(RFROBOR) ou present(RFDORD) +# ou present(RFDHIS) ou present(REPSNO3_A) +# ou present(COD7QF) ou present(COD7QH) ou present(CELRREDLG_A) +# ou present(PINELQM_A) ou present(RCMABD) ou present(COD7KM) +# ou present(PINELQP_A) ou present(COD7QS_A) ou present(PINELQN_A) +# ou present(PINELQO_A) +#alors +# EXISTE_CODE_SUPP = 1; +#sinon + iterer + : variable REV_AV + : categorie saisie revenu, saisie revenu corrective + : avec attribut(REV_AV, avfisc) = 2 et present(REV_AV) + : dans ( + EXISTE_CODE_SUPP = 1; + ) +#finsi +calculer cible trace_out; +#afficher_erreur "]est_code_supp_avfisc\n"; + +cible calcule_avfiscal: +application: iliad; +variables_temporaires: + EXISTE_AVFISC, EXISTE_CODE_SUPP, + SAUV_IAD11, SAUV_INE, SAUV_IRE, SAUV_ART1731BIS, SAUV_PREM8_11; +#afficher_erreur "calcule_avfiscal[\n"; +calculer cible trace_in; +EXISTE_AVFISC = 0; +iterer +: variable REV_AV +: categorie saisie revenu, saisie revenu corrective +: avec attribut(REV_AV, avfisc) dans (1, 2) et present(REV_AV) +: dans ( + EXISTE_AVFISC = 1; +) +calculer cible est_code_supp_avfisc : avec EXISTE_CODE_SUPP; +si EXISTE_CODE_SUPP = 0 alors + EXISTE_AVFISC = 1; +finsi +si EXISTE_AVFISC = 1 alors + restaurer + : variable REV_AV + : categorie saisie revenu, saisie revenu corrective + : avec attribut(REV_AV, avfisc) = 1 et present(REV_AV) + : apres ( + calculer cible effacer_avfisc_1; + V_INDTEO = 1; + V_CALCUL_NAPS = 1; + calculer cible calcul_prim_corr; + V_CALCUL_NAPS = 0; + SAUV_IAD11 = IAD11; + SAUV_INE = INE; + SAUV_IRE = IRE; + SAUV_ART1731BIS = ART1731BIS + 0; + SAUV_PREM8_11 = PREM8_11 + 0; + calculer cible effacer_calculee_etc; + si V_IND_TRAIT = 4 alors # PRIMITIF + calculer cible effacer_base_etc; + ART1731BIS = SAUV_ART1731BIS; + PREM8_11 = SAUV_PREM8_11; + finsi + ) + V_IAD11TEO = SAUV_IAD11; + V_IRETEO = SAUV_IRE; + V_INETEO = SAUV_INE; +sinon + calculer cible effacer_avfisc_1; +finsi +calculer cible trace_out; +#afficher_erreur "]calcule_avfiscal\n"; + +cible article_1731_bis: +application : iliad; +#afficher_erreur "article_1731_bis[\n"; +calculer cible trace_in; +si V_IND_TRAIT = 4 alors # PRIMITIF + si CMAJ dans (8, 11) alors + ART1731BIS = 1; + PREM8_11 = 1; + sinon + ART1731BIS = 0; + finsi +finsi +calculer cible trace_out; +#afficher_erreur "]article_1731_bis\n"; + +cible calcule_acomptes_avfisc: +application: iliad; +variables_temporaires: NAP_SANS_PENA_REEL, SAUV_ART1731BIS, SAUV_PREM8_11; +#afficher_erreur "calcule_acomptes_avfisc[\n"; +calculer cible trace_in; +NAP_SANS_PENA_REEL = 0; # toujours 0 ? +FLAG_ACO = 1; +calculer cible calcule_avfiscal; +V_INDTEO = 0; +V_NEGREEL = si (NAP_SANS_PENA_REEL > 0.0) alors (0) sinon (1) finsi; +V_NAPREEL = abs(NAP_SANS_PENA_REEL); +V_CALCUL_ACO = 1; +calculer cible calcul_prim_corr; +SAUV_ART1731BIS = ART1731BIS + 0; +SAUV_PREM8_11 = PREM8_11 + 0; +calculer cible effacer_calculee_etc; +si V_IND_TRAIT = 4 alors # PRIMITIF + ART1731BIS = SAUV_ART1731BIS; + PREM8_11 = SAUV_PREM8_11; +finsi +calculer cible trace_out; +#afficher_erreur "]calcule_acomptes_avfisc\n"; + +cible est_calcul_acomptes: +application: iliad; +arguments: EXISTE_ACOMPTES; +#afficher_erreur "est_calcul_acomptes[\n"; +calculer cible trace_in; +EXISTE_ACOMPTES = 0; +iterer +: variable REV_AC +: categorie saisie revenu, saisie revenu corrective +: avec attribut(REV_AC, acompte) = 0 et present(REV_AC) +: dans ( + EXISTE_ACOMPTES = 1; +) +calculer cible trace_out; +#afficher_erreur "]est_calcul_acomptes\n"; + +cible est_calcul_avfisc: +application: iliad; +arguments: EXISTE_AVFISC; +#afficher_erreur "est_calcul_avfisc[\n"; +calculer cible trace_in; +EXISTE_AVFISC = 0; +iterer +: variable REV_AV +: categorie saisie revenu, saisie revenu corrective +: avec attribut(REV_AV, avfisc) = 1 et present(REV_AV) +: dans ( + EXISTE_AVFISC = 1; +) +si EXISTE_AVFISC = 0 alors + calculer cible est_code_supp_avfisc : avec EXISTE_AVFISC; +finsi +calculer cible trace_out; +#afficher_erreur "]est_calcul_avfisc\n"; + +cible traite_double_liquidation3: +application: iliad; +arguments: P_EST_CALCUL_ACOMPTES; +variables_temporaires: CALCUL_ACOMPTES, CALCUL_AVFISC, SAUV_IRANT; +#afficher_erreur "traite_double_liquidation3[\n"; +calculer cible trace_in; +FLAG_ACO = 0; +V_NEGACO = 0; +V_AVFISCOPBIS = 0; +V_DIFTEOREEL = 0; +si V_IND_TRAIT = 4 alors # primitif + PREM8_11 = 0; + calculer cible article_1731_bis; +finsi +calculer cible est_calcul_acomptes : avec CALCUL_ACOMPTES; +calculer cible est_calcul_avfisc : avec CALCUL_AVFISC; +si CALCUL_AVFISC = 1 alors + SAUV_IRANT = IRANT + 0 ; + IRANT = indefini; +sinon + SAUV_IRANT = 0; +finsi +si CALCUL_ACOMPTES = 1 et P_EST_CALCUL_ACOMPTES != 0 alors + restaurer + : variable REV_AC + : categorie saisie revenu, saisie revenu corrective + : avec attribut(REV_AC, acompte) = 0 + : apres ( + iterer + : variable REV_AC + : categorie saisie revenu, saisie revenu corrective + : avec attribut(REV_AC, acompte) = 0 + : dans ( + REV_AC = indefini; + ) + si CALCUL_AVFISC = 1 alors + calculer cible calcule_acomptes_avfisc; + sinon + calculer cible calcule_acomptes; + finsi + ) +finsi +si CALCUL_AVFISC = 1 alors + V_AVFISCOPBIS = 0; + V_DIFTEOREEL = 0; + V_INDTEO = 1; + calculer cible calcule_avfiscal; + V_INDTEO = 0; + V_NEGREEL = 1; + V_NAPREEL = 0; +finsi +si CALCUL_AVFISC = 1 et SAUV_IRANT != 0 alors + IRANT = SAUV_IRANT; +finsi +V_ACO_MTAP = 0; +V_NEGACO = 0; +calculer cible calcul_primitif_isf; +calculer cible calcul_prim_corr; +#afficher_erreur "calcul_primitif_taux[\n"; +calculer cible trace_in; +calculer cible calcul_primitif_taux; +calculer cible trace_out; +#afficher_erreur "]calcul_primitif_taux\n"; +si V_IND_TRAIT = 4 alors # primitif + calculer cible verif_calcul_primitive; +finsi +calculer cible trace_out; +#afficher_erreur "]traite_double_liquidation3\n"; + +cible abs_flag: +application: iliad; +arguments: VAR, ABS, FLAG; +si present(VAR) alors + FLAG = (VAR < 0); + ABS = abs(VAR); + VAR = ABS; +finsi + +cible traite_double_liquidation_exit_taxe: +application: iliad; +variables_temporaires: CALCULER_ACOMPTES; +#afficher_erreur "traite_double_liquidation_exit_taxe[\n"; +calculer cible trace_in; +si present(PVIMPOS) ou present(CODRWB) alors + FLAG_3WBNEG = 0; + FLAG_EXIT = 1; + CALCULER_ACOMPTES = 0; + calculer cible traite_double_liquidation3 : avec CALCULER_ACOMPTES; + calculer cible abs_flag : avec NAPTIR, V_NAPTIR3WB, FLAG_3WBNEG; + si present(IHAUTREVT) alors + V_CHR3WB = IHAUTREVT; + finsi + si present(IAD11) alors + V_ID113WB = IAD11; + finsi + FLAG_EXIT = 0; +finsi +si present(PVSURSI) ou present(CODRWA) alors + FLAG_3WANEG = 0; + FLAG_EXIT = 2; + CALCULER_ACOMPTES = 0; + calculer cible traite_double_liquidation3 : avec CALCULER_ACOMPTES; + calculer cible abs_flag : avec NAPTIR, V_NAPTIR3WA, FLAG_3WANEG; + si present(IHAUTREVT) alors + V_CHR3WA = IHAUTREVT; + finsi + si present(IAD11) alors + V_ID113WA = IAD11; + finsi + FLAG_EXIT = 0; +finsi +FLAG_BAREM = 1; +CALCULER_ACOMPTES = 1; +calculer cible traite_double_liquidation3 : avec CALCULER_ACOMPTES; +si present(RASTXFOYER) alors + V_BARTXFOYER = RASTXFOYER; +finsi +si present(RASTXDEC1) alors + V_BARTXDEC1 = RASTXDEC1; +finsi +si present(RASTXDEC2) alors + V_BARTXDEC2 = RASTXDEC2; +finsi +si present(INDTAZ) alors + si INDTAZ >= 0 alors + V_BARINDTAZ = INDTAZ; +## Segfault !!! ## +# sinon +# leve_erreur A000; + finsi +finsi +calculer cible abs_flag : avec IITAZIR, V_BARIITAZIR, FLAG_BARIITANEG; +si present(IRTOTAL) alors + V_BARIRTOTAL = IRTOTAL; +finsi +FLAG_BAREM = 0; +CALCULER_ACOMPTES = 1; +calculer cible traite_double_liquidation3 : avec CALCULER_ACOMPTES; +calculer cible trace_out; +#afficher_erreur "]traite_double_liquidation_exit_taxe\n"; + +cible traite_double_liquidation_pvro: +application: iliad; +#afficher_erreur "traite_double_liquidation_pvro[\n"; +calculer cible trace_in; +si present(COD3WG) alors + FLAG_PVRO = 1; + calculer cible traite_double_liquidation_exit_taxe; + si present(IAD11) alors + V_IPVRO = IAD11; + finsi +finsi +FLAG_PVRO = 0; +calculer cible traite_double_liquidation_exit_taxe; +calculer cible trace_out; +#afficher_erreur "]traite_double_liquidation_pvro\n"; + +cible ir_verif_saisie_isf: +application: iliad; +calculer cible regle_1; +calculer cible verif_saisie_cohe_primitive_isf_raw; + +cible ir_verif_contexte: +application: iliad; +calculer cible regle_1; +calculer cible verif_contexte_cohe_primitive; + +cible ir_verif_famille: +application: iliad; +calculer cible regle_1; +calculer cible verif_famille_cohe_primitive; + +cible ir_verif_revenu: +application: iliad; +#afficher_erreur "ir_verif_revenu[\n"; +calculer cible trace_in; +si + present(COD9AA) ou present(COD9AB) ou present(COD9AC) ou present(COD9AD) + ou present(COD9AE) ou present(COD9BA) ou present(COD9BB) ou present(COD9CA) + ou present(COD9GF) ou present(COD9GH) ou present(COD9GL) ou present(COD9GM) + ou present(COD9GN) ou present(COD9GY) ou present(COD9NC) ou present(COD9NG) + ou present(COD9PR) ou present(COD9PX) ou present(COD9RS) ou present(CMAJ_ISF) + ou present(MOISAN_ISF) +alors + si V_REGCO + 0 = 0 alors + V_REGCO = 1; + finsi + si V_0DA + 0 = 0 alors + V_0DA = 1980; + finsi +finsi +calculer cible regle_1; +calculer cible verif_revenu_cohe_primitive; +calculer cible trace_out; +#afficher_erreur "]ir_verif_revenu\n"; + +cible ir_calcul_primitif_isf: +application: iliad; +#afficher_erreur "ir_calcul_primitif_isf[\n"; +calculer cible trace_in; +calculer cible calcul_primitif_isf; +nettoie_erreurs; +calculer cible verif_calcul_primitive_isf; +calculer cible trace_out; +#afficher_erreur "]ir_calcul_primitif_isf\n"; + +cible modulation_taxation: +application: iliad; +#afficher_erreur "modulation_taxation[\n"; +calculer cible trace_in; +si V_MODUL = 1 alors + iterer + : variable IT_MOD + : categorie saisie revenu, saisie revenu corrective, saisie famille + : avec present(IT_MOD) et attribut(IT_MOD, modcat) < 1 + : dans ( + IT_MOD = indefini; + leve_erreur DD40 IT_MOD; + ) + iterer + : variable IT_MOD + : categorie saisie contexte + : avec present(IT_MOD) et attribut(IT_MOD, modcat) < 1 + : dans ( + IT_MOD = indefini; + ) +finsi +si (non present(V_MODUL)) ou V_MODUL != 1 alors + iterer + : variable IT_MOD + : categorie saisie revenu, saisie revenu corrective, saisie famille + : avec present(IT_MOD) et attribut(IT_MOD, modcat) > 1 + : dans ( + IT_MOD = indefini; + ) + iterer + : variable IT_MOD + : categorie saisie contexte + : avec present(IT_MOD) et attribut(IT_MOD, modcat) > 1 + : dans ( + IT_MOD = indefini; + leve_erreur DD40 IT_MOD; + ) +finsi +calculer cible trace_out; +#afficher_erreur "]modulation_taxation\n"; + +cible traite_double_liquidation_2: +application: iliad; +calculer cible modulation_taxation; +calculer cible traite_double_liquidation_pvro; + +cible enchaine_calcul: +application: iliad; +# variables_temporaires: CALCULER_ACOMPTES; +si V_IND_TRAIT = 4 alors # primitif + calculer cible effacer_base_etc; + calculer cible traite_double_liquidation_2; + calculer cible sauve_base_initial; + calculer cible sauve_base_1728; + calculer cible sauve_base_anterieure; + calculer cible sauve_base_anterieure_cor; + calculer cible sauve_base_inr_inter22; +sinon + V_ACO_MTAP = 0; + V_NEGACO = 0; +# CALCULER_ACOMPTES = si (present(FLAGDERNIE)) alors (1) sinon (0) finsi; +# calculer cible traite_double_liquidation3 : avec CALCULER_ACOMPTES; + calculer cible traite_double_liquidation_pvro; +finsi + +cible exporte_si_non_bloquantes: +application: iliad; +si nb_discordances() + nb_informatives() > 0 alors + exporte_erreurs; +finsi + +cible enchainement_primitif: +application: iliad; +variables_temporaires: EXPORTE_ERREUR; +#afficher_erreur "traite_double_liquidation2[\n"; +calculer cible trace_in; +calculer cible ir_verif_saisie_isf; +finalise_erreurs; +EXPORTE_ERREUR = 1; +quand nb_anomalies() = 0 faire + EXPORTE_ERREUR = 0; +puis_quand nb_discordances() + nb_informatives() = 0 faire + calculer cible ir_verif_contexte; + finalise_erreurs; + EXPORTE_ERREUR = 0; +puis_quand nb_anomalies() = 0 faire + calculer cible exporte_si_non_bloquantes; + calculer cible ir_verif_famille; + finalise_erreurs; +puis_quand nb_anomalies() = 0 faire + EXPORTE_ERREUR = 1; +puis_quand nb_discordances() + nb_informatives() = 0 faire + calculer cible ir_verif_revenu; + finalise_erreurs; +puis_quand nb_anomalies() = 0 faire + calculer cible exporte_si_non_bloquantes; + calculer cible ir_calcul_primitif_isf; +# finalise_erreurs; + calculer cible enchaine_calcul; + finalise_erreurs; + calculer cible exporte_si_non_bloquantes; +sinon_faire + si EXPORTE_ERREUR = 1 alors + exporte_erreurs; + finsi +finquand +calculer cible trace_out; +#afficher_erreur "]traite_double_liquidation2\n"; + +# ??? + +cible traite_double_liquidation_2_prim: +application: iliad; +calculer cible traite_double_liquidation_2 : espace GLOBAL; + +cible traite_double_liquidation_2_corr: +application: iliad; +nettoie_erreurs; +calculer cible traite_double_liquidation_2 : espace CORR; + +cible sauve_base_initial_prim: +application: iliad; +calculer cible sauve_base_initial : espace GLOBAL; + +cible sauve_base_initial_corr: +application: iliad; +calculer cible sauve_base_initial : espace CORR; + +cible sauve_base_1728_prim: +application: iliad; +calculer cible sauve_base_1728 : espace GLOBAL; + +cible sauve_base_1728_corr: +application: iliad; +calculer cible sauve_base_1728 : espace CORR; + +cible sauve_base_anterieure_prim: +application: iliad; +calculer cible sauve_base_anterieure : espace GLOBAL; + +cible sauve_base_anterieure_corr: +application: iliad; +calculer cible sauve_base_anterieure : espace CORR; + +cible sauve_base_anterieure_cor_prim: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace GLOBAL; + +cible sauve_base_anterieure_cor_corr: +application: iliad; +calculer cible sauve_base_anterieure_cor : espace CORR; + +cible sauve_base_inr_inter22_prim: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace GLOBAL; + +cible sauve_base_inr_inter22_corr: +application: iliad; +calculer cible sauve_base_inr_inter22 : espace CORR; + +cible verif_saisie_cohe_primitive_prim: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace GLOBAL; + +cible verif_saisie_cohe_primitive_corr: +application: iliad; +calculer cible verif_saisie_cohe_primitive : espace CORR; + +cible verif_saisie_cohe_corrective_prim: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace GLOBAL; + +cible verif_saisie_cohe_corrective_corr: +application: iliad; +calculer cible verif_saisie_cohe_corrective : espace CORR; + +cible verif_cohe_horizontale_corr: +application: iliad; +calculer cible verif_cohe_horizontale : espace CORR; + +cible calcul_primitif_isf_prim: +application: iliad; +calculer cible calcul_primitif_isf : espace GLOBAL; + +cible verif_calcul_primitive_isf_prim: +application: iliad; +calculer cible verif_calcul_primitive_isf : espace GLOBAL; + +cible ench_tl_corr : +application: iliad; +calculer cible ENCH_TL : espace CORR; + +cible sauve_base_inr_r9901_corr : +application: iliad; +calculer cible sauve_base_inr_r9901 : espace CORR; + +cible sauve_base_inr_cimr24_corr : +application: iliad; +calculer cible sauve_base_inr_cimr24 : espace CORR; + +cible sauve_base_HR_corr : +application: iliad; +calculer cible sauve_base_HR : espace CORR; + +cible sauve_base_inr_ref_corr : +application: iliad; +calculer cible sauve_base_inr_ref : espace CORR; + +cible sauve_base_inr_ntl_corr : +application: iliad; +calculer cible sauve_base_inr_ntl : espace CORR; + +cible sauve_base_abat98_corr : +application: iliad; +calculer cible sauve_base_abat98 : espace CORR; + +cible sauve_base_abat99_corr : +application: iliad; +calculer cible sauve_base_abat99 : espace CORR; + +cible sauve_base_inr_corr : +application: iliad; +calculer cible sauve_base_inr : espace CORR; + +cible sauve_base_inr_intertl_corr : +application: iliad; +calculer cible sauve_base_inr_intertl : espace CORR; + +cible sauve_base_inr_ntl22_corr : +application: iliad; +calculer cible sauve_base_inr_ntl22 : espace CORR; + +cible sauve_base_inr_ntl24_corr : +application: iliad; +calculer cible sauve_base_inr_ntl24 : espace CORR; + +cible sauve_base_inr_tl22_corr : +application: iliad; +calculer cible sauve_base_inr_tl22 : espace CORR; + +cible sauve_base_inr_tl24_corr : +application: iliad; +calculer cible sauve_base_inr_tl24 : espace CORR; + +cible sauve_base_inr_tl_corr : +application: iliad; +calculer cible sauve_base_inr_tl : espace CORR; + +cible sauve_base_majo_corr : +application: iliad; +calculer cible sauve_base_majo : espace CORR; + +cible sauve_base_premier_corr : +application: iliad; +calculer cible sauve_base_premier : espace CORR; + +cible sauve_base_stratemajo_corr : +application: iliad; +calculer cible sauve_base_stratemajo : espace CORR; + +cible sauve_base_tl_corr : +application: iliad; +calculer cible sauve_base_tl : espace CORR; + +cible sauve_base_tl_init_corr : +application: iliad; +calculer cible sauve_base_tl_init : espace CORR; + +cible sauve_base_tl_rect_corr : +application: iliad; +calculer cible sauve_base_tl_rect : espace CORR; + +cible verif_calcul_corrective_corr : +application: iliad; +calculer cible verif_calcul_corrective : espace CORR; + diff --git a/m_ext/2025/codes_1731.m b/m_ext/2025/codes_1731.m new file mode 100644 index 000000000..e3feafb80 --- /dev/null +++ b/m_ext/2025/codes_1731.m @@ -0,0 +1,923 @@ +cible range_base_corr_corrige: +application: iliad; +si present(SHBA) alors CORR.SHBA1731 = SHBA; finsi +si present(BANOR) alors CORR.BANOR1731 = BANOR; finsi +si present(INDSEUILBA) alors CORR.INDSEUILBA1731 = INDSEUILBA; finsi +si present(REB) alors CORR.REB1731 = REB; finsi +si present(R1649) alors CORR.R16491731 = R1649; finsi +si present(BAEV) alors CORR.BAEV1731 = BAEV; finsi +si present(BAEMV) alors CORR.BAEMV1731 = BAEMV; finsi +si present(BAEP) alors CORR.BAEP1731 = BAEP; finsi +si present(REVTP) alors CORR.REVTP1731 = REVTP; finsi +si present(BA1) alors CORR.BA11731 = BA1; finsi +si present(REVQTOTQHT) alors CORR.REVQTOTQHT1731 = REVQTOTQHT; finsi +si present(PREREV) alors CORR.PREREV1731 = PREREV; finsi +si present(REPRCM) alors CORR.REPRCM1731 = REPRCM; finsi +si present(REPRCMB) alors CORR.REPRCMB1731 = REPRCMB; finsi +si present(RFREVENU) alors CORR.RFREVENU1731 = RFREVENU; finsi +si present(TSHBA) alors CORR.TSHBA1731 = TSHBA; finsi +si present(DABNCNP1) alors CORR.DABNCNP11731 = DABNCNP1; finsi +si present(DABNCNP2) alors CORR.DABNCNP21731 = DABNCNP2; finsi +si present(DABNCNP3) alors CORR.DABNCNP31731 = DABNCNP3; finsi +si present(DABNCNP4) alors CORR.DABNCNP41731 = DABNCNP4; finsi +si present(DABNCNP5) alors CORR.DABNCNP51731 = DABNCNP5; finsi +si present(DABNCNP6) alors CORR.DABNCNP61731 = DABNCNP6; finsi +si present(DABNCNP) alors CORR.DABNCNP1731 = DABNCNP; finsi +si present(DAGRI1) alors CORR.DAGRI11731 = DAGRI1; finsi +si present(DAGRI2) alors CORR.DAGRI21731 = DAGRI2; finsi +si present(DAGRI3) alors CORR.DAGRI31731 = DAGRI3; finsi +si present(DAGRI4) alors CORR.DAGRI41731 = DAGRI4; finsi +si present(DAGRI5) alors CORR.DAGRI51731 = DAGRI5; finsi +si present(DAGRI6) alors CORR.DAGRI61731 = DAGRI6; finsi +si present(DAGRIIMP) alors CORR.DAGRIIMP1731 = DAGRIIMP; finsi +si present(DAGRI) alors CORR.DAGRI1731 = DAGRI; finsi +si present(DEFAA0) alors CORR.DEFAA01731 = DEFAA0; finsi +si present(DEFAA1) alors CORR.DEFAA11731 = DEFAA1; finsi +si present(DEFAA2) alors CORR.DEFAA21731 = DEFAA2; finsi +si present(DEFAA3) alors CORR.DEFAA31731 = DEFAA3; finsi +si present(DEFAA4) alors CORR.DEFAA41731 = DEFAA4; finsi +si present(DEFAA5) alors CORR.DEFAA51731 = DEFAA5; finsi +si present(DEFBIC1) alors CORR.DEFBIC11731 = DEFBIC1; finsi +si present(DEFBIC2) alors CORR.DEFBIC21731 = DEFBIC2; finsi +si present(DEFBIC3) alors CORR.DEFBIC31731 = DEFBIC3; finsi +si present(DEFBIC4) alors CORR.DEFBIC41731 = DEFBIC4; finsi +si present(DEFBIC5) alors CORR.DEFBIC51731 = DEFBIC5; finsi +si present(DEFBIC6) alors CORR.DEFBIC61731 = DEFBIC6; finsi +si present(DEFRCM) alors CORR.DEFRCM1731 = DEFRCM; finsi +si present(DEFRCM2) alors CORR.DEFRCM21731 = DEFRCM2; finsi +si present(DEFRCM3) alors CORR.DEFRCM31731 = DEFRCM3; finsi +si present(DEFRCM4) alors CORR.DEFRCM41731 = DEFRCM4; finsi +si present(DEFRCM5) alors CORR.DEFRCM51731 = DEFRCM5; finsi +si present(DEFRCM6) alors CORR.DEFRCM61731 = DEFRCM6; finsi +si present(DEFRCMI) alors CORR.DEFRCMI1731 = DEFRCMI; finsi +si present(DEFRFNONIBIS) alors CORR.DEFRFNONI1731 = DEFRFNONIBIS; finsi +si present(DEFZU) alors CORR.DEFZU1731 = DEFZU; finsi +si present(DMOND) alors CORR.DMOND1731 = DMOND; finsi +si present(IPTEFN) alors CORR.IPTEFN1731 = IPTEFN; finsi +si present(RFDORD) alors CORR.RFDORD1731 = RFDORD; finsi +si present(DEFNPI) alors CORR.DEFNPI1731 = DEFNPI; finsi +si present(TDEFNPI) alors CORR.TDEFNPI1731 = TDEFNPI; finsi +si present(DFRCMN) alors CORR.DFRCMN1731 = DFRCMN; finsi +si present(DFRCM1) alors CORR.DFRCM11731 = DFRCM1; finsi +si present(DFRCM2) alors CORR.DFRCM21731 = DFRCM2; finsi +si present(DFRCM3) alors CORR.DFRCM31731 = DFRCM3; finsi +si present(DFRCM4) alors CORR.DFRCM41731 = DFRCM4; finsi +si present(DFRCM5) alors CORR.DFRCM51731 = DFRCM5; finsi +si present(DEFBA) alors CORR.DEFBA1731 = DEFBA; finsi +si present(DLMRNT) alors CORR.DLMRN1731 = DLMRNT; finsi +si present(DLMRN7) alors CORR.DLMRN71731 = DLMRN7; finsi +si present(DEFBA7) alors CORR.DEFBA71731 = DEFBA7; finsi +si present(DEFLOC11) alors CORR.DEFLOC111731 = DEFLOC11; finsi +si present(BNCDF7) alors CORR.BNCDF71731 = BNCDF7; finsi +si present(DEFLOC) alors CORR.DEFLOC1731 = DEFLOC; finsi +si present(BNCDF) alors CORR.BNCDF1731 = BNCDF; finsi +si present(FRDV) alors CORR.FRDV1731 = FRDV; finsi +si present(FRDC) alors CORR.FRDC1731 = FRDC; finsi +si present(FRD1) alors CORR.FRD11731 = FRD1; finsi +si present(FRD2) alors CORR.FRD21731 = FRD2; finsi +si present(FRD3) alors CORR.FRD31731 = FRD3; finsi +si present(FRD4) alors CORR.FRD41731 = FRD4; finsi +si present(RCMFRNET) alors CORR.RCMFRNET1731 = RCMFRNET; finsi +si present(RCMFR) alors CORR.RCMFR1731 = RCMFR; finsi +si present(BICNPF) alors CORR.BICNPF1731 = BICNPF; finsi +si present(RFDANT) alors CORR.RFDANT1731 = RFDANT; finsi +si present(TFRDV) alors CORR.TFRDV1731 = TFRDV; finsi +si present(TFRDC) alors CORR.TFRDC1731 = TFRDC; finsi +si present(TFRD1) alors CORR.TFRD11731 = TFRD1; finsi +si present(TFRD2) alors CORR.TFRD21731 = TFRD2; finsi +si present(TFRD3) alors CORR.TFRD31731 = TFRD3; finsi +si present(TFRD4) alors CORR.TFRD41731 = TFRD4; finsi +si present(RNIDF) alors CORR.RNIDF1731 = RNIDF; finsi +si present(DFBICNPF) alors CORR.DFBICNPF1731 = DFBICNPF; finsi +si present(TDFBICNPF) alors CORR.TDFBICNPF1731 = TDFBICNPF; finsi +si present(DNPLOCIMPU) alors CORR.DNPLOCIMPU1731 = DNPLOCIMPU; finsi +si present(DEFBNCNP) alors CORR.DEFBNCNP1731 = DEFBNCNP; finsi +si present(TDEFBNCNP) alors CORR.TDEFBNCNP1731 = TDEFBNCNP; finsi +si present(DIDABNCNP1) alors CORR.DIDABNCNP11731 = DIDABNCNP1; finsi +si present(TDIDABNCNP1) alors CORR.TDIDABNCNP11731 = TDIDABNCNP1; finsi +si present(DEFBANI) alors CORR.DEFBANI1731 = DEFBANI; finsi +si present(DEFBANI470) alors CORR.DEFBANI4701731 = DEFBANI470; finsi +si present(DEFBANI470BIS) alors CORR.DEFBANI470BIS1731 = DEFBANI470BIS; finsi +si present(DEFBANIH470) alors CORR.DEFBANIH4701731 = DEFBANIH470; finsi +si present(DEFBNCNP470) alors CORR.DEFBNCNP4701731 = DEFBNCNP470; finsi +si present(DEFBNCNPH470) alors CORR.DEFBNCNPH4701731 = DEFBNCNPH470; finsi +si present(DEFBICNP470) alors CORR.DEFBICNP4701731 = DEFBICNP470; finsi +si present(DEFBICNPH470) alors CORR.DEFBICNPH4701731 = DEFBICNPH470; finsi +si present(TDEFBANI) alors CORR.TDEFBANI1731 = TDEFBANI; finsi +si present(SFDEFBANI) alors CORR.SFDEFBANI1731 = SFDEFBANI; finsi +si present(SFDEFBANI470) alors CORR.SFDEFBANI4701731 = SFDEFBANI470; finsi +si present(SFDEFBANIH470) alors CORR.SFDEFBANIH4701731 = SFDEFBANIH470; finsi +si present(DEFLOCNP) alors CORR.DEFLOCNP1731 = DEFLOCNP; finsi +si present(DEFLOCNPBIS) alors CORR.BIDON1731 = DEFLOCNPBIS; finsi +si present(BRCMBISB) alors CORR.BRCMBISB1731 = BRCMBISB; finsi +si present(BRCMBISQ) alors CORR.BRCMBISQ1731 = BRCMBISQ; finsi +si present(BRCMBIS) alors CORR.BRCM1731 = BRCMBIS; finsi +si present(BRCMQ) alors CORR.BRCMQ1731 = BRCMQ; finsi +si present(DEF4BB) alors CORR.DEF4BB1731 = DEF4BB; finsi +si present(DEF4BD) alors CORR.DEF4BD1731 = DEF4BD; finsi +si present(DEF4BC) alors CORR.DEF4BC1731 = DEF4BC; finsi +si present(TOTALQUO) alors CORR.TOTALQUO1731 = TOTALQUO; finsi +si present(SPENETPV) alors CORR.SPENETPV1731 = SPENETPV; finsi +si present(SPENETPC) alors CORR.SPENETPC1731 = SPENETPC; finsi +si present(SPENETPP) alors CORR.SPENETPP1731 = SPENETPP; finsi +si present(BNCPROPVV) alors CORR.BNCPROPVV1731 = BNCPROPVV; finsi +si present(BNCPROPVC) alors CORR.BNCPROPVC1731 = BNCPROPVC; finsi +si present(BNCPROPVP) alors CORR.BNCPROPVP1731 = BNCPROPVP; finsi +si present(MIBRNETV) alors CORR.MIBRNETV1731 = MIBRNETV; finsi +si present(MIBRNETC) alors CORR.MIBRNETC1731 = MIBRNETC; finsi +si present(MIBRNETP) alors CORR.MIBRNETP1731 = MIBRNETP; finsi +si present(MIBPVV) alors CORR.MIBPVV1731 = MIBPVV; finsi +si present(MIBPVC) alors CORR.MIBPVC1731 = MIBPVC; finsi +si present(MIBPVP) alors CORR.MIBPVP1731 = MIBPVP; finsi +si present(DFANTPROV) alors CORR.DFANTPROV1731 = DFANTPROV; finsi +si present(SFDFANTPROV) alors CORR.SFDFANTPROV1731 = SFDFANTPROV; finsi +si present(TDFANTPROV) alors CORR.TDFANTPROV1731 = TDFANTPROV; finsi +si present(TTSPRT) alors CORR.TTSPRT1731 = TTSPRT; finsi +si present(TSPRT) alors CORR.TSPRT1731 = TSPRT; finsi +si present(TSPRV) alors CORR.TSPRV1731 = TSPRV; finsi +si present(TSPRC) alors CORR.TSPRC1731 = TSPRC; finsi +si present(TSPRP) alors CORR.TSPRP1731 = TSPRP; finsi +si present(TTSPRV) alors CORR.TTSPRV1731 = TTSPRV; finsi +si present(TTSPRC) alors CORR.TTSPRC1731 = TTSPRC; finsi +si present(TTSPRP) alors CORR.TTSPRP1731 = TTSPRP; finsi +si present(SOMMEBA) alors CORR.SOMMEBA1731 = SOMMEBA; finsi +si present(SOMMEBIC) alors CORR.SOMMEBIC1731 = SOMMEBIC; finsi +si present(SOMMELOC) alors CORR.SOMMELOC1731 = SOMMELOC; finsi +si present(SOMMEBNC) alors CORR.SOMMEBNC1731 = SOMMEBNC; finsi +si present(SOMMERF) alors CORR.SOMMERF1731 = SOMMERF; finsi +si present(SOMMERCM) alors CORR.SOMMERCM1731 = SOMMERCM; finsi +si present(TSBV) alors CORR.TSBV1731 = TSBV; finsi +si present(TSBC) alors CORR.TSBC1731 = TSBC; finsi +si present(TSB1) alors CORR.TSB11731 = TSB1; finsi +si present(TSB2) alors CORR.TSB21731 = TSB2; finsi +si present(TSB3) alors CORR.TSB31731 = TSB3; finsi +si present(TSB4) alors CORR.TSB41731 = TSB4; finsi +si present(TSBP) alors CORR.TSBP1731 = TSBP; finsi +si present(SOMDEFLOC) alors CORR.DEFLOC1731 = SOMDEFLOC; finsi +si present(SOMBICDF) alors CORR.SOMBICDF1731 = SOMBICDF; finsi +si present(SOMLOCDF) alors CORR.SOMLOCDF1731 = SOMLOCDF; finsi +si present(SOMBADF) alors CORR.SOMBADF1731 = SOMBADF; finsi +si present(SOMBNCDF) alors CORR.SOMBNCDF1731 = SOMBNCDF; finsi +si present(RIDEFRI) alors CORR.RIDEFRI1731 = RIDEFRI; finsi +si present(RDOMSOC1) alors CORR.RDOMSOC11731 = RDOMSOC1; finsi +si present(RLOGSOC) alors CORR.RLOGSOC1731 = RLOGSOC; finsi +si present(RCOLENT) alors CORR.RCOLENT1731 = RCOLENT; finsi +si present(RLOCENT_1) alors CORR.RLOCENT1731 = RLOCENT_1; finsi +si present(COD2TT) alors CORR.COD2TT1731 = COD2TT; finsi +si present(RCM1) alors CORR.RCM1731 = RCM1; finsi +si present(RRIREP_1) alors CORR.RRIREP1731 = RRIREP_1; finsi +si present(BSURV) alors CORR.BSURV1731 = BSURV; finsi +si present(DEFIBA) alors CORR.DEFIBA1731 = DEFIBA; finsi +si present(DBAIP) alors CORR.DBAIP1731 = DBAIP; finsi +si present(LOCNPCF) alors CORR.LOCNPCF1731 = LOCNPCF; finsi +si present(NPLOCNETBIS) alors CORR.NPLOCNETBIS1731 = NPLOCNETBIS; finsi +si present(SOMDLOC) alors CORR.SOMDLOC1731 = SOMDLOC; finsi +si present(BICIFBIS) alors CORR.BICIFBIS1731 = BICIFBIS; finsi +si present(SOMDBIC) alors CORR.SOMDBIC1731 = SOMDBIC; finsi +si present(BICPROOF) alors CORR.BICPROOF1731 = BICPROOF; finsi +si present(BICPROQF) alors CORR.BICPROQF1731 = BICPROQF; finsi +si present(BICNPOCF) alors CORR.BICNPOCF1731 = BICNPOCF; finsi +si present(BICNPQCF) alors CORR.BICNPQCF1731 = BICNPQCF; finsi +si present(BACIFBIS) alors CORR.BACIFBIS1731 = BACIFBIS; finsi +si present(BAHQNODEFF) alors CORR.BAHQNODEFF1731 = BAHQNODEFF; finsi +si present(BAQNODEFF) alors CORR.BAQNODEFF1731 = BAQNODEFF; finsi +si present(BNCNPHQCF) alors CORR.BNCNPHQCF1731 = BNCNPHQCF; finsi +si present(BNCNPQCF) alors CORR.BNCNPQCF1731 = BNCNPQCF; finsi +si present(BNCPHQCF) alors CORR.BNCPHQCF1731 = BNCPHQCF; finsi +si present(BNCPQCF) alors CORR.BNCPQCF1731 = BNCPQCF; finsi +si present(RRBGPROV) alors CORR.RRBGPROV1731 = RRBGPROV; finsi +si present(DRCF) alors CORR.DRCF1731 = DRCF; finsi +si present(RFCE) alors CORR.RFCE1731 = RFCE; finsi +si present(RFCF) alors CORR.RFCF1731 = RFCF; finsi +si present(RFCD) alors CORR.RFCD1731 = RFCD; finsi +si present(DFCG) alors CORR.DFCG1731 = DFCG; finsi +si present(DFCE) alors CORR.DFCE1731 = DFCE; finsi +si present(RFCG) alors CORR.RFCG1731 = RFCG; finsi +si present(RFON) alors CORR.RFON1731 = RFON; finsi +si present(RMF) alors CORR.RMF1731 = RMF; finsi +si present(SOMDBNC) alors CORR.SOMDBNC1731 = SOMDBNC; finsi +si present(BNCIFBIS) alors CORR.BNCIFBIS1731 = BNCIFBIS; finsi +si present(RED_1) alors CORR.RED1731 = RED_1; finsi +si present(MLOCNET) alors CORR.MLOCNET1731 = MLOCNET; finsi +si present(NPLOCNETV) alors CORR.NPLOCNETV1731 = NPLOCNETV; finsi +si present(NPLOCNETC) alors CORR.NPLOCNETC1731 = NPLOCNETC; finsi +si present(NPLOCNETPAC) alors CORR.NPLOCNETPAC1731 = NPLOCNETPAC; finsi +si present(RGPROV) alors CORR.RGPROV1731 = RGPROV; finsi +si present(REVDON) alors CORR.REVDON1731 = REVDON; finsi +si present(DRFRP) alors CORR.DRFRP1731 = DRFRP; finsi +si present(RDONIFI_1) alors CORR.RDONIFI11731 = RDONIFI_1; finsi +si present(RDONIFI2_1) alors CORR.RDONIFI21731 = RDONIFI2_1; finsi +si present(IFIACT) alors CORR.IFIACT1731 = IFIACT; finsi +si present(AREHAB_1) alors CORR.AREHAB1731 = AREHAB_1; finsi +si present(APRESSE_1) alors CORR.APRESSE1731 = APRESSE_1; finsi +si present(AFORET_1) alors CORR.AFORET1731 = AFORET_1; finsi +si present(AFIPDOM_1) alors CORR.AFIPDOM1731 = AFIPDOM_1; finsi +si present(AFIPC_1) alors CORR.AFIPC1731 = AFIPC_1; finsi +si present(ACINE_1) alors CORR.ACINE1731 = ACINE_1; finsi +si present(BRENOV) alors CORR.BRENOV1731 = BRENOV; finsi +si present(ADUFREPFW_1) alors CORR.ADUFREPFW1731 = ADUFREPFW_1; finsi +si present(ADUFREPFX_1) alors CORR.ADUFREPFX1731 = ADUFREPFX_1; finsi +si present(ADUFREPFU_1) alors CORR.ADUFREPFU1731 = ADUFREPFU_1; finsi +si present(APIREPRB_1) alors CORR.APIREPRB1731 = APIREPRB_1; finsi +si present(APIREPRD_1) alors CORR.APIREPRD1731 = APIREPRD_1; finsi +si present(APIREPRF_1) alors CORR.APIREPRF1731 = APIREPRF_1; finsi +si present(APIREPRH_1) alors CORR.APIREPRH1731 = APIREPRH_1; finsi +si present(APIREPKM_1) alors CORR.APIREPKM1731 = APIREPKM_1; finsi +si present(APIREPMM_1) alors CORR.APIREPMM1731 = APIREPMM_1; finsi +si present(ANORMJB_1) alors CORR.ANORMJB1731 = ANORMJB_1; finsi +si present(ANORMJD_1) alors CORR.ANORMJD1731 = ANORMJD_1; finsi +si present(ACELRU_1) alors CORR.ACELRU1731 = ACELRU_1; finsi +si present(ACELRT_1) alors CORR.ACELRT1731 = ACELRT_1; finsi +si present(ATOUREPA_1) alors CORR.ATOUREPA1731 = ATOUREPA_1; finsi +si present(BAH) alors CORR.BAH1731 = BAH; finsi +si present(BAALIM) alors CORR.BAALIM1731 = BAALIM; finsi +si present(BSN1) alors CORR.BSN11731 = BSN1; finsi +si present(APENTCY_1) alors CORR.APENTCY1731 = APENTCY_1; finsi +si present(APENTDY_1) alors CORR.APENTDY1731 = APENTDY_1; finsi +si present(APENTEY_1) alors CORR.APENTEY1731 = APENTEY_1; finsi +si present(APENTFY_1) alors CORR.APENTFY1731 = APENTFY_1; finsi +si present(APENTGY_1) alors CORR.APENTGY1731 = APENTGY_1; finsi +si present(APENTEK_1) alors CORR.APENTEK1731 = APENTEK_1; finsi +si present(ASOFON_1) alors CORR.ASOFON1731 = ASOFON_1; finsi +si present(AILMPF_1) alors CORR.AILMPF1731 = AILMPF_1; finsi +si present(AILMHT_1) alors CORR.AILMHT1731 = AILMHT_1; finsi +si present(AILMPG_1) alors CORR.AILMPG1731 = AILMPG_1; finsi +si present(AILMHU_1) alors CORR.AILMHU1731 = AILMHU_1; finsi +si present(AILMPH_1) alors CORR.AILMPH1731 = AILMPH_1; finsi +si present(AILMHV_1) alors CORR.AILMHV1731 = AILMHV_1; finsi +si present(AILMPI_1) alors CORR.AILMPI1731 = AILMPI_1; finsi +si present(AILMHW_1) alors CORR.AILMHW1731 = AILMHW_1; finsi +si present(AILMPJ_1) alors CORR.AILMPJ1731 = AILMPJ_1; finsi +si present(AILMHX_1) alors CORR.AILMHX1731 = AILMHX_1; finsi +si present(AILMJY_1) alors CORR.AILMJY1731 = AILMJY_1; finsi +si present(AILMJX_1) alors CORR.AILMJX1731 = AILMJX_1; finsi +si present(AILMJW_1) alors CORR.AILMJW1731 = AILMJW_1; finsi +si present(AILMJV_1) alors CORR.AILMJV1731 = AILMJV_1; finsi +si present(AILMSA_1) alors CORR.AILMSA1731 = AILMSA_1; finsi +si present(AILMSB_1) alors CORR.AILMSB1731 = AILMSB_1; finsi +si present(AILMSC_1) alors CORR.AILMSC1731 = AILMSC_1; finsi +si present(AILMSN_1) alors CORR.AILMSN1731 = AILMSN_1; finsi +si present(AILMSO_1) alors CORR.AILMSO1731 = AILMSO_1; finsi +si present(AILMSP_1) alors CORR.AILMSP1731 = AILMSP_1; finsi +si present(ACODMZ_1) alors CORR.ACODMZ1731 = ACODMZ_1; finsi +si present(ACODPZ_1) alors CORR.ACODPZ1731 = ACODPZ_1; finsi +si present(ACODOU_1) alors CORR.ACODOU1731 = ACODOU_1; finsi +si present(ACODJTJU_1) alors CORR.ACODJTJU1731 = ACODJTJU_1; finsi +si present(BSOCREP) alors CORR.BSOCREP1731 = BSOCREP; finsi +si present(ARESTIMO_1) alors CORR.ARESTIMO1731 = ARESTIMO_1; finsi +si present(ARESTIMO1_1) alors CORR.ARESTIMO11731 = ARESTIMO1_1; finsi +si present(ADONS_1) alors CORR.ADONS1731 = ADONS_1; finsi +si present(BPRESCOMP) alors CORR.BPRESCOMP1731 = BPRESCOMP; finsi +si present(BDIFAGRI) alors CORR.BDIFAGRI1731 = BDIFAGRI; finsi +si present(ALOGDOM_1) alors CORR.ALOGDOM1731 = ALOGDOM_1; finsi +si present(RLOGDOM) alors CORR.RLOGDOM1731 = RLOGDOM; finsi +si present(ALOGSOC_1) alors CORR.ALOGSOC1731 = ALOGSOC_1; finsi +si present(ADOMSOC1_1) alors CORR.ADOMSOC11731 = ADOMSOC1_1; finsi +si present(ALOCENT_1) alors CORR.ALOCENT1731 = ALOCENT_1; finsi +si present(ACOLENT_1) alors CORR.ACOLENT1731 = ACOLENT_1; finsi +si present(RPRESSE_1) alors CORR.RPRESSE1731 = RPRESSE_1; finsi +si present(RFORET_1) alors CORR.RFORET1731 = RFORET_1; finsi +si present(RFIPDOM_1) alors CORR.RFIPDOM1731 = RFIPDOM_1; finsi +si present(RFIPC_1) alors CORR.RFIPC1731 = RFIPC_1; finsi +si present(RSURV_1) alors CORR.RSURV1731 = RSURV_1; finsi +si present(RCINE_1) alors CORR.RCINE1731 = RCINE_1; finsi +si present(RRIRENOV_1) alors CORR.RRIRENOV1731 = RRIRENOV_1; finsi +si present(RDUFREP_1) alors CORR.RDUFREP1731 = RDUFREP_1; finsi +si present(RPIREPRB_1) alors CORR.RPIREPRB1731 = RPIREPRB_1; finsi +si present(RPIREPRD_1) alors CORR.RPIREPRD1731 = RPIREPRD_1; finsi +si present(RPIREPRF_1) alors CORR.RPIREPRF1731 = RPIREPRF_1; finsi +si present(RPIREPRH_1) alors CORR.RPIREPRH1731 = RPIREPRH_1; finsi +si present(RPIREPKM_1) alors CORR.RPIREPKM1731 = RPIREPKM_1; finsi +si present(RNORMJB_1) alors CORR.RNORMJB1731 = RNORMJB_1; finsi +si present(RPIREPMM_1) alors CORR.RPIREPMM1731 = RPIREPMM_1; finsi +si present(RNORMJD_1) alors CORR.RNORMJD1731 = RNORMJD_1; finsi +si present(RPIVW_1) alors CORR.RPIVW1731 = RPIVW_1; finsi +si present(RPIVX_1) alors CORR.RPIVX1731 = RPIVX_1; finsi +si present(RPIVY_1) alors CORR.RPIVY1731 = RPIVY_1; finsi +si present(RPIVZ_1) alors CORR.RPIVZ1731 = RPIVZ_1; finsi +si present(RPISD_1) alors CORR.RPISD1731 = RPISD_1; finsi +si present(RPISE_1) alors CORR.RPISE1731 = RPISE_1; finsi +si present(RPISF_1) alors CORR.RPISF1731 = RPISF_1; finsi +si present(RPISG_1) alors CORR.RPISG1731 = RPISG_1; finsi +si present(RPIVD_1) alors CORR.RPIVD1731 = RPIVD_1; finsi +si present(RPIVE_1) alors CORR.RPIVE1731 = RPIVE_1; finsi +si present(RPIVF_1) alors CORR.RPIVF1731 = RPIVF_1; finsi +si present(RPIVG_1) alors CORR.RPIVG1731 = RPIVG_1; finsi +si present(RPIQR_1) alors CORR.RPIQR1731 = RPIQR_1; finsi +si present(RPIQS_1) alors CORR.RPIQS1731 = RPIQS_1; finsi +si present(RPIQT_1) alors CORR.RPIQT1731 = RPIQT_1; finsi +si present(RPIQU_1) alors CORR.RPIQU1731 = RPIQU_1; finsi +si present(RNORMGH_1) alors CORR.RNORMGH1731 = RNORMGH_1; finsi +si present(RNORMEF_1) alors CORR.RNORMEF1731 = RNORMEF_1; finsi +si present(RNORMCD_1) alors CORR.RNORMCD1731 = RNORMCD_1; finsi +si present(RNORMAB_1) alors CORR.RNORMAB1731 = RNORMAB_1; finsi +si present(RCELMO_1) alors CORR.RCELMO1731 = RCELMO_1; finsi +si present(RCELMP_1) alors CORR.RCELMP1731 = RCELMP_1; finsi +si present(RCELMQ_1) alors CORR.RCELMQ1731 = RCELMQ_1; finsi +si present(RCELMR_1) alors CORR.RCELMR1731 = RCELMR_1; finsi +si present(RCELZI_1) alors CORR.RCELZI1731 = RCELZI_1; finsi +si present(RCELZJ_1) alors CORR.RCELZJ1731 = RCELZJ_1; finsi +si present(RCELZK_1) alors CORR.RCELZK1731 = RCELZK_1; finsi +si present(RCELZL_1) alors CORR.RCELZL1731 = RCELZL_1; finsi +si present(RCELKC_1) alors CORR.RCELKC1731 = RCELKC_1; finsi +si present(RCELKD_1) alors CORR.RCELKD1731 = RCELKD_1; finsi +si present(RCELHZ_1) alors CORR.RCELHZ1731 = RCELHZ_1; finsi +si present(RCELKU_1) alors CORR.RCELKU1731 = RCELKU_1; finsi +si present(RCELKT_1) alors CORR.RCELKT1731 = RCELKT_1; finsi +si present(RCELKV_1) alors CORR.RCELKV1731 = RCELKV_1; finsi +si present(RCELRU_1) alors CORR.RCELRU1731 = RCELRU_1; finsi +si present(RCELRT_1) alors CORR.RCELRT1731 = RCELRT_1; finsi +si present(RHEBE_1) alors CORR.RHEBE1731 = RHEBE_1; finsi +si present(RREPA_1) alors CORR.RREPA1731 = RREPA_1; finsi +si present(RLOCANAH_1) alors CORR.RLOCANAH1731 = RLOCANAH_1; finsi +si present(RSNCV_1) alors CORR.RSNCV1731 = RSNCV_1; finsi +si present(RSNCA_1) alors CORR.RSNCA1731 = RSNCA_1; finsi +si present(RSNDC_1) alors CORR.RSNDC1731 = RSNDC_1; finsi +si present(RSNCT_1) alors CORR.RSNCT1731 = RSNCT_1; finsi +si present(RSNCW_1) alors CORR.RSNCW1731 = RSNCW_1; finsi +si present(RSNCU_1) alors CORR.RSNCU1731 = RSNCU_1; finsi +si present(RSNCO_1) alors CORR.RSNCO1731 = RSNCO_1; finsi +si present(RSNCP_1) alors CORR.RSNCP1731 = RSNCP_1; finsi +si present(RSNDP_1) alors CORR.RSNDP1731 = RSNDP_1; finsi +si present(RSNDO_1) alors CORR.RSNDO1731 = RSNDO_1; finsi +si present(RSNCQ_1) alors CORR.RSNCQ1731 = RSNCQ_1; finsi +si present(RSNCI_1) alors CORR.RSNCI1731 = RSNCI_1; finsi +si present(RSNBS_1) alors CORR.RSNBS1731 = RSNBS_1; finsi +si present(RSNBT_1) alors CORR.RSNBT1731 = RSNBT_1; finsi +si present(RSNBU_1) alors CORR.RSNBU1731 = RSNBU_1; finsi +si present(RSNBW_1) alors CORR.RSNBW1731 = RSNBW_1; finsi +si present(RSNGW_1) alors CORR.RSNGW1731 = RSNGW_1; finsi +si present(RNOUV_1) alors CORR.RNOUV1731 = RNOUV_1; finsi +si present(RPENTCY_1) alors CORR.RPENTCY1731 = RPENTCY_1; finsi +si present(RPENTDY_1) alors CORR.RPENTDY1731 = RPENTDY_1; finsi +si present(RPENTEY_1) alors CORR.RPENTEY1731 = RPENTEY_1; finsi +si present(RPENTFY_1) alors CORR.RPENTFY1731 = RPENTFY_1; finsi +si present(RPENTGY_1) alors CORR.RPENTGY1731 = RPENTGY_1; finsi +si present(RPENTEK_1) alors CORR.RPENTEK1731 = RPENTEK_1; finsi +si present(RILMHT_1) alors CORR.RILMHT1731 = RILMHT_1; finsi +si present(RILMHU_1) alors CORR.RILMHU1731 = RILMHU_1; finsi +si present(RILMHV_1) alors CORR.RILMHV1731 = RILMHV_1; finsi +si present(RILMHW_1) alors CORR.RILMHW1731 = RILMHW_1; finsi +si present(RILMHX_1) alors CORR.RILMHX1731 = RILMHX_1; finsi +si present(RILMSC_1) alors CORR.RILMSC1731 = RILMSC_1; finsi +si present(RILMSB_1) alors CORR.RILMSB1731 = RILMSB_1; finsi +si present(RILMSA_1) alors CORR.RILMSA1731 = RILMSA_1; finsi +si present(RILMSO_1) alors CORR.RILMSO1731 = RILMSO_1; finsi +si present(RILMSN_1) alors CORR.RILMSN1731 = RILMSN_1; finsi +si present(RILMSP_1) alors CORR.RILMSP1731 = RILMSP_1; finsi +si present(RCODPZ_1) alors CORR.RCODPZ1731 = RCODPZ_1; finsi +si present(RCODMZ_1) alors CORR.RCODMZ1731 = RCODMZ_1; finsi +si present(RSOCREPR_1) alors CORR.RSOCREPR1731 = RSOCREPR_1; finsi +si present(RCOD7KY_1) alors CORR.RCOD7KY1731 = RCOD7KY_1; finsi +si present(RCOD7KX_1) alors CORR.RCOD7KX1731 = RCOD7KX_1; finsi +si present(RCOD7KW_1) alors CORR.RCOD7KW1731 = RCOD7KW_1; finsi +si present(RRESTIMONX_1) alors CORR.RRESTIMONX1731 = RRESTIMONX_1; finsi +si present(RRESTIMONY_1) alors CORR.RRESTIMONY1731 = RRESTIMONY_1; finsi +si present(RRESTIMO_1) alors CORR.RRESTIMO1731 = RRESTIMO_1; finsi +si present(RRESTIMO1_1) alors CORR.RRESTIMO11731 = RRESTIMO1_1; finsi +si present(RDONS_1) alors CORR.RDONS1731 = RDONS_1; finsi +si present(RIETR_1) alors CORR.RIETR1731 = RIETR_1; finsi +si present(RDONDJ_1) alors CORR.RDONDJ1731 = RDONDJ_1; finsi +si present(RDONDO_1) alors CORR.RDONDO1731 = RDONDO_1; finsi +si present(BADONJ) alors CORR.BADONJ1731 = BADONJ; finsi +si present(BADONO) alors CORR.BADONO1731 = BADONO; finsi +si present(RRETU_1) alors CORR.RRETU1731 = RRETU_1; finsi +si present(RINNO_1) alors CORR.RINNO1731 = RINNO_1; finsi +si present(RRPRESCOMP_1) alors CORR.RRPRESCOMP1731 = RRPRESCOMP_1; finsi +si present(RDIFAGRI_1) alors CORR.RDIFAGRI1731 = RDIFAGRI_1; finsi +si present(RREHAB_1) alors CORR.RREHAB1731 = RREHAB_1; finsi +si present(A10RFOR_1) alors CORR.A10RFOR1731 = A10RFOR_1; finsi +si present(RLOG01_1) alors CORR.RLOG011731 = RLOG01_1; finsi +si present(RLOG02_1) alors CORR.RLOG021731 = RLOG02_1; finsi +si present(RLOG01_1) alors CORR.RLOG031731 = RLOG01_1; finsi +si present(RLOG04_1) alors CORR.RLOG041731 = RLOG04_1; finsi +si present(RLOG05_1) alors CORR.RLOG051731 = RLOG05_1; finsi +si present(RLOG06_1) alors CORR.RLOG061731 = RLOG06_1; finsi +si present(RLOG07_1) alors CORR.RLOG071731 = RLOG07_1; finsi +si present(RLOG08_1) alors CORR.RLOG081731 = RLOG08_1; finsi +si present(RLOG09_1) alors CORR.RLOG091731 = RLOG09_1; finsi +si present(RLOG10_1) alors CORR.RLOG101731 = RLOG10_1; finsi +si present(RLOG11_1) alors CORR.RLOG111731 = RLOG11_1; finsi +si present(RLOG12_1) alors CORR.RLOG121731 = RLOG12_1; finsi +si present(RLOG13_1) alors CORR.RLOG131731 = RLOG13_1; finsi +si present(RLOG14_1) alors CORR.RLOG141731 = RLOG14_1; finsi +si present(RLOG15_1) alors CORR.RLOG151731 = RLOG15_1; finsi +si present(RLOG16_1) alors CORR.RLOG161731 = RLOG16_1; finsi +si present(RLOG17_1) alors CORR.RLOG171731 = RLOG17_1; finsi +si present(RLOG18_1) alors CORR.RLOG181731 = RLOG18_1; finsi +si present(RLOG19_1) alors CORR.RLOG191731 = RLOG19_1; finsi +si present(RLOG20_1) alors CORR.RLOG201731 = RLOG20_1; finsi +si present(RLOG21_1) alors CORR.RLOG211731 = RLOG21_1; finsi +si present(RLOG22_1) alors CORR.RLOG221731 = RLOG22_1; finsi +si present(RLOG23_1) alors CORR.RLOG231731 = RLOG23_1; finsi +si present(RLOG24_1) alors CORR.RLOG241731 = RLOG24_1; finsi +si present(RLOG25_1) alors CORR.RLOG251731 = RLOG25_1; finsi +si present(RLOG26_1) alors CORR.RLOG261731 = RLOG26_1; finsi +si present(RLOG27_1) alors CORR.RLOG271731 = RLOG27_1; finsi +si present(RLOG28_1) alors CORR.RLOG281731 = RLOG28_1; finsi +si present(RLOG29_1) alors CORR.RLOG291731 = RLOG29_1; finsi +si present(RLOG30_1) alors CORR.RLOG301731 = RLOG30_1; finsi +si present(RLOG31_1) alors CORR.RLOG311731 = RLOG31_1; finsi +si present(RLOG32_1) alors CORR.RLOG321731 = RLOG32_1; finsi +si present(RLOG33_1) alors CORR.RLOG331731 = RLOG33_1; finsi +si present(RLOG34_1) alors CORR.RLOG341731 = RLOG34_1; finsi +si present(RLOG35_1) alors CORR.RLOG351731 = RLOG35_1; finsi +si present(RLOG36_1) alors CORR.RLOG361731 = RLOG36_1; finsi +si present(RLOG37_1) alors CORR.RLOG371731 = RLOG37_1; finsi +si present(RLOG38_1) alors CORR.RLOG381731 = RLOG38_1; finsi +si present(RLOG39_1) alors CORR.RLOG391731 = RLOG39_1; finsi +si present(RLOG40_1) alors CORR.RLOG401731 = RLOG40_1; finsi +si present(RLOG41_1) alors CORR.RLOG411731 = RLOG41_1; finsi +si present(RLOG42_1) alors CORR.RLOG421731 = RLOG42_1; finsi +si present(RLOG43_1) alors CORR.RLOG431731 = RLOG43_1; finsi +si present(RLOG44_1) alors CORR.RLOG441731 = RLOG44_1; finsi +si present(RLOG45_1) alors CORR.RLOG451731 = RLOG45_1; finsi +si present(RLOG46_1) alors CORR.RLOG461731 = RLOG46_1; finsi +si present(RLOG47_1) alors CORR.RLOG471731 = RLOG47_1; finsi +si present(RLOG48_1) alors CORR.RLOG481731 = RLOG48_1; finsi +si present(RLOG49_1) alors CORR.RLOG491731 = RLOG49_1; finsi +si present(RLOG50_1) alors CORR.RLOG501731 = RLOG50_1; finsi +si present(RLOG51_1) alors CORR.RLOG511731 = RLOG51_1; finsi +si present(RLOG52_1) alors CORR.RLOG521731 = RLOG52_1; finsi +si present(RLOG53_1) alors CORR.RLOG531731 = RLOG53_1; finsi +si present(RLOG54_1) alors CORR.RLOG541731 = RLOG54_1; finsi +si present(RLOG55_1) alors CORR.RLOG551731 = RLOG55_1; finsi +si present(RLOG56_1) alors CORR.RLOG561731 = RLOG56_1; finsi +si present(RLOG57_1) alors CORR.RLOG571731 = RLOG57_1; finsi +si present(RLOG58_1) alors CORR.RLOG581731 = RLOG58_1; finsi +si present(RLOG59_1) alors CORR.RLOG591731 = RLOG59_1; finsi +si present(RLOG60_1) alors CORR.RLOG601731 = RLOG60_1; finsi +si present(RLOGHVK_1) alors CORR.RLOGHVK1731 = RLOGHVK_1; finsi +si present(RLOGHVL_1) alors CORR.RLOGHVL1731 = RLOGHVL_1; finsi +si present(RLOGHVM_1) alors CORR.RLOGHVM1731 = RLOGHVM_1; finsi +si present(RLOGHVN_1) alors CORR.RLOGHVN1731 = RLOGHVN_1; finsi +si present(RLOGHVO_1) alors CORR.RLOGHVO1731 = RLOGHVO_1; finsi +si present(RSOC35_1) alors CORR.RSOC351731 = RSOC35_1; finsi +si present(RSOC36_1) alors CORR.RSOC361731 = RSOC36_1; finsi +si present(RSOC37_1) alors CORR.RSOC371731 = RSOC37_1; finsi +si present(RSOC38_1) alors CORR.RSOC381731 = RSOC38_1; finsi +si present(RSOC39_1) alors CORR.RSOC391731 = RSOC39_1; finsi +si present(RSOC40_1) alors CORR.RSOC401731 = RSOC40_1; finsi +si present(RSOC41_1) alors CORR.RSOC411731 = RSOC41_1; finsi +si present(RSOC42_1) alors CORR.RSOC421731 = RSOC42_1; finsi +si present(RSOC43_1) alors CORR.RSOC431731 = RSOC43_1; finsi +si present(RSOC44_1) alors CORR.RSOC441731 = RSOC44_1; finsi +si present(RSOCHYH_1) alors CORR.RSOCHYH1731 = RSOCHYH_1; finsi +si present(RSOCHYHR_1) alors CORR.RSOCHYHR1731 = RSOCHYHR_1; finsi +si present(RSOCHYI_1) alors CORR.RSOCHYI1731 = RSOCHYI_1; finsi +si present(RSOCHYIR_1) alors CORR.RSOCHYIR1731 = RSOCHYIR_1; finsi +si present(RSOCHYJ_1) alors CORR.RSOCHYJ1731 = RSOCHYJ_1; finsi +si present(RSOCHYJR_1) alors CORR.RSOCHYJR1731 = RSOCHYJR_1; finsi +si present(RSOCHYE_1) alors CORR.RSOCHYE1731 = RSOCHYE_1; finsi +si present(RSOCHYER_1) alors CORR.RSOCHYER1731 = RSOCHYER_1; finsi +si present(RSOCHYF_1) alors CORR.RSOCHYF1731 = RSOCHYF_1; finsi +si present(RSOCHYFR_1) alors CORR.RSOCHYFR1731 = RSOCHYFR_1; finsi +si present(RSOCHYG_1) alors CORR.RSOCHYG1731 = RSOCHYG_1; finsi +si present(RSOCHYGR_1) alors CORR.RSOCHYGR1731 = RSOCHYGR_1; finsi +si present(RLOCHGT_1) alors CORR.RLOCHGT1731 = RLOCHGT_1; finsi +si present(RLOCHGS_1) alors CORR.RLOCHGS1731 = RLOCHGS_1; finsi +si present(RLOCHGU_1) alors CORR.RLOCHGU1731 = RLOCHGU_1; finsi +si present(RLOCHGW_1) alors CORR.RLOCHGW1731 = RLOCHGW_1; finsi +si present(RLOCHGTR_1) alors CORR.RLOCHGTR1731 = RLOCHGTR_1; finsi +si present(RLOCHGSR_1) alors CORR.RLOCHGSR1731 = RLOCHGSR_1; finsi +si present(RLOCHHT_1) alors CORR.RLOCHHT1731 = RLOCHHT_1; finsi +si present(RLOCHHS_1) alors CORR.RLOCHHS1731 = RLOCHHS_1; finsi +si present(RLOCHHU_1) alors CORR.RLOCHHU1731 = RLOCHHU_1; finsi +si present(RLOCHHW_1) alors CORR.RLOCHHW1731 = RLOCHHW_1; finsi +si present(RLOCHHTR_1) alors CORR.RLOCHHTR1731 = RLOCHHTR_1; finsi +si present(RLOCHHSR_1) alors CORR.RLOCHHSR1731 = RLOCHHSR_1; finsi +si present(RLOCHIT_1) alors CORR.RLOCHIT1731 = RLOCHIT_1; finsi +si present(RLOCHIS_1) alors CORR.RLOCHIS1731 = RLOCHIS_1; finsi +si present(RLOCHIU_1) alors CORR.RLOCHIU1731 = RLOCHIU_1; finsi +si present(RLOCHIW_1) alors CORR.RLOCHIW1731 = RLOCHIW_1; finsi +si present(RLOCHITR_1) alors CORR.RLOCHITR1731 = RLOCHITR_1; finsi +si present(RLOCHISR_1) alors CORR.RLOCHISR1731 = RLOCHISR_1; finsi +si present(RLOCHJS_1) alors CORR.RLOCHJS1731 = RLOCHJS_1; finsi +si present(RLOCHJSR_1) alors CORR.RLOCHJSR1731 = RLOCHJSR_1; finsi +si present(RLOCHJT_1) alors CORR.RLOCHJT1731 = RLOCHJT_1; finsi +si present(RLOCHJTR_1) alors CORR.RLOCHJTR1731 = RLOCHJTR_1; finsi +si present(RLOCHJU_1) alors CORR.RLOCHJU1731 = RLOCHJU_1; finsi +si present(RLOCHJW_1) alors CORR.RLOCHJW1731 = RLOCHJW_1; finsi +si present(RLOCHKS_1) alors CORR.RLOCHKS1731 = RLOCHKS_1; finsi +si present(RLOCHKSR_1) alors CORR.RLOCHKSR1731 = RLOCHKSR_1; finsi +si present(RLOCHKT_1) alors CORR.RLOCHKT1731 = RLOCHKT_1; finsi +si present(RLOCHKTR_1) alors CORR.RLOCHKTR1731 = RLOCHKTR_1; finsi +si present(RLOCHKU_1) alors CORR.RLOCHKU1731 = RLOCHKU_1; finsi +si present(RLOCHKW_1) alors CORR.RLOCHKW1731 = RLOCHKW_1; finsi +si present(RLOCHLS_1) alors CORR.RLOCHLS1731 = RLOCHLS_1; finsi +si present(RLOCHLSR_1) alors CORR.RLOCHLSR1731 = RLOCHLSR_1; finsi +si present(RLOCHLT_1) alors CORR.RLOCHLT1731 = RLOCHLT_1; finsi +si present(RLOCHLTR_1) alors CORR.RLOCHLTR1731 = RLOCHLTR_1; finsi +si present(RLOCHLU_1) alors CORR.RLOCHLU1731 = RLOCHLU_1; finsi +si present(RLOCHLW_1) alors CORR.RLOCHLW1731 = RLOCHLW_1; finsi +si present(RSC303_1) alors CORR.RSC3031731 = RSC303_1; finsi +si present(RSC304_1) alors CORR.RSC3041731 = RSC304_1; finsi +si present(RSC305_1) alors CORR.RSC3051731 = RSC305_1; finsi +si present(RSC306_1) alors CORR.RSC3061731 = RSC306_1; finsi +si present(RSC310_1) alors CORR.RSC3101731 = RSC310_1; finsi +si present(RSC311_1) alors CORR.RSC3111731 = RSC311_1; finsi +si present(RSC312_1) alors CORR.RSC3121731 = RSC312_1; finsi +si present(RSC7PY_1) alors CORR.RSC7PY1731 = RSC7PY_1; finsi +si present(RSC7PJ_1) alors CORR.RSC7PJ1731 = RSC7PJ_1; finsi +si present(RSC7PI_1) alors CORR.RSC7PI1731 = RSC7PI_1; finsi +si present(RSC7OO_1) alors CORR.RSC7OO1731 = RSC7OO_1; finsi +si present(RSC7PA_1) alors CORR.RSC7PA1731 = RSC7PA_1; finsi +si present(RSC7PB_1) alors CORR.RSC7PB1731 = RSC7PB_1; finsi +si present(RSC7PH_1) alors CORR.RSC7PH1731 = RSC7PH_1; finsi +si present(RSC7AI_1) alors CORR.RSC7AI1731 = RSC7AI_1; finsi +si present(RSC7AP_1) alors CORR.RSC7AP1731 = RSC7AP_1; finsi +si present(RSC7AQ_1) alors CORR.RSC7AQ1731 = RSC7AQ_1; finsi +si present(RSC7OK_1) alors CORR.RSC7OK1731 = RSC7OK_1; finsi +si present(RSC7OL_1) alors CORR.RSC7OL1731 = RSC7OL_1; finsi +si present(RSC7OM_1) alors CORR.RSC7OM1731 = RSC7OM_1; finsi +si present(RSC7ON_1) alors CORR.RSC7ON1731 = RSC7ON_1; finsi +si present(RSC7OX_1) alors CORR.RSC7OX1731 = RSC7OX_1; finsi +si present(RSC7AR_1) alors CORR.RSC7AR1731 = RSC7AR_1; finsi +si present(RSC7AS_1) alors CORR.RSC7AS1731 = RSC7AS_1; finsi +si present(RSC7AT_1) alors CORR.RSC7AT1731 = RSC7AT_1; finsi +si present(RSC7AU_1) alors CORR.RSC7AU1731 = RSC7AU_1; finsi +si present(RSC7YV_1) alors CORR.RSC7YV1731 = RSC7YV_1; finsi +si present(RSC7YU_1) alors CORR.RSC7YU1731 = RSC7YU_1; finsi +si present(RSC7YT_1) alors CORR.RSC7YT1731 = RSC7YT_1; finsi +si present(RSC7YS_1) alors CORR.RSC7YS1731 = RSC7YS_1; finsi +si present(RSC7YR_1) alors CORR.RSC7YR1731 = RSC7YR_1; finsi +si present(RSC7XK_1) alors CORR.RSC7XK1731 = RSC7XK_1; finsi +si present(RSC7XO_1) alors CORR.RSC7XO1731 = RSC7XO_1; finsi +si present(RSC7XP_1) alors CORR.RSC7XP1731 = RSC7XP_1; finsi +si present(RSC7XQ_1) alors CORR.RSC7XQ1731 = RSC7XQ_1; finsi +si present(ASC614_1) alors CORR.ASC6141731 = ASC614_1; finsi +si present(RSC614_1) alors CORR.RSC6141731 = RSC614_1; finsi +si present(ASC615_1) alors CORR.ASC6151731 = ASC615_1; finsi +si present(RSC615_1) alors CORR.RSC6151731 = RSC615_1; finsi +si present(ASC616_1) alors CORR.ASC6161731 = ASC616_1; finsi +si present(RSC616_1) alors CORR.RSC6161731 = RSC616_1; finsi +si present(ASC617_1) alors CORR.ASC6171731 = ASC617_1; finsi +si present(RSC617_1) alors CORR.RSC6171731 = RSC617_1; finsi +si present(ASC618_1) alors CORR.ASC6181731 = ASC618_1; finsi +si present(RSC618_1) alors CORR.RSC6181731 = RSC618_1; finsi +si present(ASC619_1) alors CORR.ASC6191731 = ASC619_1; finsi +si present(RSC619_1) alors CORR.RSC6191731 = RSC619_1; finsi +si present(ASC620_1) alors CORR.ASC6201731 = ASC620_1; finsi +si present(RSC620_1) alors CORR.RSC6201731 = RSC620_1; finsi +si present(ASC621_1) alors CORR.ASC6211731 = ASC621_1; finsi +si present(RSC621_1) alors CORR.RSC6211731 = RSC621_1; finsi +si present(ASC622_1) alors CORR.ASC6221731 = ASC622_1; finsi +si present(RSC622_1) alors CORR.RSC6221731 = RSC622_1; finsi +si present(ASC623_1) alors CORR.ASC6231731 = ASC623_1; finsi +si present(RSC623_1) alors CORR.RSC6231731 = RSC623_1; finsi +si present(ASC7SJ_1) alors CORR.ASC7SJ1731 = ASC7SJ_1; finsi +si present(RSC7SJ_1) alors CORR.RSC7SJ1731 = RSC7SJ_1; finsi +si present(ASC7SK_1) alors CORR.ASC7SK1731 = ASC7SK_1; finsi +si present(RSC7SK_1) alors CORR.RSC7SK1731 = RSC7SK_1; finsi +si present(ASC7SR_1) alors CORR.ASC7SR1731 = ASC7SR_1; finsi +si present(RSC7SR_1) alors CORR.RSC7SR1731 = RSC7SR_1; finsi +si present(ASC7TC_1) alors CORR.ASC7TC1731 = ASC7TC_1; finsi +si present(RSC7TC_1) alors CORR.RSC7TC1731 = RSC7TC_1; finsi +si present(ASC7TD_1) alors CORR.ASC7TD1731 = ASC7TD_1; finsi +si present(RSC7TD_1) alors CORR.RSC7TD1731 = RSC7TD_1; finsi +si present(ASC7UA_1) alors CORR.ASC7UA1731 = ASC7UA_1; finsi +si present(RSC7UA_1) alors CORR.RSC7UA1731 = RSC7UA_1; finsi +si present(ASC7UB_1) alors CORR.ASC7UB1731 = ASC7UB_1; finsi +si present(RSC7UB_1) alors CORR.RSC7UB1731 = RSC7UB_1; finsi +si present(ASC7UE_1) alors CORR.ASC7UE1731 = ASC7UE_1; finsi +si present(RSC7UE_1) alors CORR.RSC7UE1731 = RSC7UE_1; finsi +si present(ASC7UG_1) alors CORR.ASC7UG1731 = ASC7UG_1; finsi +si present(RSC7UG_1) alors CORR.RSC7UG1731 = RSC7UG_1; finsi +si present(ASC7UI_1) alors CORR.ASC7UI1731 = ASC7UI_1; finsi +si present(RSC7UI_1) alors CORR.RSC7UI1731 = RSC7UI_1; finsi +si present(ASC7UK_1) alors CORR.ASC7UK1731 = ASC7UK_1; finsi +si present(RSC7UK_1) alors CORR.RSC7UK1731 = RSC7UK_1; finsi +si present(ASC7QA_1) alors CORR.ASC7QA1731 = ASC7QA_1; finsi +si present(RSC7QA_1) alors CORR.RSC7QA1731 = RSC7QA_1; finsi +si present(ASC7QB_1) alors CORR.ASC7QB1731 = ASC7QB_1; finsi +si present(RSC7QB_1) alors CORR.RSC7QB1731 = RSC7QB_1; finsi +si present(ASC7QC_1) alors CORR.ASC7QC1731 = ASC7QC_1; finsi +si present(RSC7QC_1) alors CORR.RSC7QC1731 = RSC7QC_1; finsi +si present(ASC7QD_1) alors CORR.ASC7QD1731 = ASC7QD_1; finsi +si present(RSC7QD_1) alors CORR.RSC7QD1731 = RSC7QD_1; finsi +si present(ASC7QE_1) alors CORR.ASC7QE1731 = ASC7QE_1; finsi +si present(RSC7QE_1) alors CORR.RSC7QE1731 = RSC7QE_1; finsi +si present(ASC7QG_1) alors CORR.ASC7QG1731 = ASC7QG_1; finsi +si present(RSC7QG_1) alors CORR.RSC7QG1731 = RSC7QG_1; finsi +si present(ASC7QQ_1) alors CORR.ASC7QQ1731 = ASC7QQ_1; finsi +si present(RSC7QQ_1) alors CORR.RSC7QQ1731 = RSC7QQ_1; finsi +si present(ASC7QW_1) alors CORR.ASC7QW1731 = ASC7QW_1; finsi +si present(RSC7QW_1) alors CORR.RSC7QW1731 = RSC7QW_1; finsi +si present(ASC7QX_1) alors CORR.ASC7QX1731 = ASC7QX_1; finsi +si present(RSC7QX_1) alors CORR.RSC7QX1731 = RSC7QX_1; finsi +si present(ASC7QY_1) alors CORR.ASC7QY1731 = ASC7QY_1; finsi +si present(RSC7QY_1) alors CORR.RSC7QY1731 = RSC7QY_1; finsi +si present(ASC7QZ_1) alors CORR.ASC7QZ1731 = ASC7QZ_1; finsi +si present(RSC7QZ_1) alors CORR.RSC7QZ1731 = RSC7QZ_1; finsi +si present(ASC7RA_1) alors CORR.ASC7RA1731 = ASC7RA_1; finsi +si present(RSC7RA_1) alors CORR.RSC7RA1731 = RSC7RA_1; finsi +si present(ASC7RC_1) alors CORR.ASC7RC1731 = ASC7RC_1; finsi +si present(RSC7RC_1) alors CORR.RSC7RC1731 = RSC7RC_1; finsi +si present(ASC7EH_1) alors CORR.ASC7EH1731 = ASC7EH_1; finsi +si present(RSC7EH_1) alors CORR.RSC7EH1731 = RSC7EH_1; finsi +si present(ASC7EI_1) alors CORR.ASC7EI1731 = ASC7EI_1; finsi +si present(RSC7EI_1) alors CORR.RSC7EI1731 = RSC7EI_1; finsi +si present(ASC7EU_1) alors CORR.ASC7EU1731 = ASC7EU_1; finsi +si present(RSC7EU_1) alors CORR.RSC7EU1731 = RSC7EU_1; finsi +si present(ASC7EZ_1) alors CORR.ASC7EZ1731 = ASC7EZ_1; finsi +si present(RSC7EZ_1) alors CORR.RSC7EZ1731 = RSC7EZ_1; finsi +si present(ASC7FB_1) alors CORR.ASC7FB1731 = ASC7FB_1; finsi +si present(RSC7FB_1) alors CORR.RSC7FB1731 = RSC7FB_1; finsi +si present(ASC7FE_1) alors CORR.ASC7FE1731 = ASC7FE_1; finsi +si present(RSC7FE_1) alors CORR.RSC7FE1731 = RSC7FE_1; finsi +si present(ASC7FI_1) alors CORR.ASC7FI1731 = ASC7FI_1; finsi +si present(RSC7FI_1) alors CORR.RSC7FI1731 = RSC7FI_1; finsi +si present(ASC7FK_1) alors CORR.ASC7FK1731 = ASC7FK_1; finsi +si present(RSC7FK_1) alors CORR.RSC7FK1731 = RSC7FK_1; finsi +si present(AILMHD_1) alors CORR.AILMHD1731 = AILMHD_1; finsi +si present(RILMHD_1) alors CORR.RILMHD1731 = RILMHD_1; finsi +si present(AILMHE_1) alors CORR.AILMHE1731 = AILMHE_1; finsi +si present(RILMHE_1) alors CORR.RILMHE1731 = RILMHE_1; finsi +si present(AILMHF_1) alors CORR.AILMHF1731 = AILMHF_1; finsi +si present(RILMHF_1) alors CORR.RILMHF1731 = RILMHF_1; finsi +si present(AILMHG_1) alors CORR.AILMHG1731 = AILMHG_1; finsi +si present(RILMHG_1) alors CORR.RILMHG1731 = RILMHG_1; finsi +si present(AILMHH_1) alors CORR.AILMHH1731 = AILMHH_1; finsi +si present(RILMHH_1) alors CORR.RILMHH1731 = RILMHH_1; finsi +si present(AILMKE_1) alors CORR.AILMKE1731 = AILMKE_1; finsi +si present(RILMKE_1) alors CORR.RILMKE1731 = RILMKE_1; finsi +si present(AILMKF_1) alors CORR.AILMKF1731 = AILMKF_1; finsi +si present(RILMKF_1) alors CORR.RILMKF1731 = RILMKF_1; finsi +si present(AILMKG_1) alors CORR.AILMKG1731 = AILMKG_1; finsi +si present(RILMKG_1) alors CORR.RILMKG1731 = RILMKG_1; finsi +si present(AILMKH_1) alors CORR.AILMKH1731 = AILMKH_1; finsi +si present(RILMKH_1) alors CORR.RILMKH1731 = RILMKH_1; finsi +si present(AILMKI_1) alors CORR.AILMKI1731 = AILMKI_1; finsi +si present(RILMKI_1) alors CORR.RILMKI1731 = RILMKI_1; finsi +si present(AILMOA_1) alors CORR.AILMOA1731 = AILMOA_1; finsi +si present(RILMOA_1) alors CORR.RILMOA1731 = RILMOA_1; finsi +si present(AILMOB_1) alors CORR.AILMOB1731 = AILMOB_1; finsi +si present(RILMOB_1) alors CORR.RILMOB1731 = RILMOB_1; finsi +si present(AILMOC_1) alors CORR.AILMOC1731 = AILMOC_1; finsi +si present(RILMOC_1) alors CORR.RILMOC1731 = RILMOC_1; finsi +si present(AILMOD_1) alors CORR.AILMOD1731 = AILMOD_1; finsi +si present(RILMOD_1) alors CORR.RILMOD1731 = RILMOD_1; finsi +si present(AILMOE_1) alors CORR.AILMOE1731 = AILMOE_1; finsi +si present(RILMOE_1) alors CORR.RILMOE1731 = RILMOE_1; finsi +si present(AILMPO_1) alors CORR.AILMPO1731 = AILMPO_1; finsi +si present(RILMPO_1) alors CORR.RILMPO1731 = RILMPO_1; finsi +si present(AILMPP_1) alors CORR.AILMPP1731 = AILMPP_1; finsi +si present(RILMPP_1) alors CORR.RILMPP1731 = RILMPP_1; finsi +si present(AILMPQ_1) alors CORR.AILMPQ1731 = AILMPQ_1; finsi +si present(RILMPQ_1) alors CORR.RILMPQ1731 = RILMPQ_1; finsi +si present(AILMPR_1) alors CORR.AILMPR1731 = AILMPR_1; finsi +si present(RILMPR_1) alors CORR.RILMPR1731 = RILMPR_1; finsi +si present(AILMPS_1) alors CORR.AILMPS1731 = AILMPS_1; finsi +si present(RILMPS_1) alors CORR.RILMPS1731 = RILMPS_1; finsi +si present(AILMPT_1) alors CORR.AILMPT1731 = AILMPT_1; finsi +si present(RILMPT_1) alors CORR.RILMPT1731 = RILMPT_1; finsi +si present(AILMPU_1) alors CORR.AILMPU1731 = AILMPU_1; finsi +si present(RILMPU_1) alors CORR.RILMPU1731 = RILMPU_1; finsi +si present(AILMPV_1) alors CORR.AILMPV1731 = AILMPV_1; finsi +si present(RILMPV_1) alors CORR.RILMPV1731 = RILMPV_1; finsi +si present(AILMPW_1) alors CORR.AILMPW1731 = AILMPW_1; finsi +si present(RILMPW_1) alors CORR.RILMPW1731 = RILMPW_1; finsi +si present(AILMPX_1) alors CORR.AILMPX1731 = AILMPX_1; finsi +si present(RILMPX_1) alors CORR.RILMPX1731 = RILMPX_1; finsi +si present(APIREPJN_1) alors CORR.APIREPJN1731 = APIREPJN_1; finsi +si present(RPIJN_1) alors CORR.RPIJN1731 = RPIJN_1; finsi +si present(APIREPJO_1) alors CORR.APIREPJO1731 = APIREPJO_1; finsi +si present(RPIJO_1) alors CORR.RPIJO1731 = RPIJO_1; finsi +si present(APIREPJP_1) alors CORR.APIREPJP1731 = APIREPJP_1; finsi +si present(RPIJP_1) alors CORR.RPIJP1731 = RPIJP_1; finsi +si present(APIREPJQ_1) alors CORR.APIREPJQ1731 = APIREPJQ_1; finsi +si present(RPIJQ_1) alors CORR.RPIJQ1731 = RPIJQ_1; finsi +si present(APIJV_1) alors CORR.APIJV1731 = APIJV_1; finsi +si present(RPIJV_1) alors CORR.RPIJV1731 = RPIJV_1; finsi +si present(APIJW_1) alors CORR.APIJW1731 = APIJW_1; finsi +si present(RPIJW_1) alors CORR.RPIJW1731 = RPIJW_1; finsi +si present(APIJX_1) alors CORR.APIJX1731 = APIJX_1; finsi +si present(RPIJX_1) alors CORR.RPIJX1731 = RPIJX_1; finsi +si present(APIJY_1) alors CORR.APIJY1731 = APIJY_1; finsi +si present(RPIJY_1) alors CORR.RPIJY1731 = RPIJY_1; finsi +si present(ANORMJR_1) alors CORR.ANORMJR1731 = ANORMJR_1; finsi +si present(RNORMJR_1) alors CORR.RNORMJR1731 = RNORMJR_1; finsi +si present(ANORMJS_1) alors CORR.ANORMJS1731 = ANORMJS_1; finsi +si present(RNORMJS_1) alors CORR.RNORMJS1731 = RNORMJS_1; finsi +si present(ANORMJT_1) alors CORR.ANORMJT1731 = ANORMJT_1; finsi +si present(RNORMJT_1) alors CORR.RNORMJT1731 = RNORMJT_1; finsi +si present(ANORMJU_1) alors CORR.ANORMJU1731 = ANORMJU_1; finsi +si present(RNORMJU_1) alors CORR.RNORMJU1731 = RNORMJU_1; finsi +si present(ANORMLG_1) alors CORR.ANORMLG1731 = ANORMLG_1; finsi +si present(RNORMLG_1) alors CORR.RNORMLG1731 = RNORMLG_1; finsi +si present(ANORMLH_1) alors CORR.ANORMLH1731 = ANORMLH_1; finsi +si present(RNORMLH_1) alors CORR.RNORMLH1731 = RNORMLH_1; finsi +si present(ANORMLI_1) alors CORR.ANORMLI1731 = ANORMLI_1; finsi +si present(RNORMLI_1) alors CORR.RNORMLI1731 = RNORMLI_1; finsi +si present(ANORMLJ_1) alors CORR.ANORMLJ1731 = ANORMLJ_1; finsi +si present(RNORMLJ_1) alors CORR.RNORMLJ1731 = RNORMLJ_1; finsi +si present(ANOJE_1) alors CORR.ANOJE1731 = ANOJE_1; finsi +si present(RNOJE_1) alors CORR.RNOJE1731 = RNOJE_1; finsi +si present(ANOJF_1) alors CORR.ANOJF1731 = ANOJF_1; finsi +si present(RNOJF_1) alors CORR.RNOJF1731 = RNOJF_1; finsi +si present(ANOJG_1) alors CORR.ANOJG1731 = ANOJG_1; finsi +si present(RNOJG_1) alors CORR.RNOJG1731 = RNOJG_1; finsi +si present(ANOJH_1) alors CORR.ANOJH1731 = ANOJH_1; finsi +si present(RNOJH_1) alors CORR.RNOJH1731 = RNOJH_1; finsi +si present(ANONE_1) alors CORR.ANONE1731 = ANONE_1; finsi +si present(RNONE_1) alors CORR.RNONE1731 = RNONE_1; finsi +si present(ANONF_1) alors CORR.ANONF1731 = ANONF_1; finsi +si present(RNONF_1) alors CORR.RNONF1731 = RNONF_1; finsi +si present(ANONG_1) alors CORR.ANONG1731 = ANONG_1; finsi +si present(RNONG_1) alors CORR.RNONG1731 = RNONG_1; finsi +si present(ANONH_1) alors CORR.ANONH1731 = ANONH_1; finsi +si present(RNONH_1) alors CORR.RNONH1731 = RNONH_1; finsi +si present(ANOIE_1) alors CORR.ANOIE1731 = ANOIE_1; finsi +si present(RNOIE_1) alors CORR.RNOIE1731 = RNOIE_1; finsi +si present(ANOIF_1) alors CORR.ANOIF1731 = ANOIF_1; finsi +si present(RNOIF_1) alors CORR.RNOIF1731 = RNOIF_1; finsi +si present(ANOIG_1) alors CORR.ANOIG1731 = ANOIG_1; finsi +si present(RNOIG_1) alors CORR.RNOIG1731 = RNOIG_1; finsi +si present(ANOIH_1) alors CORR.ANOIH1731 = ANOIH_1; finsi +si present(RNOIH_1) alors CORR.RNOIH1731 = RNOIH_1; finsi +si present(RNONO_1) alors CORR.RNONO1731 = RNONO_1; finsi +si present(RNONP_1) alors CORR.RNONP1731 = RNONP_1; finsi +si present(RNONQ_1) alors CORR.RNONQ1731 = RNONQ_1; finsi +si present(RNONR_1) alors CORR.RNONR1731 = RNONR_1; finsi +si present(RCOD7KW_1) alors CORR.RCOD7KW1731 = RCOD7KW_1; finsi +si present(RCELMA_1) alors CORR.RCELMA1731 = RCELMA_1; finsi +si present(RCELMB_1) alors CORR.RCELMB1731 = RCELMB_1; finsi +si present(RCELMC_1) alors CORR.RCELMC1731 = RCELMC_1; finsi +si present(RCELMD_1) alors CORR.RCELMD1731 = RCELMD_1; finsi +si present(RCELMI_1) alors CORR.RCELMI1731 = RCELMI_1; finsi +si present(RCELMJ_1) alors CORR.RCELMJ1731 = RCELMJ_1; finsi +si present(RCELMK_1) alors CORR.RCELMK1731 = RCELMK_1; finsi +si present(RCELML_1) alors CORR.RCELML1731 = RCELML_1; finsi +si present(RCELOJ_1) alors CORR.RCELOJ1731 = RCELOJ_1; finsi +si present(RCELOU_1) alors CORR.RCELOU1731 = RCELOU_1; finsi +si present(RCELOV_1) alors CORR.RCELOV1731 = RCELOV_1; finsi +si present(RCELOW_1) alors CORR.RCELOW1731 = RCELOW_1; finsi +si present(RCELME_1) alors CORR.RCELME1731 = RCELME_1; finsi +si present(RCELMF_1) alors CORR.RCELMF1731 = RCELMF_1; finsi +si present(RCELMG_1) alors CORR.RCELMG1731 = RCELMG_1; finsi +si present(RCELMH_1) alors CORR.RCELMH1731 = RCELMH_1; finsi +si present(RCELNS_1) alors CORR.RCELNS1731 = RCELNS_1; finsi +si present(RCELNT_1) alors CORR.RCELNT1731 = RCELNT_1; finsi +si present(RCELNU_1) alors CORR.RCELNU1731 = RCELNU_1; finsi +si present(RCELNV_1) alors CORR.RCELNV1731 = RCELNV_1; finsi +si present(ACODMW_1) alors CORR.ACODMW1731 = ACODMW_1; finsi +si present(RCODMW_1) alors CORR.RCODMW1731 = RCODMW_1; finsi +si present(ACODMN_1) alors CORR.ACODMN1731 = ACODMN_1; finsi +si present(RCODMN_1) alors CORR.RCODMN1731 = RCODMN_1; finsi +si present(RNONM_1) alors CORR.RNONM1731 = RNONM_1; finsi +si present(RNONN_1) alors CORR.RNONN1731 = RNONN_1; finsi +si present(RNOPF_1) alors CORR.RNOPF1731 = RNOPF_1; finsi +si present(RNOPG_1) alors CORR.RNOPG1731 = RNOPG_1; finsi +si present(RCELPC_1) alors CORR.RCELPC1731 = RCELPC_1; finsi +si present(RCELPD_1) alors CORR.RCELPD1731 = RCELPD_1; finsi +si present(RCELPE_1) alors CORR.RCELPE1731 = RCELPE_1; finsi +si present(RPIQM_1) alors CORR.RPIQM1731 = RPIQM_1; finsi +si present(RPIQN_1) alors CORR.RPIQN1731 = RPIQN_1; finsi +si present(RPIQO_1) alors CORR.RPIQO1731 = RPIQO_1; finsi +si present(RPIQP_1) alors CORR.RPIQP1731 = RPIQP_1; finsi +si present(RPIRX_1) alors CORR.RPIRX1731 = RPIRX_1; finsi +si present(RPIRY_1) alors CORR.RPIRY1731 = RPIRY_1; finsi +si present(RPIRI_1) alors CORR.RPIRI1731 = RPIRI_1; finsi +si present(RPIRJ_1) alors CORR.RPIRJ1731 = RPIRJ_1; finsi +si present(RNOHL_1) alors CORR.RNOHL1731 = RNOHL_1; finsi +si present(RNOHM_1) alors CORR.RNOHM1731 = RNOHM_1; finsi +si present(RPIXA_1) alors CORR.RPIXA1731 = RPIXA_1; finsi +si present(RPIXB_1) alors CORR.RPIXB1731 = RPIXB_1; finsi +si present(RPIXH_1) alors CORR.RPIXH1731 = RPIXH_1; finsi +si present(RPIXI_1) alors CORR.RPIXI1731 = RPIXI_1; finsi +si present(RPISH_1) alors CORR.RPISH1731 = RPISH_1; finsi +si present(RPISI_1) alors CORR.RPISI1731 = RPISI_1; finsi +si present(RPIRO_1) alors CORR.RPIRO1731 = RPIRO_1; finsi +si present(RPIRP_1) alors CORR.RPIRP1731 = RPIRP_1; finsi +si present(AILMSM_1) alors CORR.AILMSM1731 = AILMSM_1; finsi +si present(RILMSM_1) alors CORR.RILMSM1731 = RILMSM_1; finsi +si present(AILMSS_1) alors CORR.AILMSS1731 = AILMSS_1; finsi +si present(AILMST_1) alors CORR.AILMST1731 = AILMST_1; finsi +si present(RILMSS_1) alors CORR.RILMSS1731 = RILMSS_1; finsi +si present(RILMST_1) alors CORR.RILMST1731 = RILMST_1; finsi +si present(ACELP1A_1) alors CORR.ACELP1A1731 = ACELP1A_1; finsi +si present(ACELP1B_1) alors CORR.ACELP1B1731 = ACELP1B_1; finsi +si present(ACELP1C_1) alors CORR.ACELP1C1731 = ACELP1C_1; finsi +si present(ACELP1D_1) alors CORR.ACELP1D1731 = ACELP1D_1; finsi +si present(ACELP1E_1) alors CORR.ACELP1E1731 = ACELP1E_1; finsi +si present(RCELP1A_1) alors CORR.RCELP1A1731 = RCELP1A_1; finsi +si present(RCELP1B_1) alors CORR.RCELP1B1731 = RCELP1B_1; finsi +si present(RCELP1C_1) alors CORR.RCELP1C1731 = RCELP1C_1; finsi +si present(RCELP1D_1) alors CORR.RCELP1D1731 = RCELP1D_1; finsi +si present(RCELP1E_1) alors CORR.RCELP1E1731 = RCELP1E_1; finsi +si present(ACELP2A_1) alors CORR.ACELP2A1731 = ACELP2A_1; finsi +si present(ACELP2B_1) alors CORR.ACELP2B1731 = ACELP2B_1; finsi +si present(ACELP2C_1) alors CORR.ACELP2C1731 = ACELP2C_1; finsi +si present(ACELP2D_1) alors CORR.ACELP2D1731 = ACELP2D_1; finsi +si present(ACELP2E_1) alors CORR.ACELP2E1731 = ACELP2E_1; finsi +si present(APIOF_1) alors CORR.APIOF1731 = APIOF_1; finsi +si present(RPIOF_1) alors CORR.RPIOF1731 = RPIOF_1; finsi +si present(APIOG_1) alors CORR.APIOG1731 = APIOG_1; finsi +si present(RPIOG_1) alors CORR.RPIOG1731 = RPIOG_1; finsi +si present(APINA_1) alors CORR.APINA1731 = APINA_1; finsi +si present(RPINA_1) alors CORR.RPINA1731 = RPINA_1; finsi +si present(APINB_1) alors CORR.APINB1731 = APINB_1; finsi +si present(RPINB_1) alors CORR.RPINB1731 = RPINB_1; finsi +si present(APINC_1) alors CORR.APINC1731 = APINC_1; finsi +si present(RPINC_1) alors CORR.RPINC1731 = RPINC_1; finsi +si present(APIND_1) alors CORR.APIND1731 = APIND_1; finsi +si present(RPIND_1) alors CORR.RPIND1731 = RPIND_1; finsi +si present(APIOH_1) alors CORR.APIOH1731 = APIOH_1; finsi +si present(RPIOH_1) alors CORR.RPIOH1731 = RPIOH_1; finsi +si present(APIOI_1) alors CORR.APIOI1731 = APIOI_1; finsi +si present(RPIOI_1) alors CORR.RPIOI1731 = RPIOI_1; finsi +si present(APILA_1) alors CORR.APILA1731 = APILA_1; finsi +si present(RPILA_1) alors CORR.RPILA1731 = RPILA_1; finsi +si present(APILB_1) alors CORR.APILB1731 = APILB_1; finsi +si present(RPILB_1) alors CORR.RPILB1731 = RPILB_1; finsi +si present(APILC_1) alors CORR.APILC1731 = APILC_1; finsi +si present(RPILC_1) alors CORR.RPILC1731 = RPILC_1; finsi +si present(APILD_1) alors CORR.APILD1731 = APILD_1; finsi +si present(RPILD_1) alors CORR.RPILD1731 = RPILD_1; finsi +si present(APILE_1) alors CORR.APILE1731 = APILE_1; finsi +si present(RPILE_1) alors CORR.RPILE1731 = RPILE_1; finsi +si present(APILF_1) alors CORR.APILF1731 = APILF_1; finsi +si present(RPILF_1) alors CORR.RPILF1731 = RPILF_1; finsi +si present(APISY_1) alors CORR.APISY1731 = APISY_1; finsi +si present(RPISY_1) alors CORR.RPISY1731 = RPISY_1; finsi +si present(APISZ_1) alors CORR.APISZ1731 = APISZ_1; finsi +si present(RPISZ_1) alors CORR.RPISZ1731 = RPISZ_1; finsi +si present(RCELUU_1) alors CORR.RCELUU1731 = RCELUU_1; finsi +si present(RCELUV_1) alors CORR.RCELUV1731 = RCELUV_1; finsi +si present(RCELUW_1) alors CORR.RCELUW1731 = RCELUW_1; finsi +si present(RCELUX_1) alors CORR.RCELUX1731 = RCELUX_1; finsi +si present(RCELRK_1) alors CORR.RCELRK1731 = RCELRK_1; finsi +si present(RCELRL_1) alors CORR.RCELRL1731 = RCELRL_1; finsi +si present(RCELRM_1) alors CORR.RCELRM1731 = RCELRM_1; finsi +si present(RCELRN_1) alors CORR.RCELRN1731 = RCELRN_1; finsi +si present(RCELIV_1) alors CORR.RCELIV1731 = RCELIV_1; finsi +si present(RCELIX_1) alors CORR.RCELIX1731 = RCELIX_1; finsi +si present(RCELIY_1) alors CORR.RCELIY1731 = RCELIY_1; finsi +si present(RCELIZ_1) alors CORR.RCELIZ1731 = RCELIZ_1; finsi +si present(RCELIM_1) alors CORR.RCELIM1731 = RCELIM_1; finsi +si present(RCELIN_1) alors CORR.RCELIN1731 = RCELIN_1; finsi +si present(RCELIO_1) alors CORR.RCELIO1731 = RCELIO_1; finsi +si present(RCELIP_1) alors CORR.RCELIP1731 = RCELIP_1; finsi +si present(RCELBA_1) alors CORR.RCELBA1731 = RCELBA_1; finsi +si present(RCELBB_1) alors CORR.RCELBB1731 = RCELBB_1; finsi +si present(RCELBC_1) alors CORR.RCELBC1731 = RCELBC_1; finsi +si present(RCELBD_1) alors CORR.RCELBD1731 = RCELBD_1; finsi +si present(RCELVJ_1) alors CORR.RCELVJ1731 = RCELVJ_1; finsi +si present(RCELVL_1) alors CORR.RCELVL1731 = RCELVL_1; finsi +si present(RCELVK_1) alors CORR.RCELVK1731 = RCELVK_1; finsi +si present(RCELVO_1) alors CORR.RCELVO1731 = RCELVO_1; finsi +si present(RCELVB_1) alors CORR.RCELVB1731 = RCELVB_1; finsi +si present(RCELVH_1) alors CORR.RCELVH1731 = RCELVH_1; finsi +si present(RCELVI_1) alors CORR.RCELVI1731 = RCELVI_1; finsi +si present(RCELVP_1) alors CORR.RCELVP1731 = RCELVP_1; finsi +si present(RPIIA_1) alors CORR.RPIIA1731 = RPIIA_1; finsi +si present(RPIIB_1) alors CORR.RPIIB1731 = RPIIB_1; finsi +si present(RPIIC_1) alors CORR.RPIIC1731 = RPIIC_1; finsi +si present(RPIID_1) alors CORR.RPIID1731 = RPIID_1; finsi +si present(RPIJI_1) alors CORR.RPIJI1731 = RPIJI_1; finsi +si present(RPIJJ_1) alors CORR.RPIJJ1731 = RPIJJ_1; finsi +si present(RPIJK_1) alors CORR.RPIJK1731 = RPIJK_1; finsi +si present(RPIJL_1) alors CORR.RPIJL1731 = RPIJL_1; finsi +si present(RCELLK_1) alors CORR.RCELLK1731 = RCELLK_1; finsi +si present(RCELLL_1) alors CORR.RCELLL1731 = RCELLL_1; finsi +si present(RCELLO_1) alors CORR.RCELLO1731 = RCELLO_1; finsi +si present(RCELLP_1) alors CORR.RCELLP1731 = RCELLP_1; finsi +si present(APIIA_1) alors CORR.APIIA1731 = APIIA_1; finsi +si present(APIIB_1) alors CORR.APIIB1731 = APIIB_1; finsi +si present(APIIC_1) alors CORR.APIIC1731 = APIIC_1; finsi +si present(APIID_1) alors CORR.APIID1731 = APIID_1; finsi +si present(APIJI_1) alors CORR.APIJI1731 = APIJI_1; finsi +si present(APIJJ_1) alors CORR.APIJJ1731 = APIJJ_1; finsi +si present(APIJK_1) alors CORR.APIJK1731 = APIJK_1; finsi +si present(APIJL_1) alors CORR.APIJL1731 = APIJL_1; finsi +si present(R8PY_1) alors CORR.R8PY1731 = R8PY_1; finsi +si present(A8PY_1) alors CORR.A8PY1731 = A8PY_1; finsi +si present(RPTZM_1) alors CORR.RPTZM1731 = RPTZM_1; finsi +si present(APTZM_1) alors CORR.APTZM1731 = APTZM_1; finsi +si present(RPMEJEI_1) alors CORR.RPMEJEI1731 = RPMEJEI_1; finsi +si present(APMEJEI_1) alors CORR.APMEJEI1731 = APMEJEI_1; finsi +si present(RNOLQ_1) alors CORR.RNOLQ1731 = RNOLQ_1; finsi +si present(RNOLR_1) alors CORR.RNOLR1731 = RNOLR_1; finsi +si present(RNOLS_1) alors CORR.RNOLS1731 = RNOLS_1; finsi +si present(RNOLT_1) alors CORR.RNOLT1731 = RNOLT_1; finsi +si present(RNOLU_1) alors CORR.RNOLU1731 = RNOLU_1; finsi +si present(RNOLV_1) alors CORR.RNOLV1731 = RNOLV_1; finsi +si present(RNOLW_1) alors CORR.RNOLW1731 = RNOLW_1; finsi +si present(RNOLX_1) alors CORR.RNOLX1731 = RNOLX_1; finsi +si present(RILMSX_1) alors CORR.RILMSX1731 = RILMSX_1; finsi +si present(AILMSX_1) alors CORR.AILMSX1731 = AILMSX_1; finsi +si present(RILMSL_1) alors CORR.RILMSL1731 = RILMSL_1; finsi +si present(AILMSL_1) alors CORR.AILMSL1731 = AILMSL_1; finsi +si present(REPRCMBIS) alors CORR.REPRCMBIS1731 = REPRCMBIS; finsi +si present(RRFI) alors CORR.RRFI1731 = RRFI; finsi +si present(RCM1) alors CORR.RCM11731 = RCM1; finsi +si present(BIN) alors CORR.BIN1731 = BIN; finsi +si present(NPLOCNETF) alors CORR.NPLOCNETF1731 = NPLOCNETF; finsi +si present(RGPROVHBA) alors CORR.RGPROVHBA1731 = RGPROVHBA; finsi +si present(TOTRCM) alors CORR.TOTRCM1731 = TOTRCM; finsi +si present(1RCM_I) alors CORR.1RCM_I1731 = 1RCM_I; finsi +si present(RCMORDNET) alors CORR.RCMORDNET1731 = RCMORDNET; finsi +si present(RCMQNET) alors CORR.RCMQNET1731 = RCMQNET; finsi +si present(RCMTOTNET) alors CORR.RCMTOTNET1731 = RCMTOTNET; finsi +si present(BNN) alors CORR.BNN1731 = BNN; finsi + diff --git a/m_ext/2025/commence_par_5.m b/m_ext/2025/commence_par_5.m new file mode 100644 index 000000000..0267a699e --- /dev/null +++ b/m_ext/2025/commence_par_5.m @@ -0,0 +1,376 @@ +cible alias_commence_par_5: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 5AC) + ou meme_variable(VAR, 5AD) + ou meme_variable(VAR, 5AE) + ou meme_variable(VAR, 5AF) + ou meme_variable(VAR, 5AG) + ou meme_variable(VAR, 5AH) + ou meme_variable(VAR, 5AI) + ou meme_variable(VAR, 5AK) + ou meme_variable(VAR, 5AN) + ou meme_variable(VAR, 5AO) + ou meme_variable(VAR, 5AP) + ou meme_variable(VAR, 5AQ) + ou meme_variable(VAR, 5AT) + ou meme_variable(VAR, 5AX) + ou meme_variable(VAR, 5AY) + ou meme_variable(VAR, 5BC) + ou meme_variable(VAR, 5BD) + ou meme_variable(VAR, 5BE) + ou meme_variable(VAR, 5BF) + ou meme_variable(VAR, 5BG) + ou meme_variable(VAR, 5BH) + ou meme_variable(VAR, 5BI) + ou meme_variable(VAR, 5BK) + ou meme_variable(VAR, 5BN) + ou meme_variable(VAR, 5BO) + ou meme_variable(VAR, 5BP) + ou meme_variable(VAR, 5BQ) + ou meme_variable(VAR, 5BT) + ou meme_variable(VAR, 5BX) + ou meme_variable(VAR, 5BY) + ou meme_variable(VAR, 5CC) + ou meme_variable(VAR, 5CD) + ou meme_variable(VAR, 5CE) + ou meme_variable(VAR, 5CF) + ou meme_variable(VAR, 5CG) + ou meme_variable(VAR, 5CI) + ou meme_variable(VAR, 5CK) + ou meme_variable(VAR, 5CM) + ou meme_variable(VAR, 5CN) + ou meme_variable(VAR, 5CQ) + ou meme_variable(VAR, 5CR) + ou meme_variable(VAR, 5CT) + ou meme_variable(VAR, 5CU) + ou meme_variable(VAR, 5CV) + ou meme_variable(VAR, 5CX) + ou meme_variable(VAR, 5DB) + ou meme_variable(VAR, 5DD) + ou meme_variable(VAR, 5DF) + ou meme_variable(VAR, 5DK) + ou meme_variable(VAR, 5DM) + ou meme_variable(VAR, 5EA) + ou meme_variable(VAR, 5EB) + ou meme_variable(VAR, 5ED) + ou meme_variable(VAR, 5EF) + ou meme_variable(VAR, 5EI) + ou meme_variable(VAR, 5EK) + ou meme_variable(VAR, 5EM) + ou meme_variable(VAR, 5EU) + ou meme_variable(VAR, 5EY) + ou meme_variable(VAR, 5FA) + ou meme_variable(VAR, 5FB) + ou meme_variable(VAR, 5FD) + ou meme_variable(VAR, 5FF) + ou meme_variable(VAR, 5FK) + ou meme_variable(VAR, 5FM) + ou meme_variable(VAR, 5FY) + ou meme_variable(VAR, 5GA) + ou meme_variable(VAR, 5GB) + ou meme_variable(VAR, 5GC) + ou meme_variable(VAR, 5GD) + ou meme_variable(VAR, 5GE) + ou meme_variable(VAR, 5GF) + ou meme_variable(VAR, 5GG) + ou meme_variable(VAR, 5GH) + ou meme_variable(VAR, 5GI) + ou meme_variable(VAR, 5GJ) + ou meme_variable(VAR, 5GY) + ou meme_variable(VAR, 5HA) + ou meme_variable(VAR, 5HB) + ou meme_variable(VAR, 5HC) + ou meme_variable(VAR, 5HD) + ou meme_variable(VAR, 5HE) + ou meme_variable(VAR, 5HF) + ou meme_variable(VAR, 5HG) + ou meme_variable(VAR, 5HK) + ou meme_variable(VAR, 5HM) + ou meme_variable(VAR, 5HP) + ou meme_variable(VAR, 5HQ) + ou meme_variable(VAR, 5HR) + ou meme_variable(VAR, 5HS) + ou meme_variable(VAR, 5HT) + ou meme_variable(VAR, 5HV) + ou meme_variable(VAR, 5HW) + ou meme_variable(VAR, 5HX) + ou meme_variable(VAR, 5HY) + ou meme_variable(VAR, 5IA) + ou meme_variable(VAR, 5IB) + ou meme_variable(VAR, 5IC) + ou meme_variable(VAR, 5ID) + ou meme_variable(VAR, 5IE) + ou meme_variable(VAR, 5IF) + ou meme_variable(VAR, 5IG) + ou meme_variable(VAR, 5IM) + ou meme_variable(VAR, 5IP) + ou meme_variable(VAR, 5IQ) + ou meme_variable(VAR, 5IR) + ou meme_variable(VAR, 5IS) + ou meme_variable(VAR, 5IT) + ou meme_variable(VAR, 5IU) + ou meme_variable(VAR, 5IV) + ou meme_variable(VAR, 5IW) + ou meme_variable(VAR, 5IX) + ou meme_variable(VAR, 5IY) + ou meme_variable(VAR, 5JA) + ou meme_variable(VAR, 5JB) + ou meme_variable(VAR, 5JC) + ou meme_variable(VAR, 5JD) + ou meme_variable(VAR, 5JE) + ou meme_variable(VAR, 5JF) + ou meme_variable(VAR, 5JG) + ou meme_variable(VAR, 5JJ) + ou meme_variable(VAR, 5JK) + ou meme_variable(VAR, 5JM) + ou meme_variable(VAR, 5JP) + ou meme_variable(VAR, 5JQ) + ou meme_variable(VAR, 5JR) + ou meme_variable(VAR, 5JS) + ou meme_variable(VAR, 5JT) + ou meme_variable(VAR, 5JU) + ou meme_variable(VAR, 5JV) + ou meme_variable(VAR, 5JW) + ou meme_variable(VAR, 5JX) + ou meme_variable(VAR, 5JY) + ou meme_variable(VAR, 5KB) + ou meme_variable(VAR, 5KC) + ou meme_variable(VAR, 5KE) + ou meme_variable(VAR, 5KF) + ou meme_variable(VAR, 5KJ) + ou meme_variable(VAR, 5KN) + ou meme_variable(VAR, 5KO) + ou meme_variable(VAR, 5KP) + ou meme_variable(VAR, 5KQ) + ou meme_variable(VAR, 5KR) + ou meme_variable(VAR, 5KT) + ou meme_variable(VAR, 5KU) + ou meme_variable(VAR, 5KV) + ou meme_variable(VAR, 5KW) + ou meme_variable(VAR, 5KX) + ou meme_variable(VAR, 5KY) + ou meme_variable(VAR, 5KZ) + ou meme_variable(VAR, 5LB) + ou meme_variable(VAR, 5LC) + ou meme_variable(VAR, 5LD) + ou meme_variable(VAR, 5LE) + ou meme_variable(VAR, 5LF) + ou meme_variable(VAR, 5LJ) + ou meme_variable(VAR, 5LK) + ou meme_variable(VAR, 5LN) + ou meme_variable(VAR, 5LO) + ou meme_variable(VAR, 5LP) + ou meme_variable(VAR, 5LQ) + ou meme_variable(VAR, 5LR) + ou meme_variable(VAR, 5LT) + ou meme_variable(VAR, 5LU) + ou meme_variable(VAR, 5LV) + ou meme_variable(VAR, 5LW) + ou meme_variable(VAR, 5LX) + ou meme_variable(VAR, 5LY) + ou meme_variable(VAR, 5LZ) + ou meme_variable(VAR, 5MB) + ou meme_variable(VAR, 5MC) + ou meme_variable(VAR, 5MD) + ou meme_variable(VAR, 5ME) + ou meme_variable(VAR, 5MF) + ou meme_variable(VAR, 5MJ) + ou meme_variable(VAR, 5MN) + ou meme_variable(VAR, 5MO) + ou meme_variable(VAR, 5MP) + ou meme_variable(VAR, 5MQ) + ou meme_variable(VAR, 5MR) + ou meme_variable(VAR, 5MT) + ou meme_variable(VAR, 5MU) + ou meme_variable(VAR, 5MV) + ou meme_variable(VAR, 5MW) + ou meme_variable(VAR, 5MX) + ou meme_variable(VAR, 5MY) + ou meme_variable(VAR, 5MZ) + ou meme_variable(VAR, 5NA) + ou meme_variable(VAR, 5NB) + ou meme_variable(VAR, 5NC) + ou meme_variable(VAR, 5NE) + ou meme_variable(VAR, 5NF) + ou meme_variable(VAR, 5NG) + ou meme_variable(VAR, 5NH) + ou meme_variable(VAR, 5NI) + ou meme_variable(VAR, 5NJ) + ou meme_variable(VAR, 5NK) + ou meme_variable(VAR, 5NL) + ou meme_variable(VAR, 5NM) + ou meme_variable(VAR, 5NN) + ou meme_variable(VAR, 5NO) + ou meme_variable(VAR, 5NP) + ou meme_variable(VAR, 5NQ) + ou meme_variable(VAR, 5NR) + ou meme_variable(VAR, 5NT) + ou meme_variable(VAR, 5NX) + ou meme_variable(VAR, 5NY) + ou meme_variable(VAR, 5OA) + ou meme_variable(VAR, 5OB) + ou meme_variable(VAR, 5OC) + ou meme_variable(VAR, 5OE) + ou meme_variable(VAR, 5OF) + ou meme_variable(VAR, 5OG) + ou meme_variable(VAR, 5OH) + ou meme_variable(VAR, 5OI) + ou meme_variable(VAR, 5OJ) + ou meme_variable(VAR, 5OK) + ou meme_variable(VAR, 5OL) + ou meme_variable(VAR, 5OM) + ou meme_variable(VAR, 5ON) + ou meme_variable(VAR, 5OO) + ou meme_variable(VAR, 5OP) + ou meme_variable(VAR, 5OQ) + ou meme_variable(VAR, 5OR) + ou meme_variable(VAR, 5OT) + ou meme_variable(VAR, 5OX) + ou meme_variable(VAR, 5OY) + ou meme_variable(VAR, 5PA) + ou meme_variable(VAR, 5PB) + ou meme_variable(VAR, 5PC) + ou meme_variable(VAR, 5PE) + ou meme_variable(VAR, 5PF) + ou meme_variable(VAR, 5PG) + ou meme_variable(VAR, 5PH) + ou meme_variable(VAR, 5PI) + ou meme_variable(VAR, 5PJ) + ou meme_variable(VAR, 5PK) + ou meme_variable(VAR, 5PL) + ou meme_variable(VAR, 5PM) + ou meme_variable(VAR, 5PN) + ou meme_variable(VAR, 5PO) + ou meme_variable(VAR, 5PP) + ou meme_variable(VAR, 5PQ) + ou meme_variable(VAR, 5PR) + ou meme_variable(VAR, 5PX) + ou meme_variable(VAR, 5PY) + ou meme_variable(VAR, 5QA) + ou meme_variable(VAR, 5QB) + ou meme_variable(VAR, 5QC) + ou meme_variable(VAR, 5QD) + ou meme_variable(VAR, 5QE) + ou meme_variable(VAR, 5QF) + ou meme_variable(VAR, 5QG) + ou meme_variable(VAR, 5QJ) + ou meme_variable(VAR, 5QL) + ou meme_variable(VAR, 5QM) + ou meme_variable(VAR, 5QN) + ou meme_variable(VAR, 5QO) + ou meme_variable(VAR, 5QP) + ou meme_variable(VAR, 5QQ) + ou meme_variable(VAR, 5RA) + ou meme_variable(VAR, 5RB) + ou meme_variable(VAR, 5RC) + ou meme_variable(VAR, 5RD) + ou meme_variable(VAR, 5RE) + ou meme_variable(VAR, 5RF) + ou meme_variable(VAR, 5RG) + ou meme_variable(VAR, 5RJ) + ou meme_variable(VAR, 5RL) + ou meme_variable(VAR, 5RM) + ou meme_variable(VAR, 5RN) + ou meme_variable(VAR, 5RO) + ou meme_variable(VAR, 5RP) + ou meme_variable(VAR, 5RQ) + ou meme_variable(VAR, 5RR) + ou meme_variable(VAR, 5RW) + ou meme_variable(VAR, 5RZ) + ou meme_variable(VAR, 5SA) + ou meme_variable(VAR, 5SB) + ou meme_variable(VAR, 5SC) + ou meme_variable(VAR, 5SD) + ou meme_variable(VAR, 5SE) + ou meme_variable(VAR, 5SF) + ou meme_variable(VAR, 5SG) + ou meme_variable(VAR, 5SJ) + ou meme_variable(VAR, 5SL) + ou meme_variable(VAR, 5SO) + ou meme_variable(VAR, 5SV) + ou meme_variable(VAR, 5SW) + ou meme_variable(VAR, 5SX) + ou meme_variable(VAR, 5SZ) + ou meme_variable(VAR, 5TA) + ou meme_variable(VAR, 5TB) + ou meme_variable(VAR, 5TC) + ou meme_variable(VAR, 5TE) + ou meme_variable(VAR, 5TF) + ou meme_variable(VAR, 5TH) + ou meme_variable(VAR, 5TP) + ou meme_variable(VAR, 5UA) + ou meme_variable(VAR, 5UB) + ou meme_variable(VAR, 5UC) + ou meme_variable(VAR, 5UE) + ou meme_variable(VAR, 5UF) + ou meme_variable(VAR, 5UH) + ou meme_variable(VAR, 5UI) + ou meme_variable(VAR, 5UP) + ou meme_variable(VAR, 5UR) + ou meme_variable(VAR, 5UT) + ou meme_variable(VAR, 5UY) + ou meme_variable(VAR, 5VA) + ou meme_variable(VAR, 5VB) + ou meme_variable(VAR, 5VC) + ou meme_variable(VAR, 5VE) + ou meme_variable(VAR, 5VF) + ou meme_variable(VAR, 5VH) + ou meme_variable(VAR, 5VI) + ou meme_variable(VAR, 5VM) + ou meme_variable(VAR, 5VP) + ou meme_variable(VAR, 5VQ) + ou meme_variable(VAR, 5VR) + ou meme_variable(VAR, 5VT) + ou meme_variable(VAR, 5VV) + ou meme_variable(VAR, 5VY) + ou meme_variable(VAR, 5WE) + ou meme_variable(VAR, 5WI) + ou meme_variable(VAR, 5WM) + ou meme_variable(VAR, 5WR) + ou meme_variable(VAR, 5XA) + ou meme_variable(VAR, 5XB) + ou meme_variable(VAR, 5XE) + ou meme_variable(VAR, 5XH) + ou meme_variable(VAR, 5XI) + ou meme_variable(VAR, 5XJ) + ou meme_variable(VAR, 5XM) + ou meme_variable(VAR, 5XN) + ou meme_variable(VAR, 5XO) + ou meme_variable(VAR, 5XP) + ou meme_variable(VAR, 5XR) + ou meme_variable(VAR, 5XS) + ou meme_variable(VAR, 5XT) + ou meme_variable(VAR, 5XU) + ou meme_variable(VAR, 5XY) + ou meme_variable(VAR, 5YA) + ou meme_variable(VAR, 5YB) + ou meme_variable(VAR, 5YE) + ou meme_variable(VAR, 5YH) + ou meme_variable(VAR, 5YI) + ou meme_variable(VAR, 5YJ) + ou meme_variable(VAR, 5YM) + ou meme_variable(VAR, 5YN) + ou meme_variable(VAR, 5YO) + ou meme_variable(VAR, 5YP) + ou meme_variable(VAR, 5YR) + ou meme_variable(VAR, 5YS) + ou meme_variable(VAR, 5YT) + ou meme_variable(VAR, 5YU) + ou meme_variable(VAR, 5YY) + ou meme_variable(VAR, 5ZA) + ou meme_variable(VAR, 5ZB) + ou meme_variable(VAR, 5ZH) + ou meme_variable(VAR, 5ZI) + ou meme_variable(VAR, 5ZJ) + ou meme_variable(VAR, 5ZM) + ou meme_variable(VAR, 5ZN) + ou meme_variable(VAR, 5ZO) + ou meme_variable(VAR, 5ZP) + ou meme_variable(VAR, 5ZR) + ou meme_variable(VAR, 5ZS) + ou meme_variable(VAR, 5ZT) + ou meme_variable(VAR, 5ZU) + ou meme_variable(VAR, 5ZY); + diff --git a/m_ext/2025/commence_par_7.m b/m_ext/2025/commence_par_7.m new file mode 100644 index 000000000..4eb223b63 --- /dev/null +++ b/m_ext/2025/commence_par_7.m @@ -0,0 +1,498 @@ +cible alias_commence_par_7: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, 7AA) + ou meme_variable(VAR, 7AC) + ou meme_variable(VAR, 7AE) + ou meme_variable(VAR, 7AG) + ou meme_variable(VAR, 7AI) + ou meme_variable(VAR, 7AP) + ou meme_variable(VAR, 7AQ) + ou meme_variable(VAR, 7AR) + ou meme_variable(VAR, 7AS) + ou meme_variable(VAR, 7AT) + ou meme_variable(VAR, 7AU) + ou meme_variable(VAR, 7BA) + ou meme_variable(VAR, 7BB) + ou meme_variable(VAR, 7BC) + ou meme_variable(VAR, 7BD) + ou meme_variable(VAR, 7BI) + ou meme_variable(VAR, 7BK) + ou meme_variable(VAR, 7BL) + ou meme_variable(VAR, 7BM) + ou meme_variable(VAR, 7BN) + ou meme_variable(VAR, 7BO) + ou meme_variable(VAR, 7BQ) + ou meme_variable(VAR, 7BS) + ou meme_variable(VAR, 7BT) + ou meme_variable(VAR, 7BU) + ou meme_variable(VAR, 7BW) + ou meme_variable(VAR, 7BX) + ou meme_variable(VAR, 7BY) + ou meme_variable(VAR, 7BZ) + ou meme_variable(VAR, 7CA) + ou meme_variable(VAR, 7CD) + ou meme_variable(VAR, 7CE) + ou meme_variable(VAR, 7CI) + ou meme_variable(VAR, 7CO) + ou meme_variable(VAR, 7CP) + ou meme_variable(VAR, 7CQ) + ou meme_variable(VAR, 7CR) + ou meme_variable(VAR, 7CT) + ou meme_variable(VAR, 7CU) + ou meme_variable(VAR, 7CV) + ou meme_variable(VAR, 7CW) + ou meme_variable(VAR, 7CY) + ou meme_variable(VAR, 7DB) + ou meme_variable(VAR, 7DC) + ou meme_variable(VAR, 7DG) + ou meme_variable(VAR, 7DI) + ou meme_variable(VAR, 7DL) + ou meme_variable(VAR, 7DO) + ou meme_variable(VAR, 7DP) + ou meme_variable(VAR, 7DQ) + ou meme_variable(VAR, 7DR) + ou meme_variable(VAR, 7DU) + ou meme_variable(VAR, 7DV) + ou meme_variable(VAR, 7DX) + ou meme_variable(VAR, 7DY) + ou meme_variable(VAR, 7DZ) + ou meme_variable(VAR, 7EA) + ou meme_variable(VAR, 7EB) + ou meme_variable(VAR, 7EC) + ou meme_variable(VAR, 7ED) + ou meme_variable(VAR, 7EF) + ou meme_variable(VAR, 7EG) + ou meme_variable(VAR, 7EH) + ou meme_variable(VAR, 7EI) + ou meme_variable(VAR, 7EK) + ou meme_variable(VAR, 7EL) + ou meme_variable(VAR, 7EM) + ou meme_variable(VAR, 7EN) + ou meme_variable(VAR, 7EQ) + ou meme_variable(VAR, 7ER) + ou meme_variable(VAR, 7EU) + ou meme_variable(VAR, 7EV) + ou meme_variable(VAR, 7EW) + ou meme_variable(VAR, 7EX) + ou meme_variable(VAR, 7EY) + ou meme_variable(VAR, 7EZ) + ou meme_variable(VAR, 7FA) + ou meme_variable(VAR, 7FB) + ou meme_variable(VAR, 7FC) + ou meme_variable(VAR, 7FD) + ou meme_variable(VAR, 7FE) + ou meme_variable(VAR, 7FH) + ou meme_variable(VAR, 7FI) + ou meme_variable(VAR, 7FK) + ou meme_variable(VAR, 7FL) + ou meme_variable(VAR, 7FM) + ou meme_variable(VAR, 7FN) + ou meme_variable(VAR, 7FU) + ou meme_variable(VAR, 7FW) + ou meme_variable(VAR, 7FX) + ou meme_variable(VAR, 7FY) + ou meme_variable(VAR, 7GA) + ou meme_variable(VAR, 7GB) + ou meme_variable(VAR, 7GC) + ou meme_variable(VAR, 7GD) + ou meme_variable(VAR, 7GE) + ou meme_variable(VAR, 7GF) + ou meme_variable(VAR, 7GG) + ou meme_variable(VAR, 7GM) + ou meme_variable(VAR, 7GN) + ou meme_variable(VAR, 7GQ) + ou meme_variable(VAR, 7GR) + ou meme_variable(VAR, 7GW) + ou meme_variable(VAR, 7GY) + ou meme_variable(VAR, 7GZ) + ou meme_variable(VAR, 7HA) + ou meme_variable(VAR, 7HB) + ou meme_variable(VAR, 7HD) + ou meme_variable(VAR, 7HE) + ou meme_variable(VAR, 7HF) + ou meme_variable(VAR, 7HG) + ou meme_variable(VAR, 7HH) + ou meme_variable(VAR, 7HJ) + ou meme_variable(VAR, 7HK) + ou meme_variable(VAR, 7HL) + ou meme_variable(VAR, 7HM) + ou meme_variable(VAR, 7HN) + ou meme_variable(VAR, 7HT) + ou meme_variable(VAR, 7HU) + ou meme_variable(VAR, 7HV) + ou meme_variable(VAR, 7HW) + ou meme_variable(VAR, 7HX) + ou meme_variable(VAR, 7HY) + ou meme_variable(VAR, 7HZ) + ou meme_variable(VAR, 7IA) + ou meme_variable(VAR, 7IB) + ou meme_variable(VAR, 7IC) + ou meme_variable(VAR, 7ID) + ou meme_variable(VAR, 7IE) + ou meme_variable(VAR, 7IF) + ou meme_variable(VAR, 7IG) + ou meme_variable(VAR, 7IH) + ou meme_variable(VAR, 7II) + ou meme_variable(VAR, 7IJ) + ou meme_variable(VAR, 7IK) + ou meme_variable(VAR, 7IL) + ou meme_variable(VAR, 7IM) + ou meme_variable(VAR, 7IN) + ou meme_variable(VAR, 7IO) + ou meme_variable(VAR, 7IP) + ou meme_variable(VAR, 7IQ) + ou meme_variable(VAR, 7IV) + ou meme_variable(VAR, 7IW) + ou meme_variable(VAR, 7IX) + ou meme_variable(VAR, 7IY) + ou meme_variable(VAR, 7IZ) + ou meme_variable(VAR, 7JB) + ou meme_variable(VAR, 7JD) + ou meme_variable(VAR, 7JE) + ou meme_variable(VAR, 7JF) + ou meme_variable(VAR, 7JG) + ou meme_variable(VAR, 7JH) + ou meme_variable(VAR, 7JI) + ou meme_variable(VAR, 7JJ) + ou meme_variable(VAR, 7JK) + ou meme_variable(VAR, 7JL) + ou meme_variable(VAR, 7JN) + ou meme_variable(VAR, 7JO) + ou meme_variable(VAR, 7JP) + ou meme_variable(VAR, 7JQ) + ou meme_variable(VAR, 7JR) + ou meme_variable(VAR, 7JS) + ou meme_variable(VAR, 7JT) + ou meme_variable(VAR, 7JU) + ou meme_variable(VAR, 7JV) + ou meme_variable(VAR, 7JW) + ou meme_variable(VAR, 7JX) + ou meme_variable(VAR, 7JY) + ou meme_variable(VAR, 7KA) + ou meme_variable(VAR, 7KB) + ou meme_variable(VAR, 7KC) + ou meme_variable(VAR, 7KD) + ou meme_variable(VAR, 7KE) + ou meme_variable(VAR, 7KF) + ou meme_variable(VAR, 7KG) + ou meme_variable(VAR, 7KH) + ou meme_variable(VAR, 7KI) + ou meme_variable(VAR, 7KK) + ou meme_variable(VAR, 7KM) + ou meme_variable(VAR, 7KN) + ou meme_variable(VAR, 7KO) + ou meme_variable(VAR, 7KP) + ou meme_variable(VAR, 7KQ) + ou meme_variable(VAR, 7KT) + ou meme_variable(VAR, 7KU) + ou meme_variable(VAR, 7KV) + ou meme_variable(VAR, 7KW) + ou meme_variable(VAR, 7KX) + ou meme_variable(VAR, 7KY) + ou meme_variable(VAR, 7LA) + ou meme_variable(VAR, 7LB) + ou meme_variable(VAR, 7LC) + ou meme_variable(VAR, 7LD) + ou meme_variable(VAR, 7LE) + ou meme_variable(VAR, 7LF) + ou meme_variable(VAR, 7LG) + ou meme_variable(VAR, 7LH) + ou meme_variable(VAR, 7LI) + ou meme_variable(VAR, 7LJ) + ou meme_variable(VAR, 7LK) + ou meme_variable(VAR, 7LL) + ou meme_variable(VAR, 7LO) + ou meme_variable(VAR, 7LP) + ou meme_variable(VAR, 7LQ) + ou meme_variable(VAR, 7LR) + ou meme_variable(VAR, 7LS) + ou meme_variable(VAR, 7LT) + ou meme_variable(VAR, 7LU) + ou meme_variable(VAR, 7LV) + ou meme_variable(VAR, 7LW) + ou meme_variable(VAR, 7LX) + ou meme_variable(VAR, 7MA) + ou meme_variable(VAR, 7MB) + ou meme_variable(VAR, 7MC) + ou meme_variable(VAR, 7MD) + ou meme_variable(VAR, 7ME) + ou meme_variable(VAR, 7MF) + ou meme_variable(VAR, 7MG) + ou meme_variable(VAR, 7MH) + ou meme_variable(VAR, 7MI) + ou meme_variable(VAR, 7MJ) + ou meme_variable(VAR, 7MK) + ou meme_variable(VAR, 7ML) + ou meme_variable(VAR, 7MM) + ou meme_variable(VAR, 7MN) + ou meme_variable(VAR, 7MO) + ou meme_variable(VAR, 7MP) + ou meme_variable(VAR, 7MQ) + ou meme_variable(VAR, 7MR) + ou meme_variable(VAR, 7MW) + ou meme_variable(VAR, 7MX) + ou meme_variable(VAR, 7MY) + ou meme_variable(VAR, 7MZ) + ou meme_variable(VAR, 7NA) + ou meme_variable(VAR, 7NB) + ou meme_variable(VAR, 7NC) + ou meme_variable(VAR, 7ND) + ou meme_variable(VAR, 7NE) + ou meme_variable(VAR, 7NF) + ou meme_variable(VAR, 7NG) + ou meme_variable(VAR, 7NH) + ou meme_variable(VAR, 7NM) + ou meme_variable(VAR, 7NN) + ou meme_variable(VAR, 7NO) + ou meme_variable(VAR, 7NP) + ou meme_variable(VAR, 7NQ) + ou meme_variable(VAR, 7NR) + ou meme_variable(VAR, 7NS) + ou meme_variable(VAR, 7NT) + ou meme_variable(VAR, 7NU) + ou meme_variable(VAR, 7NV) + ou meme_variable(VAR, 7NX) + ou meme_variable(VAR, 7NY) + ou meme_variable(VAR, 7NZ) + ou meme_variable(VAR, 7OA) + ou meme_variable(VAR, 7OB) + ou meme_variable(VAR, 7OC) + ou meme_variable(VAR, 7OD) + ou meme_variable(VAR, 7OE) + ou meme_variable(VAR, 7OF) + ou meme_variable(VAR, 7OG) + ou meme_variable(VAR, 7OH) + ou meme_variable(VAR, 7OI) + ou meme_variable(VAR, 7OJ) + ou meme_variable(VAR, 7OK) + ou meme_variable(VAR, 7OL) + ou meme_variable(VAR, 7OM) + ou meme_variable(VAR, 7ON) + ou meme_variable(VAR, 7OO) + ou meme_variable(VAR, 7OU) + ou meme_variable(VAR, 7OV) + ou meme_variable(VAR, 7OW) + ou meme_variable(VAR, 7OX) + ou meme_variable(VAR, 7OZ) + ou meme_variable(VAR, 7PA) + ou meme_variable(VAR, 7PB) + ou meme_variable(VAR, 7PC) + ou meme_variable(VAR, 7PD) + ou meme_variable(VAR, 7PE) + ou meme_variable(VAR, 7PF) + ou meme_variable(VAR, 7PG) + ou meme_variable(VAR, 7PH) + ou meme_variable(VAR, 7PI) + ou meme_variable(VAR, 7PJ) + ou meme_variable(VAR, 7PO) + ou meme_variable(VAR, 7PP) + ou meme_variable(VAR, 7PQ) + ou meme_variable(VAR, 7PR) + ou meme_variable(VAR, 7PS) + ou meme_variable(VAR, 7PT) + ou meme_variable(VAR, 7PU) + ou meme_variable(VAR, 7PV) + ou meme_variable(VAR, 7PW) + ou meme_variable(VAR, 7PX) + ou meme_variable(VAR, 7PY) + ou meme_variable(VAR, 7PZ) + ou meme_variable(VAR, 7QA) + ou meme_variable(VAR, 7QB) + ou meme_variable(VAR, 7QC) + ou meme_variable(VAR, 7QD) + ou meme_variable(VAR, 7QE) + ou meme_variable(VAR, 7QF) + ou meme_variable(VAR, 7QG) + ou meme_variable(VAR, 7QH) + ou meme_variable(VAR, 7QM) + ou meme_variable(VAR, 7QN) + ou meme_variable(VAR, 7QO) + ou meme_variable(VAR, 7QP) + ou meme_variable(VAR, 7QQ) + ou meme_variable(VAR, 7QR) + ou meme_variable(VAR, 7QS) + ou meme_variable(VAR, 7QT) + ou meme_variable(VAR, 7QU) + ou meme_variable(VAR, 7QV) + ou meme_variable(VAR, 7QW) + ou meme_variable(VAR, 7QX) + ou meme_variable(VAR, 7QY) + ou meme_variable(VAR, 7QZ) + ou meme_variable(VAR, 7RA) + ou meme_variable(VAR, 7RB) + ou meme_variable(VAR, 7RC) + ou meme_variable(VAR, 7RD) + ou meme_variable(VAR, 7RF) + ou meme_variable(VAR, 7RH) + ou meme_variable(VAR, 7RI) + ou meme_variable(VAR, 7RJ) + ou meme_variable(VAR, 7RK) + ou meme_variable(VAR, 7RL) + ou meme_variable(VAR, 7RM) + ou meme_variable(VAR, 7RN) + ou meme_variable(VAR, 7RO) + ou meme_variable(VAR, 7RP) + ou meme_variable(VAR, 7RT) + ou meme_variable(VAR, 7RU) + ou meme_variable(VAR, 7RX) + ou meme_variable(VAR, 7RY) + ou meme_variable(VAR, 7SA) + ou meme_variable(VAR, 7SB) + ou meme_variable(VAR, 7SC) + ou meme_variable(VAR, 7SD) + ou meme_variable(VAR, 7SE) + ou meme_variable(VAR, 7SF) + ou meme_variable(VAR, 7SG) + ou meme_variable(VAR, 7SH) + ou meme_variable(VAR, 7SI) + ou meme_variable(VAR, 7SJ) + ou meme_variable(VAR, 7SK) + ou meme_variable(VAR, 7SL) + ou meme_variable(VAR, 7SM) + ou meme_variable(VAR, 7SN) + ou meme_variable(VAR, 7SO) + ou meme_variable(VAR, 7SP) + ou meme_variable(VAR, 7SR) + ou meme_variable(VAR, 7SS) + ou meme_variable(VAR, 7ST) + ou meme_variable(VAR, 7SU) + ou meme_variable(VAR, 7SV) + ou meme_variable(VAR, 7SW) + ou meme_variable(VAR, 7SX) + ou meme_variable(VAR, 7SY) + ou meme_variable(VAR, 7SZ) + ou meme_variable(VAR, 7TA) + ou meme_variable(VAR, 7TB) + ou meme_variable(VAR, 7TC) + ou meme_variable(VAR, 7TD) + ou meme_variable(VAR, 7TE) + ou meme_variable(VAR, 7TF) + ou meme_variable(VAR, 7TH) + ou meme_variable(VAR, 7TI) + ou meme_variable(VAR, 7TJ) + ou meme_variable(VAR, 7TK) + ou meme_variable(VAR, 7TR) + ou meme_variable(VAR, 7TS) + ou meme_variable(VAR, 7TT) + ou meme_variable(VAR, 7TU) + ou meme_variable(VAR, 7TV) + ou meme_variable(VAR, 7TW) + ou meme_variable(VAR, 7TX) + ou meme_variable(VAR, 7TY) + ou meme_variable(VAR, 7UA) + ou meme_variable(VAR, 7UB) + ou meme_variable(VAR, 7UC) + ou meme_variable(VAR, 7UD) + ou meme_variable(VAR, 7UE) + ou meme_variable(VAR, 7UF) + ou meme_variable(VAR, 7UG) + ou meme_variable(VAR, 7UH) + ou meme_variable(VAR, 7UI) + ou meme_variable(VAR, 7UJ) + ou meme_variable(VAR, 7UK) + ou meme_variable(VAR, 7UL) + ou meme_variable(VAR, 7UM) + ou meme_variable(VAR, 7UN) + ou meme_variable(VAR, 7UO) + ou meme_variable(VAR, 7UP) + ou meme_variable(VAR, 7US) + ou meme_variable(VAR, 7UT) + ou meme_variable(VAR, 7UU) + ou meme_variable(VAR, 7UV) + ou meme_variable(VAR, 7UW) + ou meme_variable(VAR, 7UX) + ou meme_variable(VAR, 7UY) + ou meme_variable(VAR, 7UZ) + ou meme_variable(VAR, 7VA) + ou meme_variable(VAR, 7VB) + ou meme_variable(VAR, 7VC) + ou meme_variable(VAR, 7VD) + ou meme_variable(VAR, 7VE) + ou meme_variable(VAR, 7VF) + ou meme_variable(VAR, 7VG) + ou meme_variable(VAR, 7VH) + ou meme_variable(VAR, 7VI) + ou meme_variable(VAR, 7VJ) + ou meme_variable(VAR, 7VK) + ou meme_variable(VAR, 7VL) + ou meme_variable(VAR, 7VO) + ou meme_variable(VAR, 7VP) + ou meme_variable(VAR, 7VQ) + ou meme_variable(VAR, 7VR) + ou meme_variable(VAR, 7VS) + ou meme_variable(VAR, 7VT) + ou meme_variable(VAR, 7VU) + ou meme_variable(VAR, 7VV) + ou meme_variable(VAR, 7VW) + ou meme_variable(VAR, 7VX) + ou meme_variable(VAR, 7VY) + ou meme_variable(VAR, 7VZ) + ou meme_variable(VAR, 7WH) + ou meme_variable(VAR, 7WI) + ou meme_variable(VAR, 7WK) + ou meme_variable(VAR, 7WL) + ou meme_variable(VAR, 7WM) + ou meme_variable(VAR, 7WN) + ou meme_variable(VAR, 7WO) + ou meme_variable(VAR, 7WP) + ou meme_variable(VAR, 7WQ) + ou meme_variable(VAR, 7WR) + ou meme_variable(VAR, 7WS) + ou meme_variable(VAR, 7WX) + ou meme_variable(VAR, 7WY) + ou meme_variable(VAR, 7WZ) + ou meme_variable(VAR, 7XA) + ou meme_variable(VAR, 7XB) + ou meme_variable(VAR, 7XC) + ou meme_variable(VAR, 7XD) + ou meme_variable(VAR, 7XE) + ou meme_variable(VAR, 7XF) + ou meme_variable(VAR, 7XG) + ou meme_variable(VAR, 7XH) + ou meme_variable(VAR, 7XI) + ou meme_variable(VAR, 7XJ) + ou meme_variable(VAR, 7XK) + ou meme_variable(VAR, 7XL) + ou meme_variable(VAR, 7XM) + ou meme_variable(VAR, 7XN) + ou meme_variable(VAR, 7XO) + ou meme_variable(VAR, 7XP) + ou meme_variable(VAR, 7XQ) + ou meme_variable(VAR, 7XR) + ou meme_variable(VAR, 7XS) + ou meme_variable(VAR, 7XT) + ou meme_variable(VAR, 7XU) + ou meme_variable(VAR, 7XV) + ou meme_variable(VAR, 7XW) + ou meme_variable(VAR, 7XX) + ou meme_variable(VAR, 7XY) + ou meme_variable(VAR, 7XZ) + ou meme_variable(VAR, 7YA) + ou meme_variable(VAR, 7YC) + ou meme_variable(VAR, 7YE) + ou meme_variable(VAR, 7YM) + ou meme_variable(VAR, 7YN) + ou meme_variable(VAR, 7YO) + ou meme_variable(VAR, 7YP) + ou meme_variable(VAR, 7YR) + ou meme_variable(VAR, 7YS) + ou meme_variable(VAR, 7YT) + ou meme_variable(VAR, 7YU) + ou meme_variable(VAR, 7YV) + ou meme_variable(VAR, 7YW) + ou meme_variable(VAR, 7ZI) + ou meme_variable(VAR, 7ZJ) + ou meme_variable(VAR, 7ZK) + ou meme_variable(VAR, 7ZL) + ou meme_variable(VAR, 7ZQ) + ou meme_variable(VAR, 7ZR) + ou meme_variable(VAR, 7ZS) + ou meme_variable(VAR, 7ZT) + ou meme_variable(VAR, 7ZU) + ou meme_variable(VAR, 7ZV) + ou meme_variable(VAR, 7ZW) + ou meme_variable(VAR, 7ZX) + ou meme_variable(VAR, 7ZY) + ou meme_variable(VAR, 7ZZ); diff --git a/m_ext/2025/commence_par_H.m b/m_ext/2025/commence_par_H.m new file mode 100644 index 000000000..c7cbdc6f5 --- /dev/null +++ b/m_ext/2025/commence_par_H.m @@ -0,0 +1,103 @@ +cible alias_commence_par_H: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, HGS) + ou meme_variable(VAR, HGT) + ou meme_variable(VAR, HGU) + ou meme_variable(VAR, HGW) + ou meme_variable(VAR, HHS) + ou meme_variable(VAR, HHT) + ou meme_variable(VAR, HHU) + ou meme_variable(VAR, HHW) + ou meme_variable(VAR, HIS) + ou meme_variable(VAR, HIT) + ou meme_variable(VAR, HIU) + ou meme_variable(VAR, HIW) + ou meme_variable(VAR, HJA) + ou meme_variable(VAR, HJS) + ou meme_variable(VAR, HJT) + ou meme_variable(VAR, HJU) + ou meme_variable(VAR, HJW) + ou meme_variable(VAR, HKC) + ou meme_variable(VAR, HKS) + ou meme_variable(VAR, HKT) + ou meme_variable(VAR, HKU) + ou meme_variable(VAR, HKW) + ou meme_variable(VAR, HLS) + ou meme_variable(VAR, HLT) + ou meme_variable(VAR, HLU) + ou meme_variable(VAR, HLV) + ou meme_variable(VAR, HLW) + ou meme_variable(VAR, HOA) + ou meme_variable(VAR, HOB) + ou meme_variable(VAR, HOC) + ou meme_variable(VAR, HOD) + ou meme_variable(VAR, HOE) + ou meme_variable(VAR, HOF) + ou meme_variable(VAR, HOG) + ou meme_variable(VAR, HOH) + ou meme_variable(VAR, HOI) + ou meme_variable(VAR, HOJ) + ou meme_variable(VAR, HOK) + ou meme_variable(VAR, HOL) + ou meme_variable(VAR, HOM) + ou meme_variable(VAR, HON) + ou meme_variable(VAR, HOO) + ou meme_variable(VAR, HOP) + ou meme_variable(VAR, HOQ) + ou meme_variable(VAR, HOR) + ou meme_variable(VAR, HOS) + ou meme_variable(VAR, HOT) + ou meme_variable(VAR, HOU) + ou meme_variable(VAR, HOV) + ou meme_variable(VAR, HOW) + ou meme_variable(VAR, HOX) + ou meme_variable(VAR, HOY) + ou meme_variable(VAR, HOZ) + ou meme_variable(VAR, HQA) + ou meme_variable(VAR, HQB) + ou meme_variable(VAR, HQC) + ou meme_variable(VAR, HQD) + ou meme_variable(VAR, HQL) + ou meme_variable(VAR, HQM) + ou meme_variable(VAR, HQT) + ou meme_variable(VAR, HUA) + ou meme_variable(VAR, HUB) + ou meme_variable(VAR, HUC) + ou meme_variable(VAR, HUD) + ou meme_variable(VAR, HUE) + ou meme_variable(VAR, HUF) + ou meme_variable(VAR, HUG) + ou meme_variable(VAR, HUH) + ou meme_variable(VAR, HUI) + ou meme_variable(VAR, HUJ) + ou meme_variable(VAR, HUK) + ou meme_variable(VAR, HUL) + ou meme_variable(VAR, HUM) + ou meme_variable(VAR, HUN) + ou meme_variable(VAR, HUO) + ou meme_variable(VAR, HUP) + ou meme_variable(VAR, HUQ) + ou meme_variable(VAR, HUR) + ou meme_variable(VAR, HUS) + ou meme_variable(VAR, HUT) + ou meme_variable(VAR, HUU) + ou meme_variable(VAR, HVA) + ou meme_variable(VAR, HVB) + ou meme_variable(VAR, HVC) + ou meme_variable(VAR, HVD) + ou meme_variable(VAR, HVE) + ou meme_variable(VAR, HVF) + ou meme_variable(VAR, HVG) + ou meme_variable(VAR, HVK) + ou meme_variable(VAR, HVL) + ou meme_variable(VAR, HVM) + ou meme_variable(VAR, HVN) + ou meme_variable(VAR, HVO) + ou meme_variable(VAR, HYE) + ou meme_variable(VAR, HYF) + ou meme_variable(VAR, HYG) + ou meme_variable(VAR, HYH) + ou meme_variable(VAR, HYI) + ou meme_variable(VAR, HYJ); diff --git a/m_ext/2025/correctif.m b/m_ext/2025/correctif.m new file mode 100644 index 000000000..01e34a443 --- /dev/null +++ b/m_ext/2025/correctif.m @@ -0,0 +1,6719 @@ +# correctif +# testé avec la révision 36674 + +AFF : const = 0; +CPTOTO : calculee primrest = 0 : ""; + +MAX_ID_EVT: calculee primrest = 0 : "" ; + +N_INDEFINIE : const = 0; +N_REVENU : const = 1; +N_CHARGE : const = 2; + +SENS_R : const = 0; +SENS_M : const = 1; +SENS_P : const = 2; +SENS_C : const = 3; + +SF_INVALIDE : const = 0; +SF_MARIAGE : const = 1; +SF_CELIBAT : const = 2; +SF_DIVORCE : const = 3; +SF_PACSE : const = 4; +SF_VEUVAGE_TRUE : const = 5; +SF_VEUVAGE_FALSE : const = 6; + +TL_TL_ACQUISE : const = 0; +TL_TL_DEFAUT_2042 : const = 1; +TL_TL_MAUVAISE_FOI : const = 2; + +MAJ_TL : const = 0; +MAJ_NON_TL : const = 1; +MAJ_TL15 : const = 2; +MAJ_NON_TL15 : const = 3; +MAJ_RAPPEL_C : const = 4; +MAJ_RAPPEL_CP : const = 5; +MAJ_RAPPEL_CP01 : const = 6; +MAJ_RAPPEL_CP22 : const = 7; +MAJ_RAPPEL_CP24 : const = 8; +MAJ_RAPPEL_F : const = 9; +MAJ_RAPPEL_NF : const = 10; +MAJ_RAPPEL_M : const = 11; +MAJ_RAPPEL_MF : const = 12; +MAJ_RAPPEL_NON_M : const = 13; +MAJ_RAPPEL_P : const = 14; +MAJ_RAPPEL_R : const = 15; +MAJ_RAPPEL_R55 : const = 16; +MAJ_1728 : const = 17; +MAJ_ABAT_20 : const = 18; +MAJ_CODE_1729_2A5 : const = 19; +MAJ_CODE_1729_6 : const = 20; +MAJ_CODE_22 : const = 21; +MAJ_CODE_24 : const = 22; +MAJ_CONTEXTE_22 : const = 23; +MAJ_MENTION_EXP_99 : const = 24; +MAJ_MENTION_EXP_99R : const = 25; +MAJ_NON_MENTION_EXP : const = 26; + +INR_FLAG_INR_NON_TL : const = 2; +INR_FLAG_INR_TL : const = 3; + +ID_SANS_TRAITEMENT : const = 0; +ID_CUMULE_CHAMP_BASE_TL : const = 1; +ID_CUMULE_BASE_TL_INIT : const = 2; +ID_CUMULE_CHAMP_BASE_TL_RECT : const = 3; +ID_TRAITE_MAJO_P : const = 4; + +cible clear_majo_str_tr: +application: iliad; +iterer : variable I : entre 0..25 increment 1 : dans ( + MAJO_STR_TR[I] = 0; +) + +cible affect_str_tr: +application: iliad; +CORR.STR_TR00 = MAJO_STR_TR[0]; +CORR.STR_TR01 = MAJO_STR_TR[1]; +CORR.STR_TR02 = MAJO_STR_TR[2]; +CORR.STR_TR03 = MAJO_STR_TR[3]; +CORR.STR_TR04 = MAJO_STR_TR[4]; +CORR.STR_TR05 = MAJO_STR_TR[5]; +CORR.STR_TR06 = MAJO_STR_TR[6]; +CORR.STR_TR07 = MAJO_STR_TR[7]; +CORR.STR_TR08 = MAJO_STR_TR[8]; +CORR.STR_TR09 = MAJO_STR_TR[9]; +CORR.STR_TR10 = MAJO_STR_TR[10]; +CORR.STR_TR11 = MAJO_STR_TR[11]; +CORR.STR_TR12 = MAJO_STR_TR[12]; +CORR.STR_TR13 = MAJO_STR_TR[13]; +CORR.STR_TR14 = MAJO_STR_TR[14]; +CORR.STR_TR15 = MAJO_STR_TR[15]; +CORR.STR_TR16 = MAJO_STR_TR[16]; +CORR.STR_TR17 = MAJO_STR_TR[17]; +CORR.STR_TR18 = MAJO_STR_TR[18]; +CORR.STR_TR19 = MAJO_STR_TR[19]; +CORR.STR_TR20 = MAJO_STR_TR[20]; +CORR.STR_TR21 = MAJO_STR_TR[21]; +CORR.STR_TR22 = MAJO_STR_TR[22]; +CORR.STR_TR23 = MAJO_STR_TR[23]; +CORR.STR_TR24 = MAJO_STR_TR[24]; +CORR.STR_TR25 = MAJO_STR_TR[25]; + +cible init_variables: +application: iliad; +GLOBAL.NB_STRATES = 26; +GLOBAL.MAX_ID_EVT = -2; +# Données globales +GLOBAL.PRESENT_8VV = 0; +GLOBAL.PRESENT_8VW = 0; +GLOBAL.PRESENT_9YT = 0; +GLOBAL.MONTANT_9YT = 0; +GLOBAL.PENALITE_9YT = 0; +GLOBAL.SENS_9YT = SENS_R; +GLOBAL.NUM_EVT_9YT = 0; +GLOBAL.IND_20_9YT = 0; +GLOBAL.BASE_TL_9YT = 0; +GLOBAL.PRESENT_9YU = 0; +GLOBAL.MONTANT_9YU = 0; +GLOBAL.PENALITE_9YU = 0; +GLOBAL.SENS_9YU = SENS_R; +GLOBAL.NUM_EVT_9YU = 0; +GLOBAL.DATE_9YU = 0; +GLOBAL.PRESENT_9XT = 0; +GLOBAL.MONTANT_9XT = 0; +GLOBAL.PENALITE_9XT = 0; +GLOBAL.SENS_9XT = SENS_R; +GLOBAL.NUM_EVT_9XT = 0; +GLOBAL.IND_20_9XT = 0; +GLOBAL.BASE_TL_9XT = 0; +GLOBAL.PRESENT_9XU = 0; +GLOBAL.MONTANT_9XU = 0; +GLOBAL.PENALITE_9XU = 0; +GLOBAL.SENS_9XU = SENS_R; +GLOBAL.NUM_EVT_9XU = 0; +GLOBAL.DATE_9XU = 0; +GLOBAL.PRESENT_REGCO = 0; +GLOBAL.PENALITE_REGCO = 0; +GLOBAL.NUM_EVT_REGCO = 0; +GLOBAL.NUM_RAP_REGCO = 0; +GLOBAL.IND_20_REGCO = 0; +GLOBAL.PREMIER_EVT = 0; +GLOBAL.CODE_9ZA = 0; +GLOBAL.SAUVE_INR_R99 = 0; +GLOBAL.ANNEE_DECES_CONJOINT = 0; +GLOBAL.NB_RAPPELS_RES = 0; +# sommes inr 2 +GLOBAL.INR_SOMMEBAND_2 = 0; +GLOBAL.INR_SOMMEBA_2 = 0; +GLOBAL.INR_SOMMEBICND_2 = 0; +GLOBAL.INR_SOMMEBIC_2 = 0; +GLOBAL.INR_SOMMEBNCND_2 = 0; +GLOBAL.INR_SOMMEBNC_2 = 0; +GLOBAL.INR_SOMMEGLOBAL_2 = 0; +GLOBAL.INR_SOMMEGLOBND_2 = 0; +GLOBAL.INR_SOMMELOC_2 = 0; +GLOBAL.INR_SOMMEMOND_2 = 0; +GLOBAL.INR_SOMMERCM_2 = 0; +GLOBAL.INR_SOMMERF_2 = 0; +GLOBAL.INR_SOMMERI_2 = 0; +# Données de Reference +GLOBAL.D2042_NB = 0; +GLOBAL.DEFAUT = 0; +GLOBAL.DEFAUT10 = 0; +GLOBAL.DEFAUT11 = 0; +GLOBAL.DEFAUT1011 = 0; +GLOBAL.RETARD = 0; +GLOBAL.RETARD07 = 0; +GLOBAL.RETARD08 = 0; +GLOBAL.RETARD0718 = 0; +GLOBAL.RETARD101718 = 0; +GLOBAL.RETARD22 = 0; +GLOBAL.RETARD99 = 0; +GLOBAL.RECTIF = 0; +GLOBAL.RECTIF_MAJO = 0; +GLOBAL.MENTION_EXP = 0; +GLOBAL.CORR_RJLJ = 0; +GLOBAL.CODE_PENA = 0; +GLOBAL.CODE_PENA_ISF = 0; +GLOBAL.DATE = 0; +GLOBAL.SF_INITIALE = SF_INVALIDE; +GLOBAL.SF_COURANTE = SF_INVALIDE; +GLOBAL.SF_PRIMITIF = 0; +GLOBAL.R_TARDIF = 0; +GLOBAL.LIMELIGHT = 0; +GLOBAL.ISF_PRIM = 0; +GLOBAL.PRESENT_R10 = 0; +GLOBAL.PRESENT_R30 = 0; +GLOBAL.PRESENT_R32 = 0; +GLOBAL.PREM_8_11 = 0; +GLOBAL.PENA_994 = 0; +GLOBAL.FLAGMENC = 0; +# tl +GLOBAL.TL_D2042_NB = 0; +GLOBAL.TL_D2042_INIT_NB = 0; +GLOBAL.TL_D2042_RECT_NB = 0; +GLOBAL.TL_BASE_TL = 0; +GLOBAL.TL_BASE_TL_INIT = 0; +GLOBAL.TL_BASE_TL_RECT = 0; +GLOBAL.TL_BASE_TL_TBTC = 0; +GLOBAL.TL_BASE_TL_TBTC_INIT = 0; +GLOBAL.TL_BASE_TL_TBTC_RECT = 0; +GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +# tl mauvaise foi +GLOBAL.TL_MF_MFCDIS = 0; +GLOBAL.TL_MF_MFCHR = 0; +GLOBAL.TL_MF_MFCHR7 = 0; +GLOBAL.TL_MF_MFCS = 0; +GLOBAL.TL_MF_MFCSAL = 0; +GLOBAL.TL_MF_MFCVN = 0; +GLOBAL.TL_MF_MFGAIN = 0; +GLOBAL.TL_MF_MFGLO = 0; +GLOBAL.TL_MF_MFIFI = 0; +GLOBAL.TL_MF_MFIR = 0; +GLOBAL.TL_MF_MFLOY = 0; +GLOBAL.TL_MF_MFMCSG820 = 0; +GLOBAL.TL_MF_MFPCAP = 0; +GLOBAL.TL_MF_MFPS = 0; +GLOBAL.TL_MF_MFPSOL = 0; +GLOBAL.TL_MF_MFRD = 0; +GLOBAL.TL_MF_MFREGV = 0; +GLOBAL.TL_MF_MFRSE1 = 0; +GLOBAL.TL_MF_MFRSE2 = 0; +GLOBAL.TL_MF_MFRSE3 = 0; +GLOBAL.TL_MF_MFRSE4 = 0; +GLOBAL.TL_MF_MFRSE5 = 0; +GLOBAL.TL_MF_MFRSE6 = 0; +GLOBAL.TL_MF_MFRSE7 = 0; +GLOBAL.TL_MF_MFTAXAGA = 0; +# inr +GLOBAL.INR_NB_MOIS = 0; +GLOBAL.INR_NB_MOIS2 = 0; +GLOBAL.INR_NB_MOIS_ISF = 0; +GLOBAL.INR_ANNEE_COR = 0; +GLOBAL.INR_PASDINR = 0; +# majo +GLOBAL.MAJO_D2042_STRATE_NB = 0; +GLOBAL.MAJO_D2042_P_NB = 0; +GLOBAL.MAJO_TAUX_STRATE = 0; +GLOBAL.MAJO_CODE_STRATE = 0; +GLOBAL.MAJO_TARDIF_EVT2 = 0; +calculer cible clear_majo_str_tr : espace GLOBAL; +GLOBAL.MAJO_PREM_STR = 0; +GLOBAL.MAJO_NB_STR_TR = 0; +GLOBAL.MAJO_DERN_STR_TR = 0; +GLOBAL.MAJO_NUM_STRATE = 0; +# prorata +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; +# art1731 +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +cible signaler_erreurs: +application: iliad; +si nb_anomalies() > 0 alors + nettoie_erreurs_finalisees; + finalise_erreurs; + exporte_erreurs; + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +sinon + finalise_erreurs; +finsi + +cible signaler_erreur_ano: +application: iliad; +finalise_erreurs; +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) +stop application; + +cible aff: +application: iliad; +arguments: VAR; +si positif(AFF) alors + afficher_erreur "prout " nom(VAR) " = " (VAR) "\n"; +finsi + +cible enchaine_calcul_corr_5: +application: iliad; +V_ACO_MTAP = 0; +V_NEGACO = 0; +si positif(AFF) alors + afficher_erreur "prout 0 " nom(GLOBAL.CPTOTO) " = " (GLOBAL.CPTOTO + 0) "\n"; + calculer cible aff : avec TL_MF; + calculer cible aff : avec MFIR; + calculer cible aff : avec FLAG_RETARD; + calculer cible aff : avec FLAG_DEFAUT; + calculer cible aff : avec PASS_TLIR; + calculer cible aff : avec NUM_IR_TL; + calculer cible aff : avec DEN_IR_TL; + calculer cible aff : avec RAP_RNI; + calculer cible aff : avec RAP_EFF; + calculer cible aff : avec RAP_PVQ; + calculer cible aff : avec RAP_PV; + calculer cible aff : avec RAP_RI; + calculer cible aff : avec RAP_CI; + + afficher_erreur "prout\n"; +finsi +nettoie_erreurs; +calculer cible traite_double_liquidation_2; +si positif(AFF) alors + calculer cible aff : avec TL_MF; + calculer cible aff : avec MFIR; + calculer cible aff : avec FLAG_RETARD; + calculer cible aff : avec FLAG_DEFAUT; + calculer cible aff : avec PASS_TLIR; + calculer cible aff : avec NUM_IR_TL; + calculer cible aff : avec DEN_IR_TL; + calculer cible aff : avec RAP_RNI; + calculer cible aff : avec RAP_EFF; + calculer cible aff : avec RAP_PVQ; + calculer cible aff : avec RAP_PV; + calculer cible aff : avec RAP_RI; + calculer cible aff : avec RAP_CI; + afficher_erreur "prout ---\n"; +finsi +GLOBAL.CPTOTO = GLOBAL.CPTOTO + 1; + +cible enchaine_calcul_prim_copie: +application: iliad; +calculer cible enchaine_calcul_corr_5 : espace PRIM_COPIE; + +cible enchaine_calcul_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible effacer_base_etc : espace GLOBAL; + calculer cible traite_double_liquidation_2_prim; + calculer cible sauve_base_initial_prim; + calculer cible sauve_base_1728_prim; + calculer cible sauve_base_anterieure_prim; + calculer cible sauve_base_anterieure_cor_prim; + calculer cible sauve_base_inr_inter22_prim; +sinon + GLOBAL.V_ACO_MTAP = 0; + GLOBAL.V_NEGACO = 0; + calculer cible traite_double_liquidation_2_prim; +finsi + +cible enchaine_calcul_corr: +application: iliad; +si CORR.V_IND_TRAIT = 1 alors + calculer cible effacer_base_etc : espace CORR; + calculer cible traite_double_liquidation_2_corr; + calculer cible sauve_base_initial_corr; + calculer cible sauve_base_1728_corr; + calculer cible sauve_base_anterieure_corr; + calculer cible sauve_base_anterieure_cor_corr; + calculer cible sauve_base_inr_inter22_corr; +sinon + calculer cible enchaine_calcul_corr_5 : espace CORR; +finsi + +cible enchaine_verification_prim: +application: iliad; +si GLOBAL.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_prim; +sinon + calculer cible verif_saisie_cohe_corrective_prim; +finsi + +cible enchaine_verification_corr: +application: iliad; +si CORR.V_IND_TRAIT = 4 alors + calculer cible verif_saisie_cohe_primitive_corr; +sinon + calculer cible verif_saisie_cohe_corrective_corr; +finsi + +cible reset_saisie_calc: +application: iliad; +variables_temporaires: IND_TRAIT_SAV; +IND_TRAIT_SAV = CORR.V_IND_TRAIT; +iterer +: variable V +: categorie saisie *, calculee +: espace CORR +: dans ( + V = indefini; +) +CORR.V_IND_TRAIT = IND_TRAIT_SAV; + +cible reset_codes_rappel: +application: iliad; +CORR.PEN_RAPPEL = indefini; +CORR.MOIS_RAPPEL = indefini; +CORR.ANNEE_RAPPEL = indefini; +CORR.SENS_RAPPEL = indefini; +CORR.MONT_RAPPEL = indefini; +CORR.NUM_RAPPEL = indefini; +CORR.AB20_RAPPEL = indefini; +CORR.EVT_RAPPEL = indefini; +CORR.BTOL_RAPPEL = indefini; +CORR.COD_RAPPEL = indefini; + +cible add_majo_T_RABP: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABP07 = GLOBAL.MAJO_T_RABP07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABP08 = GLOBAL.MAJO_T_RABP08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABP09 = GLOBAL.MAJO_T_RABP09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABP10 = GLOBAL.MAJO_T_RABP10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABP11 = GLOBAL.MAJO_T_RABP11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABP12 = GLOBAL.MAJO_T_RABP12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABP17 = GLOBAL.MAJO_T_RABP17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABP31 = GLOBAL.MAJO_T_RABP31 + MONTANT; +) + +cible add_majo_T_RABPPS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA): ( + cas 7: GLOBAL.MAJO_T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31 + MONTANT; +) + +cible add_majo_T_RABPCS: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31 + MONTANT; +) + +cible add_majo_T_RABPRD: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31 + MONTANT; +) + +cible add_majo_T_RABPCH: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31 + MONTANT; +) +cible add_majo_T_RABPLO: +application: iliad; +arguments: PENA, MONTANT; +aiguillage (PENA) : ( + cas 7: GLOBAL.MAJO_T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07 + MONTANT; + cas 8: GLOBAL.MAJO_T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08 + MONTANT; + cas 9: GLOBAL.MAJO_T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09 + MONTANT; + cas 10: GLOBAL.MAJO_T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10 + MONTANT; + cas 11: GLOBAL.MAJO_T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11 + MONTANT; + cas 12: GLOBAL.MAJO_T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12 + MONTANT; + cas 17: GLOBAL.MAJO_T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17 + MONTANT; + cas 31: GLOBAL.MAJO_T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31 + MONTANT; +) + +cible contexte_2042_INR: +application: iliad; +CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; +CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; +CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; +CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; +CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; +CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; +CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; +CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; +CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; +CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; +CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; +CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; +CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; + +cible contexte_2042_TL_Ref: +application: iliad; +CORR.SOMMEBAND_2 = 0; +CORR.SOMMEBA_2 = 0; +CORR.SOMMEBICND_2 = 0; +CORR.SOMMEBIC_2 = 0; +CORR.SOMMEBNCND_2 = 0; +CORR.SOMMEBNC_2 = 0; +CORR.SOMMEGLOBAL_2 = 0; +CORR.SOMMEGLOBND_2 = 0; +CORR.SOMMELOC_2 = 0; +CORR.SOMMEMOND_2 = 0; +CORR.SOMMERCM_2 = 0; +CORR.SOMMERF_2 = 0; +CORR.SOMMERI_2 = 0; + +cible affect_code: +application: iliad; +variables_temporaires: PENA, I; + si RETARD > 0 alors + PENA = GLOBAL.CODE_PENA; + sinon + PENA = GLOBAL.MAJO_CODE_STRATE; + finsi + aiguillage (PENA) : ( + cas 1 : I = 25; + cas 2 : I = 23; + cas 3 : I = 14; + cas 4 : I = 9; + cas 5 : I = 7; + cas 6 : I = 3; + cas 7 : + cas 18 : I = 17; + cas 8 : I = 12; + cas 10 : I = 16; + cas 11 : I = 11; + cas 17 : I = 15; + cas 22 : I = 24; + cas 30 : I = 10; + cas 31 : I = 6; + cas 32 : I = 5; + cas 35 : I = 9; + cas 55 : I = 13; + cas 99 : I = 0; + cas indefini : + par_defaut : stop cible; + ) + MAJO_STR_TR[I] = 1; + +cible remplit_tgv_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_inr_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_p: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_majo_d2042_strate: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_STRATE +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042 +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_init: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_INIT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible remplit_tgv_tl_d2042_rect: +application: iliad; +variables_temporaires: UN_NEG; +UN_NEG = 0; +iterer +: variable VAR +: categorie saisie * +: espace TL_D2042_RECT +: dans ( + si present(VAR) et VAR >= 0 alors + CORR.VAR = VAR; + sinon_si UN_NEG = 0 alors + leve_erreur A72207; + UN_NEG = 1; + finsi +) + +cible set_rappel_ifi_prim: +application: iliad; +si + GLOBAL.COD9AA != 0 ou GLOBAL.COD9AB != 0 ou GLOBAL.COD9AC != 0 + ou GLOBAL.COD9AD != 0 ou GLOBAL.COD9AE != 0 ou GLOBAL.COD9BA != 0 + ou GLOBAL.COD9BB != 0 ou GLOBAL.COD9CA != 0 ou GLOBAL.COD9GF != 0 + ou GLOBAL.COD9GH != 0 ou GLOBAL.COD9GL != 0 ou GLOBAL.COD9GM != 0 + ou GLOBAL.COD9GN != 0 ou GLOBAL.COD9GY != 0 ou GLOBAL.COD9NC != 0 + ou GLOBAL.COD9NG != 0 ou GLOBAL.COD9PR != 0 ou GLOBAL.COD9PX != 0 + ou GLOBAL.COD9RS != 0 + ou GLOBAL.CMAJ_ISF != 0 # 9XT + ou GLOBAL.MOISAN_ISF != 0 # 9XU +alors + GLOBAL.ISF_PRIM = 1; +finsi + +cible calcul_1731: +application: iliad; +calculer cible range_base_corr_corrige; +CORR.VARR30R32 = GLOBAL.ART1731_SOMME_R3032; +CORR.VARR10 = GLOBAL.ART1731_PRESENT_R10; +CORR.VARR30 = GLOBAL.ART1731_PRESENT_R30; +CORR.VARR32 = GLOBAL.ART1731_PRESENT_R32; + +cible init_1731: +application: iliad; +CORR.VARR30R32 = 0; +CORR.FLAG_INR_REF = 0; +CORR.PREM8_11 = GLOBAL.PREM_8_11; +CORR.PENA994 = GLOBAL.PENA_994; + +cible empty_art1731: +application: iliad; +GLOBAL.COD_RAPPEL = 0; +GLOBAL.ART1731_SOMME_R3032 = 0; +GLOBAL.ART1731_PRESENT_R10 = 0; +GLOBAL.ART1731_PRESENT_R30 = 0; +GLOBAL.ART1731_PRESENT_R32 = 0; + +fonction vers_nature: +application: iliad; +arguments: ATTR; +resultat: NAT; +si ATTR = 0 alors + NAT = N_REVENU; +sinon_si ATTR = 1 alors + NAT = N_CHARGE; +sinon + NAT = N_INDEFINIE; +finsi + +cible get_nature: +application: iliad; +arguments: NATURE, VAR; +NATURE = 0; +si + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + si dans_domaine(VAR, saisie contexte) alors + NATURE = vers_nature(attribut(VAR, modcat)); + sinon_si + # Il s'agit de la même condition qu'au dessus ? + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon_si dans_domaine(VAR, calculee *) alors + NATURE = vers_nature(attribut(VAR, nat_code)); + sinon + NATURE = N_INDEFINIE; + finsi +sinon_si dans_domaine(VAR, saisie contexte) alors + si meme_variable(VAR, V_REGCO) alors + NATURE = N_REVENU; + sinon_si + meme_variable(VAR, V_EAG) + ou meme_variable(VAR, V_EAD) + ou meme_variable(VAR, V_CNR) + ou meme_variable(VAR, V_CNR2) + ou meme_variable(VAR, V_CR2) + alors + NATURE = N_CHARGE; + sinon + NATURE = N_REVENU; + finsi +sinon_si + dans_domaine(VAR, saisie variation) + ou dans_domaine(VAR, saisie penalite) + ou dans_domaine(VAR, calculee *) +alors + NATURE = N_REVENU; +finsi + +cible get_abat: +application: iliad; +arguments: ABAT, VAR; +si + dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) +alors + ABAT = attribut(VAR, ind_abat); +sinon + ABAT = 0; +finsi + +cible calcul_cum_p: +application: iliad; +variables_temporaires: NATURE; +iterer +: variable VAR +: categorie saisie * +: espace MAJO_D2042_P +: avec + present(VAR) + et non ( + meme_variable(VAR, DAT) ou meme_variable(VAR, ANTCR) + ou meme_variable(VAR, ANTIR) ou meme_variable(VAR, ANTRE) + ou meme_variable(VAR, CSANT) ou meme_variable(VAR, FORCA) + ou meme_variable(VAR, FORPA) ou meme_variable(VAR, FORVA) + ou meme_variable(VAR, IDANT) ou meme_variable(VAR, NIMPA) + ou meme_variable(VAR, NOTRAIT) ou meme_variable(VAR, PSANT) + ou meme_variable(VAR, RDANT) ou meme_variable(VAR, ANC_BAR) + ou meme_variable(VAR, ACO_MTAP) ou meme_variable(VAR, INDG) + ou meme_variable(VAR, CHRANT) ou meme_variable(VAR, CODILIAD) + ) +: dans ( + calculer cible get_nature : avec NATURE, VAR; + si NATURE = N_REVENU alors + aiguillage (attribut(VAR, cotsoc)) : ( + cas 1: + si attribut(VAR, categorie_TL) dans (20, 21) alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + finsi + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + cas 5: + si attribut(VAR, categorie_TL) dans (20, 21) alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + finsi + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + cas 9: + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + cas 10: + GLOBAL.MAJO_T_RABPPS = GLOBAL.MAJO_T_RABPPS + VAR; + GLOBAL.MAJO_T_RABPCS = GLOBAL.MAJO_T_RABPCS + VAR; + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 11: cas 12: cas 13: cas 14: cas 19: cas 20: cas 21: + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + cas 16: + GLOBAL.MAJO_T_RABPLO = GLOBAL.MAJO_T_RABPLO + VAR; + cas 18: + si attribut(VAR, categorie_TL) dans (20, 21) alors + GLOBAL.MAJO_T_RABP = GLOBAL.MAJO_T_RABP + VAR; + finsi + GLOBAL.MAJO_T_RABPRD = GLOBAL.MAJO_T_RABPRD + VAR; + GLOBAL.MAJO_T_RABPCH = GLOBAL.MAJO_T_RABPCH + VAR; + ) + finsi +) + +cible process_penalite: +application: iliad; +arguments: PENA_CODE, P; +variables_temporaires: P_MAX, P_VIEUX, P_MULTI; +P_MAX = inf(PENA_CODE / 1000) % 100; +P_VIEUX = inf(PENA_CODE / 10) % 100; +P_MULTI = inf(PENA_CODE) % 10; +si P >= P_MAX alors + P_MAX = P; +finsi +si P != P_VIEUX alors + si P_VIEUX != 0 alors + P_MULTI = 1; + finsi + P_VIEUX = P; +finsi +PENA_CODE = (1000 * P_MAX) + (10 * P_VIEUX) + P_MULTI; + +fonction get_pMax: +application: iliad; +arguments: CODE; +resultat: R; +R = inf(CODE / 1000); + +fonction get_pVieux: +application: iliad; +arguments: CODE; +resultat: R; +R = inf(CODE / 10) % 100; + +fonction get_pMulti: +application: iliad; +arguments: CODE; +resultat: R; +R = positif(inf(CODE) % 10); + +cible detecte_penalites: +application: iliad; +variables_temporaires: + PENA_CODE_I, PENA_CODE_1728, PENA_CODE_ICRP, PENA_CODE_1728CRP, + PENA_CODE_C, PENA_CODE_R, PENA_CODE_P, PENA_CODE_ITAXA, + PENA_CODE_1758AIR, PENA_CODE_1758ATA, PENA_CODE_ICSAL, PENA_CODE_1728CSAL, + PENA_CODE_CSAL, PENA_CODE_ICDIS, PENA_CODE_1728CDIS, PENA_CODE_CDIS, + PENA_CODE_ICAP, PENA_CODE_1728CAP, PENA_CODE_CAP, PENA_CODE_1758ACAP, + PENA_CODE_ICHR, PENA_CODE_1728CHR, PENA_CODE_CHR, PENA_CODE_1758ACHR, + PENA_CODE_IISF, PENA_CODE_1728ISF, PENA_CODE_ISF, PENA_CODE_IGAIN, + PENA_CODE_1728GAIN, PENA_CODE_GAIN, PENA_CODE_IRSE1, PENA_CODE_1728RSE1, + PENA_CODE_RSE1, PENA_CODE_IRSE2, PENA_CODE_1728RSE2, PENA_CODE_RSE2, + PENA_CODE_IRSE3, PENA_CODE_1728RSE3, PENA_CODE_RSE3, PENA_CODE_IRSE4, + PENA_CODE_1728RSE4, PENA_CODE_RSE4, PENA_CODE_ICVN, PENA_CODE_1728CVN, + PENA_CODE_CVN, PENA_CODE_IGLO, PENA_CODE_1728GLO, PENA_CODE_GLO, + PENA_CODE_IRSE5, PENA_CODE_1728RSE5, PENA_CODE_RSE5, PENA_CODE_IRSE6, + PENA_CODE_1728RSE6, PENA_CODE_RSE6, PENA_CODE_IRSE7, PENA_CODE_1728RSE7, + PENA_CODE_RSE7, PENA_CODE_IC820, PENA_CODE_1728C820, PENA_CODE_C820, + PENA_CODE_IRSE8, PENA_CODE_1728RSE8, PENA_CODE_RSE8, PENA_CODE_REGV, + CS, SENS, PENA, P; +PENA_CODE_I = 0; +PENA_CODE_1728 = 0; +PENA_CODE_ICRP = 0; +PENA_CODE_1728CRP = 0; +PENA_CODE_C = 0; +PENA_CODE_R = 0; +PENA_CODE_P = 0; +PENA_CODE_ITAXA = 0; +PENA_CODE_1758AIR = 0; +PENA_CODE_1758ATA = 0; +PENA_CODE_ICSAL = 0; +PENA_CODE_1728CSAL = 0; +PENA_CODE_CSAL = 0; +PENA_CODE_ICDIS = 0; +PENA_CODE_1728CDIS = 0; +PENA_CODE_CDIS = 0; +PENA_CODE_ICAP = 0; +PENA_CODE_1728CAP = 0; +PENA_CODE_CAP = 0; +PENA_CODE_1758ACAP = 0; +PENA_CODE_ICHR = 0; +PENA_CODE_1728CHR = 0; +PENA_CODE_CHR = 0; +PENA_CODE_1758ACHR = 0; +PENA_CODE_IISF = 0; +PENA_CODE_1728ISF = 0; +PENA_CODE_ISF = 0; +PENA_CODE_IGAIN = 0; +PENA_CODE_1728GAIN = 0; +PENA_CODE_GAIN = 0; +PENA_CODE_IRSE1 = 0; +PENA_CODE_1728RSE1 = 0; +PENA_CODE_RSE1 = 0; +PENA_CODE_IRSE2 = 0; +PENA_CODE_1728RSE2 = 0; +PENA_CODE_RSE2 = 0; +PENA_CODE_IRSE3 = 0; +PENA_CODE_1728RSE3 = 0; +PENA_CODE_RSE3 = 0; +PENA_CODE_IRSE4 = 0; +PENA_CODE_1728RSE4 = 0; +PENA_CODE_RSE4 = 0; +PENA_CODE_ICVN = 0; +PENA_CODE_1728CVN = 0; +PENA_CODE_CVN = 0; +PENA_CODE_IGLO = 0; +PENA_CODE_1728GLO = 0; +PENA_CODE_GLO = 0; +PENA_CODE_IRSE5 = 0; +PENA_CODE_1728RSE5 = 0; +PENA_CODE_RSE5 = 0; +PENA_CODE_IRSE6 = 0; +PENA_CODE_1728RSE6 = 0; +PENA_CODE_RSE6 = 0; +PENA_CODE_IRSE7 = 0; +PENA_CODE_1728RSE7 = 0; +PENA_CODE_RSE7 = 0; +PENA_CODE_IC820 = 0; +PENA_CODE_1728C820 = 0; +PENA_CODE_C820 = 0; +PENA_CODE_IRSE8 = 0; +PENA_CODE_1728RSE8 = 0; +PENA_CODE_RSE8 = 0; +PENA_CODE_REGV = 0; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + CS = inf(attribut(champ_evenement(R, code), cotsoc)); + SENS = inf(champ_evenement(R, sens)); + PENA = inf(champ_evenement(R, penalite)); + si (GLOBAL.DEFAUT ou GLOBAL.RETARD) et SENS = SENS_R et PENA = 99 + alors + P = GLOBAL.CODE_PENA; + sinon + P = PENA; + finsi + si non (P dans (0, 1, 99)) alors + si P < 7 ou P dans (22, 24, 30, 32, 35, 55) alors + calculer cible process_penalite : avec PENA_CODE_I, P; + finsi + si non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21) + et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_ICRP, P; + finsi + si + CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23) + et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) + alors + calculer cible process_penalite : avec PENA_CODE_1728CRP, P; + finsi + si CS dans (17, 18) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICVN, P; + finsi + si CS dans (17, 18) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CVN, P; + finsi + si CS = 18 et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGLO, P; + finsi + si CS = 18 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GLO, P; + finsi + si CS dans (19, 20) et (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE5, P; + finsi + si CS dans (19, 20) et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE5, P; + finsi + si CS = 3 alors + calculer cible process_penalite : avec PENA_CODE_ITAXA, P; + finsi + si P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758AIR, P; + finsi + si CS = 3 et P dans (2, 10, 17) alors + calculer cible process_penalite : avec PENA_CODE_1758ATA, P; + finsi + si CS = 4 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICSAL, P; + finsi + si CS = 4 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CSAL, P; + finsi + si CS = 8 alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACHR, P; + finsi + si CS = 8 et (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICHR, P; + finsi + si CS = 8 et non (P < 7 ou P dans (22, 24, 30, 32, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CHR, P; + finsi + si CS = 9 alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et (P dans (2, 10, 17)) alors + calculer cible process_penalite : avec PENA_CODE_1758ACAP, P; + finsi + si CS = 9 et (P < 7 ou P dans (22, 24, 35, 55 )) alors + calculer cible process_penalite : avec PENA_CODE_ICAP, P; + finsi + si CS = 9 et non (P < 7 ou P dans (22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CAP, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_ICDIS, P; + finsi + si CS = 2 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728CDIS, P; + finsi + si CS = 15 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IGAIN, P; + finsi + si CS = 15 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728GAIN, P; + finsi + si CS = 11 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE1, P; + finsi + si CS = 11 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE1, P; + finsi + si CS dans (12, 21) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE2, P; + finsi + si CS dans (12, 21) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE2, P; + finsi + si CS = 13 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE3, P; + finsi + si CS = 13 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE3, P; + finsi + si CS = 14 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE4, P; + finsi + si CS = 14 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE4, P; + finsi + si CS dans (20, 21, 22) et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE6, P; + finsi + si CS dans (20, 21, 22) et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE6, P; + finsi + si CS = 23 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IC820, P; + finsi + si CS = 23 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728C820, P; + finsi + si CS = 22 et (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_IRSE8, P; + finsi + si CS = 22 et non (P < 7 ou P dans (22, 24, 30, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728RSE8, P; + finsi + si (P < 7 ou P = 35) alors + calculer cible process_penalite : avec PENA_CODE_IISF, P; + finsi + si (P dans (3, 4, 5, 7, 8, 10, 11, 17, 18, 22, 24, 35, 55)) alors + calculer cible process_penalite : avec PENA_CODE_1728ISF, P; + finsi + si CS dans (1, 7, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_C, P; + finsi + si CS dans (1, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23) alors + calculer cible process_penalite : avec PENA_CODE_R, P; + finsi + si CS dans (1, 10, 23) alors + calculer cible process_penalite : avec PENA_CODE_P, P; + finsi + si CS dans (17, 18) alors + calculer cible process_penalite : avec PENA_CODE_CVN, P; + finsi + si CS = 7 alors + calculer cible process_penalite : avec PENA_CODE_REGV, P; + finsi + si CS = 4 alors + calculer cible process_penalite : avec PENA_CODE_CSAL, P; + finsi + si CS = 2 alors + calculer cible process_penalite : avec PENA_CODE_CDIS, P; + finsi + si CS = 11 alors + calculer cible process_penalite : avec PENA_CODE_RSE1, P; + finsi + si CS dans (12, 21) alors + calculer cible process_penalite : avec PENA_CODE_RSE2, P; + finsi + si CS = 13 alors + calculer cible process_penalite : avec PENA_CODE_RSE3, P; + finsi + si CS = 14 alors + calculer cible process_penalite : avec PENA_CODE_RSE4, P; + finsi + si CS dans (19, 20) alors + calculer cible process_penalite : avec PENA_CODE_RSE5, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE6, P; + finsi + si CS dans (20, 21, 22) alors + calculer cible process_penalite : avec PENA_CODE_RSE7, P; + finsi + si CS = 23 alors + calculer cible process_penalite : avec PENA_CODE_C820, P; + finsi + si CS = 22 alors + calculer cible process_penalite : avec PENA_CODE_RSE8, P; + finsi + si CS = 15 alors + calculer cible process_penalite : avec PENA_CODE_GAIN, P; + finsi + si CS = 18 alors + calculer cible process_penalite : avec PENA_CODE_GLO, P; + finsi + finsi +) +CORR.V_CODPF1728 = get_pMax(PENA_CODE_1728); +CORR.V_CODPF1728C820 = get_pMax(PENA_CODE_1728C820); +CORR.V_CODPF1728CAP = get_pMax(PENA_CODE_1728CAP); +CORR.V_CODPF1728CDIS = get_pMax(PENA_CODE_1728CDIS); +CORR.V_CODPF1728CHR = get_pMax(PENA_CODE_1728CHR); +CORR.V_CODPF1728CRP = get_pMax(PENA_CODE_1728CRP); +CORR.V_CODPF1728CSAL = get_pMax(PENA_CODE_1728CSAL); +CORR.V_CODPF1728CVN = get_pMax(PENA_CODE_1728CVN); +CORR.V_CODPF1728GAIN = get_pMax(PENA_CODE_1728GAIN); +CORR.V_CODPF1728GLO = get_pMax(PENA_CODE_1728GLO); +CORR.V_CODPF1728ISF = get_pMax(PENA_CODE_1728ISF); +CORR.V_CODPF1728RSE1 = get_pMax(PENA_CODE_1728RSE1); +CORR.V_CODPF1728RSE2 = get_pMax(PENA_CODE_1728RSE2); +CORR.V_CODPF1728RSE3 = get_pMax(PENA_CODE_1728RSE3); +CORR.V_CODPF1728RSE4 = get_pMax(PENA_CODE_1728RSE4); +CORR.V_CODPF1728RSE5 = get_pMax(PENA_CODE_1728RSE5); +CORR.V_CODPF1728RSE6 = get_pMax(PENA_CODE_1728RSE6); +CORR.V_CODPF1728RSE7 = get_pMax(PENA_CODE_1728RSE7); +CORR.V_CODPF1728RSE8 = get_pMax(PENA_CODE_1728RSE8); +CORR.V_CODPFC = get_pMax(PENA_CODE_C); +CORR.V_CODPFC820 = get_pMax(PENA_CODE_C820); +CORR.V_CODPFCAP = get_pMax(PENA_CODE_CAP); +CORR.V_CODPFCDIS = get_pMax(PENA_CODE_CDIS); +CORR.V_CODPFCHR = get_pMax(PENA_CODE_CHR); +CORR.V_CODPFCSAL = get_pMax(PENA_CODE_CSAL); +CORR.V_CODPFCVN = get_pMax(PENA_CODE_CVN); +CORR.V_CODPFGAIN = get_pMax(PENA_CODE_GAIN); +CORR.V_CODPFGLO = get_pMax(PENA_CODE_GLO); +CORR.V_CODPFI = get_pMax(PENA_CODE_I); +CORR.V_CODPFIC820 = get_pMax(PENA_CODE_IC820); +CORR.V_CODPFICAP = get_pMax(PENA_CODE_ICAP); +CORR.V_CODPFICDIS = get_pMax(PENA_CODE_ICDIS); +CORR.V_CODPFICHR = get_pMax(PENA_CODE_ICHR); +CORR.V_CODPFICRP = get_pMax(PENA_CODE_ICRP); +CORR.V_CODPFICSAL = get_pMax(PENA_CODE_ICSAL); +CORR.V_CODPFICVN = get_pMax(PENA_CODE_ICVN); +CORR.V_CODPFIGAIN = get_pMax(PENA_CODE_IGAIN); +CORR.V_CODPFIGLO = get_pMax(PENA_CODE_IGLO); +CORR.V_CODPFIISF = get_pMax(PENA_CODE_IISF); +CORR.V_CODPFIRSE1 = get_pMax(PENA_CODE_IRSE1); +CORR.V_CODPFIRSE2 = get_pMax(PENA_CODE_IRSE2); +CORR.V_CODPFIRSE3 = get_pMax(PENA_CODE_IRSE3); +CORR.V_CODPFIRSE4 = get_pMax(PENA_CODE_IRSE4); +CORR.V_CODPFIRSE5 = get_pMax(PENA_CODE_IRSE5); +CORR.V_CODPFIRSE6 = get_pMax(PENA_CODE_IRSE6); +CORR.V_CODPFIRSE7 = get_pMax(PENA_CODE_IRSE7); +CORR.V_CODPFIRSE8 = get_pMax(PENA_CODE_IRSE8); +CORR.V_CODPFISF = get_pMax(PENA_CODE_ISF); +CORR.V_CODPFITAXA = get_pMax(PENA_CODE_ITAXA); +CORR.V_CODPFP = get_pMax(PENA_CODE_P); +CORR.V_CODPFR = get_pMax(PENA_CODE_R); +CORR.V_CODPFRSE1 = get_pMax(PENA_CODE_RSE1); +CORR.V_CODPFRSE2 = get_pMax(PENA_CODE_RSE2); +CORR.V_CODPFRSE3 = get_pMax(PENA_CODE_RSE3); +CORR.V_CODPFRSE4 = get_pMax(PENA_CODE_RSE4); +CORR.V_CODPFRSE5 = get_pMax(PENA_CODE_RSE5); +CORR.V_CODPFRSE6 = get_pMax(PENA_CODE_RSE6); +CORR.V_CODPFRSE7 = get_pMax(PENA_CODE_RSE7); +CORR.V_CODPFRSE8 = get_pMax(PENA_CODE_RSE8); +CORR.V_NBCOD1728 = get_pMulti(PENA_CODE_1728); +CORR.V_NBCOD1728C820 = get_pMulti(PENA_CODE_1728C820); +CORR.V_NBCOD1728CAP = get_pMulti(PENA_CODE_1728CAP); +CORR.V_NBCOD1728CDIS = get_pMulti(PENA_CODE_1728CDIS); +CORR.V_NBCOD1728CHR = get_pMulti(PENA_CODE_1728CHR); +CORR.V_NBCOD1728CRP = get_pMulti(PENA_CODE_1728CRP); +CORR.V_NBCOD1728CSAL = get_pMulti(PENA_CODE_1728CSAL); +CORR.V_NBCOD1728CVN = get_pMulti(PENA_CODE_1728CVN); +CORR.V_NBCOD1728GAIN = get_pMulti(PENA_CODE_1728GAIN); +CORR.V_NBCOD1728GLO = get_pMulti(PENA_CODE_1728GLO); +CORR.V_NBCOD1728ISF = get_pMulti(PENA_CODE_1728ISF); +CORR.V_NBCOD1728RSE1 = get_pMulti(PENA_CODE_1728RSE1); +CORR.V_NBCOD1728RSE2 = get_pMulti(PENA_CODE_1728RSE2); +CORR.V_NBCOD1728RSE3 = get_pMulti(PENA_CODE_1728RSE3); +CORR.V_NBCOD1728RSE4 = get_pMulti(PENA_CODE_1728RSE4); +CORR.V_NBCOD1728RSE5 = get_pMulti(PENA_CODE_1728RSE5); +CORR.V_NBCOD1728RSE6 = get_pMulti(PENA_CODE_1728RSE6); +CORR.V_NBCOD1728RSE7 = get_pMulti(PENA_CODE_1728RSE7); +CORR.V_NBCOD1728RSE8 = get_pMulti(PENA_CODE_1728RSE8); +CORR.V_NBCOD1758ACAP = get_pMulti(PENA_CODE_1758ACAP); +CORR.V_NBCOD1758ACHR = get_pMulti(PENA_CODE_1758ACHR); +CORR.V_NBCOD1758AIR = get_pMulti(PENA_CODE_1758AIR); +CORR.V_NBCOD1758ATA = get_pMulti(PENA_CODE_1758ATA); +CORR.V_NBCODC = get_pMulti(PENA_CODE_C); +CORR.V_NBCODC820 = get_pMulti(PENA_CODE_C820); +CORR.V_NBCODCDIS = get_pMulti(PENA_CODE_CDIS); +CORR.V_NBCODCSAL = get_pMulti(PENA_CODE_CSAL); +CORR.V_NBCODCVN = get_pMulti(PENA_CODE_CVN); +CORR.V_NBCODGAIN = get_pMulti(PENA_CODE_GAIN); +CORR.V_NBCODGLO = get_pMulti(PENA_CODE_GLO); +CORR.V_NBCODI = get_pMulti(PENA_CODE_I); +CORR.V_NBCODIC820 = get_pMulti(PENA_CODE_IC820); +CORR.V_NBCODICAP = get_pMulti(PENA_CODE_ICAP); +CORR.V_NBCODICDIS = get_pMulti(PENA_CODE_ICDIS); +CORR.V_NBCODICHR = get_pMulti(PENA_CODE_ICHR); +CORR.V_NBCODICRP = get_pMulti(PENA_CODE_ICRP); +CORR.V_NBCODICSAL = get_pMulti(PENA_CODE_ICSAL); +CORR.V_NBCODICVN = get_pMulti(PENA_CODE_ICVN); +CORR.V_NBCODIGAIN = get_pMulti(PENA_CODE_IGAIN); +CORR.V_NBCODIGLO = get_pMulti(PENA_CODE_IGLO); +CORR.V_NBCODIISF = get_pMulti(PENA_CODE_IISF); +CORR.V_NBCODIRSE1 = get_pMulti(PENA_CODE_IRSE1); +CORR.V_NBCODIRSE2 = get_pMulti(PENA_CODE_IRSE2); +CORR.V_NBCODIRSE3 = get_pMulti(PENA_CODE_IRSE3); +CORR.V_NBCODIRSE4 = get_pMulti(PENA_CODE_IRSE4); +CORR.V_NBCODIRSE5 = get_pMulti(PENA_CODE_IRSE5); +CORR.V_NBCODIRSE6 = get_pMulti(PENA_CODE_IRSE6); +CORR.V_NBCODIRSE7 = get_pMulti(PENA_CODE_IRSE7); +CORR.V_NBCODIRSE8 = get_pMulti(PENA_CODE_IRSE8); +CORR.V_NBCODISF = get_pMulti(PENA_CODE_ISF); +CORR.V_NBCODITAXA = get_pMulti(PENA_CODE_ITAXA); +CORR.V_NBCODP = get_pMulti(PENA_CODE_P); +CORR.V_NBCODR = get_pMulti(PENA_CODE_R); +CORR.V_NBCODRSE1 = get_pMulti(PENA_CODE_RSE1); +CORR.V_NBCODRSE2 = get_pMulti(PENA_CODE_RSE2); +CORR.V_NBCODRSE3 = get_pMulti(PENA_CODE_RSE3); +CORR.V_NBCODRSE4 = get_pMulti(PENA_CODE_RSE4); +CORR.V_NBCODRSE5 = get_pMulti(PENA_CODE_RSE5); +CORR.V_NBCODRSE6 = get_pMulti(PENA_CODE_RSE6); +CORR.V_NBCODRSE7 = get_pMulti(PENA_CODE_RSE7); +CORR.V_NBCODRSE8 = get_pMulti(PENA_CODE_RSE8); + +fonction is_1728_defaut: +application: iliad; +arguments: PENA; +resultat: R; +R = (PENA dans (10, 11, 12)); + +cible est_code_isf: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = + meme_variable(VAR, COD9AA) + ou meme_variable(VAR, COD9AB) + ou meme_variable(VAR, COD9AC) + ou meme_variable(VAR, COD9AD) + ou meme_variable(VAR, COD9AE) + ou meme_variable(VAR, COD9BA) + ou meme_variable(VAR, COD9BB) + ou meme_variable(VAR, COD9CA) + ou meme_variable(VAR, COD9GF) + ou meme_variable(VAR, COD9GH) + ou meme_variable(VAR, COD9GL) + ou meme_variable(VAR, COD9GM) + ou meme_variable(VAR, COD9GN) + ou meme_variable(VAR, COD9GY) + ou meme_variable(VAR, COD9NC) + ou meme_variable(VAR, COD9NG) + ou meme_variable(VAR, COD9PR) + ou meme_variable(VAR, COD9PX) + ou meme_variable(VAR, COD9RS) + ou meme_variable(VAR, CMAJ_ISF) + ou meme_variable(VAR, MOISAN_ISF); + +cible est_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +calculer cible est_code_isf : avec RESULTAT, VAR; +si positif(RESULTAT) alors + RESULTAT = (PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99)); +sinon + RESULTAT = (PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99)); +finsi + +cible controle_defaut_retard_2042: +application: iliad; +variables_temporaires: RAP_1728_SF, PENA, EST_1728, EST_ISF, NUM_EVT; +RAP_1728_SF = indefini; +iterer +: variable R +: entre 0 .. (nb_evenements() - 1) increment 1 +: dans ( + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si non present(RAP_1728_SF) alors + si + ( + positif(EST_1728) + et ( + meme_variable(champ_evenement(R, code), V_0AM) + ou meme_variable(champ_evenement(R, code), V_0AC) + ou meme_variable(champ_evenement(R, code), V_0AD) + ou meme_variable(champ_evenement(R, code), V_0AO) + ou meme_variable(champ_evenement(R, code), V_0AV) + ) + et non ( + positif(GLOBAL.V_0AM + 0) + ou positif(GLOBAL.V_0AC + 0) + ou positif(GLOBAL.V_0AD + 0) + ou positif(GLOBAL.V_0AO + 0) + ou positif(GLOBAL.V_0AV + 0) + ) + ) + ou (positif(EST_ISF) et GLOBAL.ISF_PRIM + 0 = 0) + alors + RAP_1728_SF = R; + finsi + finsi +) +si present(RAP_1728_SF) alors + PENA = champ_evenement(RAP_1728_SF, penalite); + GLOBAL.CODE_PENA = PENA; + GLOBAL.DATE = champ_evenement(RAP_1728_SF, date); + si PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (PENA = 10); + GLOBAL.DEFAUT11 = (PENA = 11); + GLOBAL.DEFAUT1011 = (PENA dans (10, 11)); + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD101718 = (PENA dans (10, 17, 18)); + GLOBAL.RETARD0718 = (PENA dans (7, 8, 17, 18)); + GLOBAL.RETARD08 = (PENA = 8); + GLOBAL.RETARD07 = (PENA dans (1, 7, 99)); + GLOBAL.RETARD22 = (PENA = 22); + GLOBAL.RETARD99 = (PENA dans (1, 99)); + finsi +finsi +si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9YT; + GLOBAL.DATE = GLOBAL.DATE_9YU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9YT != NUM_EVT et GLOBAL.MONTANT_9YT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.CODE_PENA = GLOBAL.MONTANT_9XT; + GLOBAL.DATE = GLOBAL.DATE_9XU; + NUM_EVT = champ_evenement(0, numero); + si GLOBAL.NUM_EVT_9XT != NUM_EVT et GLOBAL.MONTANT_9XT != 0 alors + si GLOBAL.CODE_PENA dans (10, 11, 12) alors + GLOBAL.DEFAUT = 1; + GLOBAL.DEFAUT10 = (GLOBAL.CODE_PENA = 10 ou positif(GLOBAL.DEFAUT10)); + GLOBAL.DEFAUT11 = (GLOBAL.CODE_PENA = 11 ou positif(GLOBAL.DEFAUT11)); + GLOBAL.RETARD = 0; + GLOBAL.RETARD08 = 0; + GLOBAL.RETARD07 = 0; + GLOBAL.RETARD22 = 0; + GLOBAL.RETARD99 = 0; + sinon + GLOBAL.RETARD = 1; + GLOBAL.RETARD07 = (GLOBAL.CODE_PENA = 7 ou positif(GLOBAL.RETARD07)); + GLOBAL.RETARD08 = (GLOBAL.CODE_PENA = 8 ou positif(GLOBAL.RETARD08)); + GLOBAL.RETARD22 = (GLOBAL.CODE_PENA = 22 ou positif(GLOBAL.RETARD22)); + GLOBAL.RETARD99 = (GLOBAL.CODE_PENA = 99 ou positif(GLOBAL.RETARD99)); + GLOBAL.DEFAUT = 0; + GLOBAL.DEFAUT10 = 0; + GLOBAL.DEFAUT11 = 0; + finsi + finsi +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + +cible prepare_tl: +application: iliad; +variables_temporaires: COMMENCE_PAR_7; +si positif(GLOBAL.DEFAUT) alors + GLOBAL.TL_NON_ACQUISE = TL_TL_DEFAUT_2042; + CORR.IND_TL_MF = 1; +sinon + GLOBAL.TL_D2042_NB = 0; + GLOBAL.TL_D2042_INIT_NB = 0; + GLOBAL.TL_D2042_RECT_NB = 0; + iterer + : variable VAR + : categorie saisie * + : dans ( + si present(D2042.VAR) alors + TL_D2042.VAR = D2042.VAR; + GLOBAL.TL_D2042_NB = GLOBAL.TL_D2042_NB + 1; + TL_D2042_INIT.VAR = D2042.VAR; + GLOBAL.TL_D2042_INIT_NB = GLOBAL.TL_D2042_INIT_NB + 1; + TL_D2042_RECT.VAR = D2042.VAR; + GLOBAL.TL_D2042_RECT_NB = GLOBAL.TL_D2042_RECT_NB + 1; + sinon + TL_D2042.VAR = indefini; + TL_D2042_INIT.VAR = indefini; + TL_D2042_RECT.VAR = indefini; + finsi + si present(D2042_ABAT.VAR) alors + TL_D2042_ABAT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_INIT.VAR = D2042_ABAT.VAR; + TL_D2042_ABAT_RECT.VAR = D2042_ABAT.VAR; + sinon + TL_D2042_ABAT.VAR = indefini; + TL_D2042_ABAT_INIT.VAR = indefini; + TL_D2042_ABAT_RECT.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) et attribut(VAR, categorie_TL) dans (40, 50) + : espace D2042 + : dans ( + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, VAR; + si positif(COMMENCE_PAR_7) alors + GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + VAR; + GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + VAR; + finsi + ) +finsi + +cible prepare_majo: +application: iliad; +GLOBAL.MAJO_T_RABP = 0; +GLOBAL.MAJO_T_RABP07 = 0; +GLOBAL.MAJO_T_RABP08 = 0; +GLOBAL.MAJO_T_RABP09 = 0; +GLOBAL.MAJO_T_RABP10 = 0; +GLOBAL.MAJO_T_RABP11 = 0; +GLOBAL.MAJO_T_RABP12 = 0; +GLOBAL.MAJO_T_RABP17 = 0; +GLOBAL.MAJO_T_RABP31 = 0; +GLOBAL.MAJO_T_RABPPS = 0; +GLOBAL.MAJO_T_RABPPS07 = 0; +GLOBAL.MAJO_T_RABPPS08 = 0; +GLOBAL.MAJO_T_RABPPS09 = 0; +GLOBAL.MAJO_T_RABPPS10 = 0; +GLOBAL.MAJO_T_RABPPS11 = 0; +GLOBAL.MAJO_T_RABPPS12 = 0; +GLOBAL.MAJO_T_RABPPS17 = 0; +GLOBAL.MAJO_T_RABPPS31 = 0; +GLOBAL.MAJO_T_RABPCS = 0; +GLOBAL.MAJO_T_RABPCS07 = 0; +GLOBAL.MAJO_T_RABPCS08 = 0; +GLOBAL.MAJO_T_RABPCS09 = 0; +GLOBAL.MAJO_T_RABPCS10 = 0; +GLOBAL.MAJO_T_RABPCS11 = 0; +GLOBAL.MAJO_T_RABPCS12 = 0; +GLOBAL.MAJO_T_RABPCS17 = 0; +GLOBAL.MAJO_T_RABPCS31 = 0; +GLOBAL.MAJO_T_RABPRD = 0; +GLOBAL.MAJO_T_RABPRD07 = 0; +GLOBAL.MAJO_T_RABPRD08 = 0; +GLOBAL.MAJO_T_RABPRD09 = 0; +GLOBAL.MAJO_T_RABPRD10 = 0; +GLOBAL.MAJO_T_RABPRD11 = 0; +GLOBAL.MAJO_T_RABPRD12 = 0; +GLOBAL.MAJO_T_RABPRD17 = 0; +GLOBAL.MAJO_T_RABPRD31 = 0; +GLOBAL.MAJO_T_RABPCH = 0; +GLOBAL.MAJO_T_RABPCH07 = 0; +GLOBAL.MAJO_T_RABPCH08 = 0; +GLOBAL.MAJO_T_RABPCH09 = 0; +GLOBAL.MAJO_T_RABPCH10 = 0; +GLOBAL.MAJO_T_RABPCH11 = 0; +GLOBAL.MAJO_T_RABPCH12 = 0; +GLOBAL.MAJO_T_RABPCH17 = 0; +GLOBAL.MAJO_T_RABPCH31 = 0; +GLOBAL.MAJO_T_RABPLO = 0; +GLOBAL.MAJO_T_RABPLO07 = 0; +GLOBAL.MAJO_T_RABPLO08 = 0; +GLOBAL.MAJO_T_RABPLO09 = 0; +GLOBAL.MAJO_T_RABPLO10 = 0; +GLOBAL.MAJO_T_RABPLO11 = 0; +GLOBAL.MAJO_T_RABPLO12 = 0; +GLOBAL.MAJO_T_RABPLO17 = 0; +GLOBAL.MAJO_T_RABPLO31 = 0; + +cible prepare_inr: +application: iliad; +iterer +: variable VAR +: categorie saisie * +: espace D2042 +: dans ( + INR_D2042.VAR = VAR; +) + +fonction taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +cible calcul_tl: +application: iliad; +arguments: EST_PREMIER; +si GLOBAL.TL_D2042_INIT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_init; + si GLOBAL.TL_NON_ACQUISE != TL_TL_ACQUISE alors + CORR.IND_TL_MF = 1; + finsi +calculer cible aff : avec GLOBAL.TL_NON_ACQUISE; +calculer cible aff : avec CORR.IND_TL_MF; + calculer cible init_1731; + si positif(AFF) alors + afficher_erreur "prout 000\n"; + finsi + calculer cible enchaine_calcul_corr; +calculer cible aff : avec CORR.TL_MF; + calculer cible sauve_base_tl_init_corr; +calculer cible aff : avec CORR.TL_MF; +finsi +si GLOBAL.TL_D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042; + calculer cible init_1731; + si positif(AFF) alors + afficher_erreur "prout 111\n"; + finsi + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_corr; +finsi +si GLOBAL.TL_D2042_RECT_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible remplit_tgv_tl_d2042_rect; + calculer cible init_1731; + si positif(AFF) alors + afficher_erreur "prout 222\n"; + finsi + calculer cible enchaine_calcul_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_tl_rect_corr; +finsi +CORR.MFCDIS = GLOBAL.TL_MF_MFCDIS; +CORR.MFCHR = GLOBAL.TL_MF_MFCHR; +CORR.MFCHR7 = GLOBAL.TL_MF_MFCHR7; +CORR.MFCS = GLOBAL.TL_MF_MFCS; +CORR.MFCSAL = GLOBAL.TL_MF_MFCSAL; +CORR.MFCVN = GLOBAL.TL_MF_MFCVN; +CORR.MFGAIN = GLOBAL.TL_MF_MFGAIN; +CORR.MFGLO = GLOBAL.TL_MF_MFGLO; +CORR.MFIFI = GLOBAL.TL_MF_MFIFI; +CORR.MFIR = GLOBAL.TL_MF_MFIR; +CORR.MFMCSG820 = GLOBAL.TL_MF_MFMCSG820; +CORR.MFPCAP = GLOBAL.TL_MF_MFPCAP; +CORR.MFPS = GLOBAL.TL_MF_MFPS; +CORR.MFPSOL = GLOBAL.TL_MF_MFPSOL; +CORR.MFRD = GLOBAL.TL_MF_MFRD; +CORR.MFREGV = GLOBAL.TL_MF_MFREGV; +CORR.MFRSE1 = GLOBAL.TL_MF_MFRSE1; +CORR.MFRSE2 = GLOBAL.TL_MF_MFRSE2; +CORR.MFRSE3 = GLOBAL.TL_MF_MFRSE3; +CORR.MFRSE4 = GLOBAL.TL_MF_MFRSE4; +CORR.MFRSE5 = GLOBAL.TL_MF_MFRSE5; +CORR.MFRSE6 = GLOBAL.TL_MF_MFRSE6; +CORR.MFRSE7 = GLOBAL.TL_MF_MFRSE7; +CORR.MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA; +CORR.RAPCI_TL = GLOBAL.TL_BASE_TL; +CORR.RAPCI_INIT = GLOBAL.TL_BASE_TL_INIT; +CORR.RAPCI_RECT = GLOBAL.TL_BASE_TL_RECT; +CORR.CI_TL = GLOBAL.TL_BASE_TL_TBTC; +CORR.CI_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT; +CORR.CI_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT; +calculer cible ench_tl_corr; + +cible recherche_C22R02: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +variables_temporaires: TROUVE0, TROUVE1; +TROUVE0 = 0; +TROUVE1 = 0; +iterer +: variable R0 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R0, id_evt) = INDICE_EVT + et champ_evenement(R0, sens) = SENS_C + et champ_evenement(R0, penalite) dans (22, 24) + alors + TROUVE0 = 1; + finsi +) +iterer +: variable R1 +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R1, id_evt) = INDICE_EVT + et champ_evenement(R1, sens) = SENS_R + et champ_evenement(R1, penalite) = 2 + et positif(TROUVE0) + alors + TROUVE1 = 1; + finsi +) +RESULTAT = TROUVE1; + +cible verif_code_prem_evt: +application: iliad; +arguments: BRES, R; +variables_temporaires: B; +BRES = 0; +B = 1; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(RR, id_evt) != 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + alors + B = 0; + finsi +) +si B = 1 alors + BRES = 1; +sinon + iterer + : variable RR + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + champ_evenement(RR, id_evt) = 0 + et R != RR + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et champ_evenement(R, montant) <= champ_evenement(RR, montant) + alors + BRES = 1; + finsi + ) +finsi + +cible est_code_tax_init: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, COA) ou meme_variable(VAR, COB) ou meme_variable(VAR, COD) + ou meme_variable(VAR, COE) ou meme_variable(VAR, COF) ou meme_variable(VAR, COG) + ou meme_variable(VAR, COH) ou meme_variable(VAR, COJ) ou meme_variable(VAR, COL) + ou meme_variable(VAR, COM) ou meme_variable(VAR, COO) ou meme_variable(VAR, COP) + ou meme_variable(VAR, COQ) ou meme_variable(VAR, COR) ou meme_variable(VAR, COT) + ou meme_variable(VAR, COU) ou meme_variable(VAR, COV) ou meme_variable(VAR, COX) +); + +cible denature_rappels: +application: iliad; +variables_temporaires: + TAUX_PENA_2042, PENA, TAUX_PENA_RAPPEL, + EST_1728, EST_ISF, EST_TAX_INIT, VERIF_PREM_EVT; +si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + si positif(GLOBAL.PRESENT_9YT) et GLOBAL.MONTANT_9YT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) et GLOBAL.MONTANT_9XT != 0 alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + ) + finsi + TAUX_PENA_2042 = taux_penalite(GLOBAL.CODE_PENA); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + TAUX_PENA_RAPPEL = taux_penalite(champ_evenement(R, penalite)); + si champ_evenement(R, sens) != SENS_M alors + si positif(GLOBAL.RETARD0718) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + non ( + (non positif(EST_1728)) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (10, 17) + et GLOBAL.CODE_PENA dans (7, 18) + ) + ou champ_evenement(R, penalite) dans (22, 99) + ou TAUX_PENA_2042 < TAUX_PENA_RAPPEL + ) + alors + si champ_evenement(R, sens) = SENS_P alors + champ_evenement(R, penalite) = 0; + sinon + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 2 + et GLOBAL.CODE_PENA dans (7, 18) + alors + champ_evenement(R, anc_penalite) = champ_evenement(R, penalite); + champ_evenement(R, penalite) = 7; + sinon_si + champ_evenement(R, penalite) dans (1, 2, 3, 4, 5, 6, 30, 32, 55) + et (GLOBAL.DEFAUT1011 ou GLOBAL.RETARD0718) + et TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + alors + si + champ_evenement(R, penalite) = 2 et GLOBAL.CODE_PENA dans (7, 18) + alors + GLOBAL.LIMELIGHT = 1; + sinon + champ_evenement(R, 2042_rect) = 0; + finsi + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + finsi + si positif(GLOBAL.DEFAUT) alors + PENA = champ_evenement(R, penalite); + calculer cible est_rappel_1728 : avec EST_1728, PENA, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + alors + si non meme_variable(champ_evenement(R, code), ACODELAISINR) alors + champ_evenement(R, date) = GLOBAL.DATE; + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + finsi + sinon_si + positif(EST_1728) et champ_evenement(R, sens) != SENS_P + alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + (champ_evenement(R, penalite) dans (2, 3) et non positif(EST_ISF)) + ou ( + TAUX_PENA_RAPPEL <= TAUX_PENA_2042 + et champ_evenement(R, penalite) != 22 + ) + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + sinon_si + non (champ_evenement(R, penalite) dans (6, 22, 24, 30, 32, 35)) + et champ_evenement(R, sens) != SENS_P + alors + champ_evenement(R, penalite) = GLOBAL.CODE_PENA; + champ_evenement(R, 2042_rect) = 0; + finsi + finsi + sinon + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + non ( + positif(EST_TAX_INIT) + ou meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_PREM_EVT, R; + si positif(VERIF_PREM_EVT) alors + champ_evenement(R, penalite) = 0; + finsi + si champ_evenement(R, sens) = SENS_M alors + CORR.V_FLAGMENC = 1; + finsi + finsi + finsi + ) +finsi + +cible mauvaise_foi: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: + MF_DEF, MONTANT_RECT, NATURE, MONTANT, + COMMENCE_PAR_7, COMMENCE_PAR_H, EST_ISF, + COTSOC; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + MF_DEF = 0; + si + champ_evenement(R, sens) != SENS_P + et non (champ_evenement(R, penalite) dans (0, 2, 22, 24, 99)) + alors + MONTANT_RECT = D2042_RECT.champ_evenement(R, code) + 0; + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + MONTANT = D2042.champ_evenement(R, code) + 0; + si MONTANT_RECT < MONTANT alors + MF_DEF = 1; + sinon_si MONTANT_RECT = 0 alors + MF_DEF = -1; + finsi + sinon_si NATURE = N_REVENU alors + MONTANT = 0; + si MONTANT_RECT > MONTANT alors + MF_DEF = 1; + sinon_si MONTANT_RECT = 0 alors + MF_DEF = -1; + finsi + finsi + finsi +si positif(AFF) alors + afficher_erreur "prout MF_DEF = " (MF_DEF) "\n"; +finsi + si MF_DEF != 0 alors + calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); + calculer cible alias_commence_par_H : avec COMMENCE_PAR_H, champ_evenement(R, code); + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + si + positif(COMMENCE_PAR_7) ou positif(COMMENCE_PAR_H) + # codes_credit_imp + ou meme_variable(champ_evenement(R, code), 8TA) + ou meme_variable(champ_evenement(R, code), 8TB) + ou meme_variable(champ_evenement(R, code), 8TC) + ou meme_variable(champ_evenement(R, code), 8TE) + ou meme_variable(champ_evenement(R, code), 8TG) + ou meme_variable(champ_evenement(R, code), 8TH) + ou meme_variable(champ_evenement(R, code), 8TL) + ou meme_variable(champ_evenement(R, code), 8TO) + ou meme_variable(champ_evenement(R, code), 8TS) + ou meme_variable(champ_evenement(R, code), 8UW) + ou meme_variable(champ_evenement(R, code), 8UY) + ou meme_variable(champ_evenement(R, code), 8UZ) + alors + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + sinon_si positif(EST_ISF) alors + GLOBAL.TL_MF_MFIFI = GLOBAL.TL_MF_MFIFI + MF_DEF; + sinon + aiguillage (attribut(champ_evenement(R, code), cotsoc)) : ( + cas 1: + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + cas 2: GLOBAL.TL_MF_MFCDIS = GLOBAL.TL_MF_MFCDIS + MF_DEF; + cas 3: GLOBAL.TL_MF_MFTAXAGA = GLOBAL.TL_MF_MFTAXAGA + MF_DEF; + cas 4: GLOBAL.TL_MF_MFCSAL = GLOBAL.TL_MF_MFCSAL + MF_DEF; + cas 5: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + cas 6: GLOBAL.TL_MF_MFGAIN = GLOBAL.TL_MF_MFGAIN + MF_DEF; + cas 7: GLOBAL.TL_MF_MFREGV = GLOBAL.TL_MF_MFREGV + MF_DEF; + cas 8: GLOBAL.TL_MF_MFCHR = GLOBAL.TL_MF_MFCHR + MF_DEF; + cas 9: GLOBAL.TL_MF_MFPCAP = GLOBAL.TL_MF_MFPCAP + MF_DEF; + cas 10 : + GLOBAL.TL_MF_MFCS = GLOBAL.TL_MF_MFCS + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFPS = GLOBAL.TL_MF_MFPS + MF_DEF; + GLOBAL.TL_MF_MFPSOL = GLOBAL.TL_MF_MFPSOL + MF_DEF; + cas 11: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 12: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 13: + GLOBAL.TL_MF_MFRSE3 = GLOBAL.TL_MF_MFRSE3 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 14: + GLOBAL.TL_MF_MFRSE4 = GLOBAL.TL_MF_MFRSE4 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 16: GLOBAL.TL_MF_MFLOY = GLOBAL.TL_MF_MFLOY + MF_DEF; + cas 17: GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 18: + GLOBAL.TL_MF_MFGLO = GLOBAL.TL_MF_MFGLO + MF_DEF; + GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + GLOBAL.TL_MF_MFCVN = GLOBAL.TL_MF_MFCVN + MF_DEF; + cas 19: + GLOBAL.TL_MF_MFRSE5 = GLOBAL.TL_MF_MFRSE5 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 20: + GLOBAL.TL_MF_MFRSE1 = GLOBAL.TL_MF_MFRSE1 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 21: + GLOBAL.TL_MF_MFRSE2 = GLOBAL.TL_MF_MFRSE2 + MF_DEF; + GLOBAL.TL_MF_MFRSE6 = GLOBAL.TL_MF_MFRSE6 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + cas 22: + GLOBAL.TL_MF_MFRSE7 = GLOBAL.TL_MF_MFRSE7 + MF_DEF; + GLOBAL.TL_MF_MFRD = GLOBAL.TL_MF_MFRD + MF_DEF; + par_defaut: GLOBAL.TL_MF_MFIR = GLOBAL.TL_MF_MFIR + MF_DEF; + ) + finsi + finsi + finsi +) + +cible recherche_cpena: +application: iliad; +arguments: CPENA, R; +variables_temporaires: PREM_RAPPEL, MONTANT_INITIAL, PRESENT_2042, MONTANT, TROUVE, NATURE; +PREM_RAPPEL = 0; +si present(D2042.champ_evenement(R, code)) alors + MONTANT_INITIAL = D2042.champ_evenement(R, code); + PRESENT_2042 = 1; +sinon + MONTANT_INITIAL = 0; + PRESENT_2042 = 0; +finsi +MONTANT = MONTANT_INITIAL; +TROUVE = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non (positif(GLOBAL.RETARD) et champ_evenement(RR, numero) = champ_evenement(PREM_RAPPEL, numero)) + et champ_evenement(RR, numero) <= champ_evenement(R, numero) + et meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(R, penalite) = champ_evenement(RR, penalite) + et champ_evenement(RR, sens) dans (SENS_R, SENS_C) + alors + MONTANT = MONTANT + champ_evenement(RR, montant); + TROUVE = 1; + finsi +) +si positif(TROUVE) alors + si MONTANT < champ_evenement(R, montant) alors + CPENA = 4; + sinon_si + positif(PRESENT_2042) + et MONTANT - MONTANT_INITIAL < champ_evenement(R, montant) + alors + CPENA = 5; + sinon + CPENA = 2; + finsi +sinon_si + (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) + et GLOBAL.CODE_PENA = champ_evenement(R, penalite) +alors + CPENA = 6; +sinon_si MONTANT < champ_evenement(R, montant) alors + si champ_evenement(R, penalite) != champ_evenement(R, anc_penalite) alors + CPENA = 6; + sinon + CPENA = 4; + finsi +sinon + CPENA = 5; +finsi +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si NATURE = N_CHARGE et CPENA dans (3, 4) alors + CPENA = 1; +finsi + +cible transf_rappels_prim: +application: iliad; +variables_temporaires: NATURE, SENS, PENALITE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, numero) >= 0 + et champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT + et non ( + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + ) + alors + GLOBAL.champ_evenement(R, code) = champ_evenement(R, montant); + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_REVENU alors + SENS = SENS_R; + PENALITE = 99; + sinon_si NATURE = N_CHARGE alors + SENS = SENS_C; + PENALITE = 0; + sinon # interdit + SENS = SENS_R; # = 0 + PENALITE = 0; + finsi + champ_evenement(R, code) reference V_MILLESIME; + champ_evenement(R, montant) = 0; + champ_evenement(R, sens) = SENS; + champ_evenement(R, penalite) = PENALITE; + finsi +) + +cible transfo_pena_regco: +application: iliad; +arguments: R; +si meme_variable(champ_evenement(R, code), REGCO) alors + GLOBAL.PRESENT_REGCO = 1; + GLOBAL.PENALITE_REGCO = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_REGCO = champ_evenement(R, numero); + GLOBAL.NUM_RAP_REGCO = champ_evenement(R, rappel); + GLOBAL.IND_20_REGCO = champ_evenement(R, 2042_rect); +finsi + +fonction get_taux_penalite: +application: iliad; +arguments: PENA; +resultat: TAUX; +si PENA dans (2, 7, 10, 17) alors + TAUX = 10; +sinon_si PENA dans (3, 8, 11, 30, 55) alors + TAUX = 40; +sinon_si PENA dans (4, 5, 9, 12, 31, 32) alors + TAUX = 80; +sinon_si PENA = 6 alors + TAUX = 100; +sinon + TAUX = 0; +finsi + +fonction is_minoration_sf: +application: iliad; +arguments: INITIALE, COURANTE; +resultat: EST_MIN_SF; +si INITIALE = SF_MARIAGE ou INITIALE = SF_PACSE alors + EST_MIN_SF = COURANTE = SF_VEUVAGE_TRUE ou COURANTE = SF_PACSE; +sinon_si INITIALE = SF_VEUVAGE_TRUE alors + EST_MIN_SF = COURANTE = SF_MARIAGE ou COURANTE = SF_PACSE; +sinon + EST_MIN_SF = 1; +finsi + +fonction get_strate_pena: +application: iliad; +arguments: STR; +resultat: PENA; +aiguillage(STR):( + cas 0: PENA = 99; + cas 1 : PENA = -1; + cas 2 : PENA = 0; + cas 3 : PENA = 6; + cas 4 : PENA = 12; + cas 5 : PENA = 32; + cas 6 : PENA = 31; + cas 7 : PENA = 5; + cas 8 : PENA = 4; + cas 9 : PENA = 35; + cas 10: PENA = 30; + cas 11: PENA = 11; + cas 12: PENA = 8; + cas 13: PENA = 55; + cas 14: PENA = 3; + cas 15: PENA = 17; + cas 16: PENA = 10; + cas 17: PENA = 7; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: PENA = 2; + cas 24: PENA = 22; + cas 25: PENA = 24; + par_defaut: PENA = -1; +) + +fonction get_strate_taux: +application: iliad; +arguments: STR; +resultat: TAUX; +aiguillage (STR) : ( + cas 0 : + cas 1 : TAUX = -1; + cas 2 : TAUX = 0; + cas 3 : TAUX = 100; + cas 4 : + cas 5 : + cas 6 : + cas 7 : + cas 8 : + cas 9 : TAUX = 80; + cas 10: + cas 11: + cas 12: + cas 13: + cas 14: TAUX = 40; + cas 15: + cas 16: + cas 17: TAUX = 10; + cas 18: + cas 19: + cas 20: + cas 21: + cas 22: + cas 23: + cas 24: + cas 25: TAUX = 0; + par_defaut: TAUX = 0; +) + +cible get_code_situation_famille: +application: iliad; +arguments: RESULTAT, CORR, VAR; +si meme_variable(VAR, 0AM) alors + RESULTAT = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RESULTAT = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RESULTAT = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RESULTAT = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si positif(CORR) et GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.V_MILLESIME alors + RESULTAT = SF_VEUVAGE_TRUE; + sinon + RESULTAT = SF_VEUVAGE_FALSE; + finsi +sinon + RESULTAT = SF_INVALIDE; +finsi + +cible is_rappel_strate: +application: iliad; +arguments: RESULTAT, R, S; +variables_temporaires: TAUX_STR, CODE_SIT_FAM, CORR; +si S = 0 alors + RESULTAT = ( + champ_evenement(R, penalite) = 99 + ou (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ); + si positif(RESULTAT) alors + GLOBAL.MAJO_TAUX_STRATE = get_taux_penalite(GLOBAL.CODE_PENA); + finsi +sinon_si S = 1 alors + RESULTAT = ( + dans_domaine(champ_evenement(R, code), saisie contexte) + et non positif(GLOBAL.IND_20_REGCO) + et non ( + meme_variable(champ_evenement(R, code), V_MILLESIME) + ou meme_variable(champ_evenement(R, code), ANCSDED) + ou meme_variable(champ_evenement(R, code), CALCULIR) + ou meme_variable(champ_evenement(R, code), IND_TRAIT) + ou meme_variable(champ_evenement(R, code), ROLCSG) + ) + ); + si positif(RESULTAT) alors + TAUX_STR = get_taux_penalite(GLOBAL.CODE_PENA); + si TAUX_STR != 0 alors + GLOBAL.MAJO_TAUX_STRATE = TAUX_STR; + finsi + si champ_evenement(R, penalite) != 0 alors + GLOBAL.MAJO_CODE_STRATE = champ_evenement(R, penalite); + finsi + finsi +sinon_si S = 2 alors + CORR = 0; + calculer cible get_code_situation_famille : avec CODE_SIT_FAM, CORR, champ_evenement(R, code); + si + GLOBAL.SF_COURANTE != SF_INVALIDE + et ( + CODE_SIT_FAM != SF_INVALIDE + ou ( + meme_variable(champ_evenement(R, code), 0DA) + ou meme_variable(champ_evenement(R, code), 0DB) + ) + ) + alors + RESULTAT = is_minoration_sf(GLOBAL.SF_INITIALE, GLOBAL.SF_COURANTE); + sinon + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + ou ( + positif(GLOBAL.DEFAUT) + et champ_evenement(R, sens) = SENS_R + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + ) + ); + finsi +sinon_si + champ_evenement(R, numero) = GLOBAL.NUM_EVT_REGCO + et meme_variable(champ_evenement(R, code), REGCO) +alors + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +sinon_si S = 18 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 19 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ); +sinon_si S = 20 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 21 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + ); +sinon_si S = 22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et positif(champ_evenement(R, 2042_rect)) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon_si S = 23 alors + RESULTAT = ( + champ_evenement(R, penalite) = 2 + et (non positif(champ_evenement(R, 2042_rect))) + et non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + ); +sinon + RESULTAT = ( + champ_evenement(R, penalite) = get_strate_pena(S) + ); +finsi + +cible get_strate: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: TROUVE; +si champ_evenement(R, sens) = SENS_P et champ_evenement(R, penalite) = 0 alors + RESULTAT = 24; +sinon + RESULTAT = -1; + iterer : variable S : entre 0..(GLOBAL.NB_STRATES - 1) increment 1 : dans ( + si RESULTAT = -1 alors + calculer cible is_rappel_strate : avec TROUVE, R, S; + si RESULTAT = -1 et positif(TROUVE) alors + RESULTAT = S; + finsi + finsi + ) +finsi + +fonction vers_mois: +application: iliad; +arguments: D; +resultat: M; +M = inf(D / 10000); + +fonction vers_annee: +application: iliad; +arguments: D; +resultat: A; +A = inf(D % 10000); + +fonction vers_date: +application: iliad; +arguments: M, A; +resultat: D; +D = inf(M) * 10000 + inf(A); + +cible traite_inr: +application: iliad; +arguments: INDICE_EVT; +variables_temporaires: MOIS_DEP, ANNEE_DEP, R_EVT; +GLOBAL.MENTION_EXP = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et ( + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + alors + GLOBAL.MENTION_EXP = 1; + finsi +) +MOIS_DEP = 7; +ANNEE_DEP = GLOBAL.V_MILLESIME + 1; +R_EVT = -1; +iterer +: variable R +: entre (nb_evenements() - 1)..0 increment -1 +: dans ( + si R_EVT = -1 et champ_evenement(R, id_evt) = INDICE_EVT alors + R_EVT = R; + finsi +) +si R_EVT >= 0 alors + GLOBAL.INR_ANNEE_COR = vers_annee(champ_evenement(R_EVT, date)); + si vers_annee(champ_evenement(R_EVT, date)) < 2018 alors + GLOBAL.INR_NB_MOIS = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + GLOBAL.INR_NB_MOIS2 = 0; + sinon_si ANNEE_DEP > 2018 alors + GLOBAL.INR_NB_MOIS = 0; + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - ANNEE_DEP) + + (vers_mois(champ_evenement(R_EVT, date)) - MOIS_DEP) + 1; + sinon + GLOBAL.INR_NB_MOIS = 12 * (2018 - ANNEE_DEP) + (1 - MOIS_DEP); + GLOBAL.INR_NB_MOIS2 = + 12 * (vers_annee(champ_evenement(R_EVT, date)) - 2018) + + vers_mois(champ_evenement(R_EVT, date)); + finsi +finsi + +cible is_rappel_abat_20: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: NATURE, ABAT; +si + champ_evenement(R, sens) = SENS_M + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + ) +alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + RESULTAT = (NATURE = N_REVENU); +sinon_si positif(GLOBAL.LIMELIGHT) alors + RESULTAT = champ_evenement(R, 2042_rect); +sinon_si positif(champ_evenement(R, 2042_rect)) alors + RESULTAT = 1; +sinon + calculer cible get_abat : avec ABAT, champ_evenement(R, code); + si positif(ABAT) alors + RESULTAT = ( + champ_evenement(R, penalite) = 1 + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (7, 99) + et ( + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou GLOBAL.CODE_PENA = 7 + ) + ) + ); + sinon + RESULTAT = 0; + finsi +finsi + +cible est_code_sf_naiss: +application: iliad; +arguments: RESULTAT, VAR; +RESULTAT = ( + meme_variable(VAR, 0AM) ou meme_variable(VAR, 0AC) ou meme_variable(VAR, 0AD) + ou meme_variable(VAR, 0AO) ou meme_variable(VAR, 0AV) ou meme_variable(VAR, 0DA) + ou meme_variable(VAR, 0DB) +); + +cible is_rappel_autorise_maj: +application: iliad; +arguments: RESULTAT, R, MAJ; +variables_temporaires: EST_SF_NAISS, EST_TAX_INIT; +si MAJ = MAJ_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 10); +sinon_si MAJ = MAJ_NON_TL alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 10); +sinon_si MAJ = MAJ_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) != 15); +sinon_si MAJ = MAJ_NON_TL15 alors + RESULTAT = (attribut(champ_evenement(R, code), categorie_TL) = 15); +sinon_si MAJ = MAJ_RAPPEL_C alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + et GLOBAL.CODE_PENA != 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) > 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP01 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 1 + ); +sinon_si MAJ = MAJ_RAPPEL_CP22 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 22 + ); +sinon_si MAJ = MAJ_RAPPEL_CP24 alors + RESULTAT = ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 24 + ); +sinon_si MAJ = MAJ_RAPPEL_F alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ); +sinon_si MAJ = MAJ_RAPPEL_NF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et (non positif(EST_SF_NAISS)) + ); +sinon_si MAJ = MAJ_RAPPEL_M alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, sens) = SENS_M + et (non positif(EST_SF_NAISS)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99)) + ) + ); +sinon_si MAJ = MAJ_RAPPEL_MF alors + calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); + RESULTAT = (champ_evenement(R, sens) = SENS_M et positif(EST_SF_NAISS)); +sinon_si MAJ = MAJ_RAPPEL_NON_M alors + RESULTAT = (champ_evenement(R, sens) != SENS_M); +sinon_si MAJ = MAJ_RAPPEL_P alors + RESULTAT = (champ_evenement(R, sens) = SENS_P); +sinon_si MAJ = MAJ_RAPPEL_R alors + RESULTAT = (champ_evenement(R, sens) = SENS_R); +sinon_si MAJ = MAJ_RAPPEL_R55 alors + RESULTAT = ( + meme_variable(champ_evenement(R, code), REGCO) + et (GLOBAL.PENALITE_REGCO dans (1, 99)) + ); +sinon_si MAJ = MAJ_1728 alors + RESULTAT = (champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31)); +sinon_si MAJ = MAJ_ABAT_20 alors + calculer cible is_rappel_abat_20 : avec RESULTAT, R; +sinon_si MAJ = MAJ_CODE_1729_2A5 alors + RESULTAT = (champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55)); +sinon_si MAJ = MAJ_CODE_1729_6 alors + RESULTAT = (champ_evenement(R, penalite) = 6); +sinon_si MAJ = MAJ_CODE_22 alors + RESULTAT = ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CODE_24 alors + RESULTAT = ( + champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ); +sinon_si MAJ = MAJ_CONTEXTE_22 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)); +sinon_si MAJ = MAJ_MENTION_EXP_99 alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et (non positif(GLOBAL.DEFAUT)) + et non ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_MENTION_EXP_99R alors + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + RESULTAT = ( + champ_evenement(R, penalite) = 99 + et GLOBAL.CODE_PENA != 22 + et (non positif(GLOBAL.DEFAUT)) + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ); +sinon_si MAJ = MAJ_NON_MENTION_EXP alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible is_rappel_autorise: +application: iliad; +arguments: RESULTAT, R, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RES0, RES1, RES2, RES3; +RES0 = 1; +RES1 = 1; +RES2 = 1; +RES3 = 1; +si present(MAJ0) alors + calculer cible is_rappel_autorise_maj : avec RES0, R, MAJ0; +finsi +si present(MAJ1) alors + calculer cible is_rappel_autorise_maj : avec RES1, R, MAJ1; +finsi +si present(MAJ2) alors + calculer cible is_rappel_autorise_maj : avec RES2, R, MAJ2; +finsi +si present(MAJ3) alors + calculer cible is_rappel_autorise_maj : avec RES3, R, MAJ3; +finsi +RESULTAT = (RES0 et RES1 et RES2 et RES3); + +cible is_init_1731: +application: iliad; +arguments: RESULTAT, INDICE_EVT; +calculer cible init_1731; +RESULTAT = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + RESULTAT = 1; + finsi +) + +cible calcul_majo_P: +application: iliad; +arguments: NB_RAPPELS_P; +si GLOBAL.MAJO_D2042_P_NB > 0 et NB_RAPPELS_P != 0 alors + calculer cible reset_saisie_calc; + CORR.TL_IR = CORR.PASS_TLIR; + CORR.TL_IFI = CORR.PASS_TLIFI; + CORR.TL_CS = CORR.PASS_TLCS; + CORR.TL_TAXAGA = CORR.PASS_TLTAXAGA; + calculer cible remplit_tgv_majo_d2042_p; + CORR.PASS_TLIR = CORR.TL_IR; + CORR.PASS_TLIFI = CORR.TL_IFI; + CORR.PASS_TLCS = CORR.TL_CS; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA; + CORR.PASS_TLCDIS = CORR.TL_CDIS; + si GLOBAL.MAJO_T_RABP != 0 alors + CORR.T_RABP = GLOBAL.MAJO_T_RABP; + CORR.T_RABP07 = GLOBAL.MAJO_T_RABP07; + CORR.T_RABP08 = GLOBAL.MAJO_T_RABP08; + CORR.T_RABP09 = GLOBAL.MAJO_T_RABP09; + CORR.T_RABP10 = GLOBAL.MAJO_T_RABP10; + CORR.T_RABP11 = GLOBAL.MAJO_T_RABP11; + CORR.T_RABP12 = GLOBAL.MAJO_T_RABP12; + CORR.T_RABP17 = GLOBAL.MAJO_T_RABP17; + CORR.T_RABP31 = GLOBAL.MAJO_T_RABP31; + finsi + si GLOBAL.MAJO_T_RABPPS != 0 alors + CORR.T_RABPPS = GLOBAL.MAJO_T_RABPPS; + CORR.T_RABPPS07 = GLOBAL.MAJO_T_RABPPS07; + CORR.T_RABPPS08 = GLOBAL.MAJO_T_RABPPS08; + CORR.T_RABPPS09 = GLOBAL.MAJO_T_RABPPS09; + CORR.T_RABPPS10 = GLOBAL.MAJO_T_RABPPS10; + CORR.T_RABPPS11 = GLOBAL.MAJO_T_RABPPS11; + CORR.T_RABPPS12 = GLOBAL.MAJO_T_RABPPS12; + CORR.T_RABPPS17 = GLOBAL.MAJO_T_RABPPS17; + CORR.T_RABPPS31 = GLOBAL.MAJO_T_RABPPS31; + finsi + si GLOBAL.MAJO_T_RABPCS != 0 alors + CORR.T_RABPCS = GLOBAL.MAJO_T_RABPCS; + CORR.T_RABPCS07 = GLOBAL.MAJO_T_RABPCS07; + CORR.T_RABPCS08 = GLOBAL.MAJO_T_RABPCS08; + CORR.T_RABPCS09 = GLOBAL.MAJO_T_RABPCS09; + CORR.T_RABPCS10 = GLOBAL.MAJO_T_RABPCS10; + CORR.T_RABPCS11 = GLOBAL.MAJO_T_RABPCS11; + CORR.T_RABPCS12 = GLOBAL.MAJO_T_RABPCS12; + CORR.T_RABPCS17 = GLOBAL.MAJO_T_RABPCS17; + CORR.T_RABPCS31 = GLOBAL.MAJO_T_RABPCS31; + finsi + si GLOBAL.MAJO_T_RABPRD != 0 alors + CORR.T_RABPRD = GLOBAL.MAJO_T_RABPRD; + CORR.T_RABPRD07 = GLOBAL.MAJO_T_RABPRD07; + CORR.T_RABPRD08 = GLOBAL.MAJO_T_RABPRD08; + CORR.T_RABPRD09 = GLOBAL.MAJO_T_RABPRD09; + CORR.T_RABPRD10 = GLOBAL.MAJO_T_RABPRD10; + CORR.T_RABPRD11 = GLOBAL.MAJO_T_RABPRD11; + CORR.T_RABPRD12 = GLOBAL.MAJO_T_RABPRD12; + CORR.T_RABPRD17 = GLOBAL.MAJO_T_RABPRD17; + CORR.T_RABPRD31 = GLOBAL.MAJO_T_RABPRD31; + finsi + si GLOBAL.MAJO_T_RABPCH != 0 alors + CORR.T_RABPCH = GLOBAL.MAJO_T_RABPCH; + CORR.T_RABPCH07 = GLOBAL.MAJO_T_RABPCH07; + CORR.T_RABPCH08 = GLOBAL.MAJO_T_RABPCH08; + CORR.T_RABPCH09 = GLOBAL.MAJO_T_RABPCH09; + CORR.T_RABPCH10 = GLOBAL.MAJO_T_RABPCH10; + CORR.T_RABPCH11 = GLOBAL.MAJO_T_RABPCH11; + CORR.T_RABPCH12 = GLOBAL.MAJO_T_RABPCH12; + CORR.T_RABPCH17 = GLOBAL.MAJO_T_RABPCH17; + CORR.T_RABPCH31 = GLOBAL.MAJO_T_RABPCH31; + finsi + si GLOBAL.MAJO_T_RABPLO != 0 alors + CORR.T_RABPLO = GLOBAL.MAJO_T_RABPLO; + CORR.T_RABPLO07 = GLOBAL.MAJO_T_RABPLO07; + CORR.T_RABPLO08 = GLOBAL.MAJO_T_RABPLO08; + CORR.T_RABPLO09 = GLOBAL.MAJO_T_RABPLO09; + CORR.T_RABPLO10 = GLOBAL.MAJO_T_RABPLO10; + CORR.T_RABPLO11 = GLOBAL.MAJO_T_RABPLO11; + CORR.T_RABPLO12 = GLOBAL.MAJO_T_RABPLO12; + CORR.T_RABPLO17 = GLOBAL.MAJO_T_RABPLO17; + CORR.T_RABPLO31 = GLOBAL.MAJO_T_RABPLO31; + finsi + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + CORR.FLAG_TRMAJOP = 1; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + calculer cible init_1731; + si positif(AFF) alors + afficher_erreur "333\n"; + finsi + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_TRMAJOP = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + calculer cible sauve_base_majo_corr; +finsi + +cible cumule_base_tl_aux: +application: iliad; +arguments: M_TL, M_TL_TBTC, R; +variables_temporaires: MONTANT, COMMENCE_PAR_7, CAT_TL; +calculer cible alias_commence_par_7 : avec COMMENCE_PAR_7, champ_evenement(R, code); +si positif(COMMENCE_PAR_7) alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = champ_evenement(R, base_tl); +finsi +si champ_evenement(R, sens) != SENS_R alors + MONTANT = -MONTANT; +finsi +CAT_TL = attribut(champ_evenement(R, code), categorie_TL); +si CAT_TL = 40 alors + M_TL = MONTANT; + M_TL_TBTC = 0; +sinon_si CAT_TL = 50 alors + M_TL = 0; + M_TL_TBTC = MONTANT; +sinon + M_TL = 0; + M_TL_TBTC = 0; +finsi + +cible cumule_base_tl_init: +application: iliad; +arguments: R; +variables_temporaires: M_TL, M_TL_TBTC; +si GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI alors + M_TL = 0; + M_TL_TBTC = 0; +sinon + calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +finsi +GLOBAL.TL_BASE_TL_INIT = GLOBAL.TL_BASE_TL_INIT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_INIT = GLOBAL.TL_BASE_TL_TBTC_INIT + M_TL_TBTC; + +cible cumule_champ_base_tl: +application: iliad; +arguments: R; +variables_temporaires: M_TL, M_TL_TBTC; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL = GLOBAL.TL_BASE_TL + M_TL; +GLOBAL.TL_BASE_TL_TBTC = GLOBAL.TL_BASE_TL_TBTC + M_TL_TBTC; + +cible cumule_champ_base_tl_rect: +application: iliad; +arguments: R; +variables_temporaires: M_TL, M_TL_TBTC; +calculer cible cumule_base_tl_aux : avec M_TL, M_TL_TBTC, R; +GLOBAL.TL_BASE_TL_RECT = GLOBAL.TL_BASE_TL_RECT + M_TL; +GLOBAL.TL_BASE_TL_TBTC_RECT = GLOBAL.TL_BASE_TL_TBTC_RECT + M_TL_TBTC; + +cible traite_majo_P: +application: iliad; +arguments: R; +variables_temporaires: NATURE, PENA, COTSOC, MONTANT; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +PENA = champ_evenement(R, penalite); +COTSOC = attribut(champ_evenement(R, code), cotsoc); +MONTANT = champ_evenement(R, montant); +si + NATURE = N_REVENU + et ((7 <= PENA et PENA <= 12) ou PENA = 17 ou PENA = 31) +alors + si COTSOC = 1 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 5 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 9 alors + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + sinon_si COTSOC = 10 alors + calculer cible add_majo_T_RABPPS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCS : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC dans (11, 12, 13, 14, 19, 20, 21) alors + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + sinon_si COTSOC = 16 alors + calculer cible add_majo_T_RABPLO : avec PENA, MONTANT; + sinon_si COTSOC = 18 alors + calculer cible add_majo_T_RABP : avec PENA, MONTANT; + calculer cible add_majo_T_RABPRD : avec PENA, MONTANT; + calculer cible add_majo_T_RABPCH : avec PENA, MONTANT; + finsi +finsi + +cible calculer_sommes_2042: +application: iliad; +arguments: R; +variables_temporaires: S, N, MONTANT; +S = attribut(champ_evenement(R, code), sanction); +calculer cible get_nature : avec N, champ_evenement(R, code); +si champ_evenement(R, sens) = SENS_R alors + MONTANT = champ_evenement(R, montant); +sinon + MONTANT = -champ_evenement(R, montant); +finsi +si S = 1 alors + GLOBAL.INR_SOMMERF_2 = GLOBAL.INR_SOMMERF_2 + MONTANT; +finsi +si S = 2 ou S = 12 alors + GLOBAL.INR_SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2 + MONTANT; +finsi +si S = 3 ou S = 13 alors + GLOBAL.INR_SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2 + MONTANT; +finsi +si S = 4 ou S = 14 alors + GLOBAL.INR_SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2 + MONTANT; +finsi +si S = 5 ou S = 15 alors + GLOBAL.INR_SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2 + MONTANT; +finsi +si S = 6 ou S = 16 alors + GLOBAL.INR_SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2 + MONTANT; +finsi +si (1 <= S et S <= 8) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2 + MONTANT; +finsi +si (1 <= S et S <= 9) ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMERI_2 = GLOBAL.INR_SOMMERI_2 + MONTANT; +finsi +si (1 <= S et S <= 6) ou S = 8 ou (12 <= S et S <= 16) alors + GLOBAL.INR_SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2 + MONTANT; +finsi +si S = 8 et N = N_REVENU alors + GLOBAL.INR_SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2 + MONTANT; +finsi +si S = 2 et N = N_REVENU alors + GLOBAL.INR_SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2 + MONTANT; +finsi +si S = 3 et N = N_REVENU alors + GLOBAL.INR_SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2 + MONTANT; +finsi +si S = 4 et N = N_REVENU alors + GLOBAL.INR_SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2 + MONTANT; +finsi + +cible maj_elt_2042: +application: iliad; +arguments: MONTANT_2042, R; +variables_temporaires: NATURE; +si + # codes_dates + meme_variable(MONTANT_2042, 0AX) + ou meme_variable(MONTANT_2042, 0AY) + ou meme_variable(MONTANT_2042, 0AZ) + ou meme_variable(MONTANT_2042, 9YD) + ou meme_variable(MONTANT_2042, 9YR) +alors + MONTANT_2042 = champ_evenement(R, montant); +sinon + calculer cible get_nature : avec NATURE, MONTANT_2042; + si NATURE = N_REVENU alors + si + champ_evenement(R, sens) = SENS_R + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) dans (SENS_M, SENS_C) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 + champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 + champ_evenement(R, montant); + sinon_si + non (champ_evenement(R, sens) dans (SENS_M, SENS_C)) + et ( + non type(MONTANT_2042, BOOLEEN) + ou MONTANT_2042 - champ_evenement(R, montant) + 0 dans (0, 1) + ) + alors + MONTANT_2042 = MONTANT_2042 - champ_evenement(R, montant); + finsi +finsi + +cible set_rappel: +application: iliad; +arguments: MONTANT, R; +variables_temporaires: NATURE; +si present(MONTANT) alors + calculer cible maj_elt_2042 : avec MONTANT, R; +sinon + calculer cible get_nature : avec NATURE, MONTANT; + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si NATURE = N_REVENU alors + MONTANT = - champ_evenement(R, montant); + sinon + MONTANT = champ_evenement(R, montant); + finsi + sinon + si + NATURE = N_REVENU + ou ( + # codes_dates + meme_variable(MONTANT, 0AX) + ou meme_variable(MONTANT, 0AY) + ou meme_variable(MONTANT, 0AZ) + ou meme_variable(MONTANT, 9YD) + ou meme_variable(MONTANT, 9YR) + ) + alors + MONTANT = champ_evenement(R, montant); + sinon + MONTANT = - champ_evenement(R, montant); + finsi + finsi +finsi + +cible met_a_jour_2042_INR_evt: +application: iliad; +arguments: INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec INR_D2042.champ_evenement(R, code), R : espace GLOBAL; + si + non ( + positif(IS_PREMIER) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + et GLOBAL.CODE_9ZA = 0 + et champ_evenement(R, sens) != SENS_P + et ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + alors + calculer cible calculer_sommes_2042 : avec R; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) +si GLOBAL.NB_RAPPELS_RES > 0 alors + CORR.SOMMEBAND_2 = GLOBAL.INR_SOMMEBAND_2; + CORR.SOMMEBA_2 = GLOBAL.INR_SOMMEBA_2; + CORR.SOMMEBICND_2 = GLOBAL.INR_SOMMEBICND_2; + CORR.SOMMEBIC_2 = GLOBAL.INR_SOMMEBIC_2; + CORR.SOMMEBNCND_2 = GLOBAL.INR_SOMMEBNCND_2; + CORR.SOMMEBNC_2 = GLOBAL.INR_SOMMEBNC_2; + CORR.SOMMEGLOBAL_2 = GLOBAL.INR_SOMMEGLOBAL_2; + CORR.SOMMEGLOBND_2 = GLOBAL.INR_SOMMEGLOBND_2; + CORR.SOMMELOC_2 = GLOBAL.INR_SOMMELOC_2; + CORR.SOMMEMOND_2 = GLOBAL.INR_SOMMEMOND_2; + CORR.SOMMERCM_2 = GLOBAL.INR_SOMMERCM_2; + CORR.SOMMERF_2 = GLOBAL.INR_SOMMERF_2; + CORR.SOMMERI_2 = GLOBAL.INR_SOMMERI_2; +finsi + +cible met_a_jour_2042_evt: +application: iliad; +arguments: INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: RAP_AUTH; +GLOBAL.NB_RAPPELS_RES = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si positif(RAP_AUTH) alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + si F_TRAITEMENT = 1 alors + calculer cible cumule_champ_base_tl : avec R : espace GLOBAL; + sinon_si F_TRAITEMENT = 2 alors + calculer cible cumule_base_tl_init : avec R : espace GLOBAL; + sinon_si F_TRAITEMENT = 3 alors + calculer cible cumule_champ_base_tl_rect : avec R : espace GLOBAL; + sinon_si F_TRAITEMENT = 4 alors + calculer cible traite_majo_P : avec R : espace GLOBAL; + finsi + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi +) + +cible met_a_jour_2042_strate: +application: iliad; +arguments: NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3; +variables_temporaires: NUM_PREM_RAPPEL, RAP_AUTH; +NUM_PREM_RAPPEL = champ_evenement(0, numero); +GLOBAL.NB_RAPPELS_RES = 0; +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, strate) = NUM_STRATE alors + calculer cible is_rappel_autorise + : avec RAP_AUTH, R, MAJ0, MAJ1, MAJ2, MAJ3 + : espace GLOBAL; + si + non ( + positif(GLOBAL.RETARD) + et champ_evenement(R, numero) = NUM_PREM_RAPPEL + ) + et positif(RAP_AUTH) + alors + calculer cible set_rappel : avec champ_evenement(R, code), R : espace GLOBAL; + GLOBAL.NB_RAPPELS_RES = GLOBAL.NB_RAPPELS_RES + 1; + finsi + finsi + ) +) + +cible set_rappel_1731bis: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: MONTANT, NATURE; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +si + attribut(champ_evenement(R, code), sanction) = 9 + et ( + ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et GLOBAL.CODE_PENA dans (3, 8, 11) + ) + ou ( + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + ) + ) +alors + CORR.SOMMERI1731 = 1; +finsi +MONTANT = champ_evenement(R, code) + 0; +si + (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C) + et (positif(GLOBAL.RETARD) ou positif(GLOBAL.DEFAUT)) +alors + si + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans ( + 2, 3, 7, 8, 10, 11, 17, 18, 22, 24, 99 + ) + ) + ou champ_evenement(R, sens) = SENS_M + alors + champ_evenement(R, code) = champ_evenement(R, montant); + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_CHARGE alors + si MONTANT + champ_evenement(R, montant) >= 0 alors + champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si champ_evenement(R, sens) = SENS_C et NATURE = N_REVENU alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi +finsi +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ou ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + et champ_evenement(R, sens) != SENS_C + ) +alors + si NATURE = N_REVENU alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22, 24, 99) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + finsi + sinon_si NATURE = N_CHARGE alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + champ_evenement(R, code) = MONTANT + champ_evenement(R, montant); + sinon_si + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) dans ( + 2, 3, 4, 5, 6, 7, 8, 10, 11, 17, 18, 22, 24, 30, 31, 32, 35, 55, 99 + ) + ou ( + non positif(IS_PREMIER) + et champ_evenement(R, penalite) dans (10, 11) + et champ_evenement(R, date) = 0 + ) + ) + alors + si MONTANT - champ_evenement(R, montant) >= 0 alors + champ_evenement(R, code) = MONTANT - champ_evenement(R, montant); + finsi + finsi + finsi +finsi + +cible prepare_1731_aux: +application: iliad; +arguments: R, IS_PREMIER, MAJ_TGV_COPIE; +si positif(MAJ_TGV_COPIE) alors + si positif(AFF) alors + afficher_erreur "prout 0 set_rappel\n"; + afficher_erreur "prout 0 " alias(champ_evenement(R, code)) " = " (champ_evenement(R, code)) "\n"; + finsi + calculer cible set_rappel_1731bis : avec R, IS_PREMIER; + si positif(AFF) alors + afficher_erreur "prout 1 " alias(champ_evenement(R, code)) " = " (champ_evenement(R, code)) "\n"; + finsi +finsi +si champ_evenement(R, penalite) = 30 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR30 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R30 = 1; + finsi +finsi +si champ_evenement(R, penalite) = 32 alors + si champ_evenement(R, sens) != SENS_R alors + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 - champ_evenement(R, montant); + sinon + CORR.VARR32 = 1; + GLOBAL.ART1731_SOMME_R3032 = GLOBAL.ART1731_SOMME_R3032 + champ_evenement(R, montant); + GLOBAL.ART1731_PRESENT_R32 = 1; + finsi +finsi +si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 10 alors + GLOBAL.ART1731_PRESENT_R10 = 1; +finsi + +cible prepare_1731_majo_aux: +application: iliad; +arguments: R, IS_PREMIER; +variables_temporaires: MAJ_TGV_COPIE; +MAJ_TGV_COPIE = ( + champ_evenement(R, sens) dans (SENS_M, SENS_C) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (1, 2, 7, 10, 17, 18, 22, 24, 99) + ) +); +calculer cible prepare_1731_aux : avec R, IS_PREMIER, MAJ_TGV_COPIE; + +cible prepare_1731_majo: +application: iliad; +arguments: NUM_STRATE; +variables_temporaires: NUM_EVT_PREMIER, IS_PREMIER, NUM_STRATE_COURANTE; +NUM_EVT_PREMIER = champ_evenement(0, numero); +calculer cible empty_art1731; +iterer : variable V : categorie * : espace PRIM_COPIE : dans ( + V = GLOBAL.V; +) +si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + IS_PREMIER = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + si positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C alors + IS_PREMIER = (positif(IS_PREMIER) ou champ_evenement(R, sens) = SENS_C); + si positif(AFF) alors + afficher_erreur "prout majo_aux 0\n"; + finsi + calculer cible prepare_1731_majo_aux : avec R, IS_PREMIER : espace PRIM_COPIE; + finsi + ) +finsi +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + NUM_STRATE_COURANTE = champ_evenement(R, strate); + IS_PREMIER = champ_evenement(R, numero) = NUM_EVT_PREMIER; + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + si + non positif(IS_PREMIER) + et NUM_STRATE_COURANTE <= NUM_STRATE + et champ_evenement(R, sens) != SENS_C + alors + si positif(AFF) alors + afficher_erreur "prout majo_aux 1\n"; + finsi + calculer cible prepare_1731_majo_aux : espace PRIM_COPIE : avec R, IS_PREMIER; + finsi + sinon_si NUM_STRATE_COURANTE <= NUM_STRATE alors + si positif(AFF) alors + afficher_erreur "prout majo_aux 2\n"; + finsi + calculer cible prepare_1731_majo_aux : espace PRIM_COPIE : avec R, IS_PREMIER; + finsi + ) +) +si positif(AFF) alors + afficher_erreur "prout PRIM_COPIE MAJO\n"; +finsi +calculer cible enchaine_calcul_prim_copie; +calculer cible calcul_1731 : espace PRIM_COPIE; + +cible calcul_inr_aux: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, FLG_INR; +variables_temporaires: FLAG, NINR; +calculer cible reset_saisie_calc; +calculer cible remplit_tgv_inr_d2042; +CORR.PASS_TLIR = CORR.TL_IR + 0; +CORR.PASS_TLIFI = CORR.TL_IFI + 0; +CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; +CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) dans (22, 24) + alors + FLAG = 1; + finsi +) +CORR.FLAG_C22 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 2 + alors + FLAG = 1; + finsi +) +CORR.FLAG_C02 = FLAG; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 99 alors + FLAG = 1; + finsi +) +CORR.FLAG_99 = si (positif(FLAG)) alors (4) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 7 alors + FLAG = 1; + finsi +) +CORR.FLAG_07 = si (positif(FLAG)) alors (5) sinon (0) finsi; +FLAG = 0; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si champ_evenement(R, penalite) = 24 alors + FLAG = 1; + finsi +) +CORR.FLAG_24 = si (positif(FLAG)) alors (6) sinon (0) finsi; +NINR = 1; +iterer : variable R : entre 0..(nb_evenements() - 1) increment 1 : dans ( + si + non ( + champ_evenement(R, penalite) = 99 + ou ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 2 + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + ) + ) + alors + NINR = 0; + finsi +) +NINR = ((non positif(GLOBAL.DEFAUT)) et nb_evenements() != 0 et positif(NINR)); +CORR.FLAG_NINR = NINR; +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; +CORR.FLAG_9YT = GLOBAL.R_TARDIF; +CORR.FLAG_R99 = GLOBAL.SAUVE_INR_R99; +CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; +CORR.CODE_2042 = GLOBAL.CODE_PENA; +CORR.ANNEECOR = GLOBAL.INR_ANNEE_COR; +CORR.NBMOISI = GLOBAL.INR_NB_MOIS; +CORR.NBMOISI2 = GLOBAL.INR_NB_MOIS2; +CORR.NBMOIS2ISF = 0; +CORR.FLAG_INR = FLG_INR; +si positif(AFF) alors + afficher_erreur "prout 444\n"; +finsi +calculer cible enchaine_calcul_corr; +calculer cible signaler_erreurs; + +cible traite_tl: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3; +calculer cible mauvaise_foi : avec INDICE_EVT; +GLOBAL.TL_MF_MFIR = si (GLOBAL.TL_MF_MFIR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCS = si (GLOBAL.TL_MF_MFCS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRD = si (GLOBAL.TL_MF_MFRD > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPS = si (GLOBAL.TL_MF_MFPS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPSOL = si (GLOBAL.TL_MF_MFPSOL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFTAXAGA = si (GLOBAL.TL_MF_MFTAXAGA > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFPCAP = si (GLOBAL.TL_MF_MFPCAP > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFLOY = si (GLOBAL.TL_MF_MFLOY > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGLO = si (GLOBAL.TL_MF_MFGLO > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR = si (GLOBAL.TL_MF_MFCHR > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCHR7 = si (GLOBAL.TL_MF_MFCHR7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCSAL = si (GLOBAL.TL_MF_MFCSAL > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCVN = si (GLOBAL.TL_MF_MFCVN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFGAIN = si (GLOBAL.TL_MF_MFGAIN > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFCDIS = si (GLOBAL.TL_MF_MFCDIS > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE1 = si (GLOBAL.TL_MF_MFRSE1 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE2 = si (GLOBAL.TL_MF_MFRSE2 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE3 = si (GLOBAL.TL_MF_MFRSE3 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE4 = si (GLOBAL.TL_MF_MFRSE4 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE5 = si (GLOBAL.TL_MF_MFRSE5 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE6 = si (GLOBAL.TL_MF_MFRSE6 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFRSE7 = si (GLOBAL.TL_MF_MFRSE7 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFIFI = si (GLOBAL.TL_MF_MFIFI > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFMCSG820 = si (GLOBAL.TL_MF_MFMCSG820 > 0) alors (1) sinon (0) finsi; +GLOBAL.TL_MF_MFREGV = si (GLOBAL.TL_MF_MFREGV > 0) alors (1) sinon (0) finsi; +si + GLOBAL.TL_MF_MFIR > 0 + ou GLOBAL.TL_MF_MFCS > 0 + ou GLOBAL.TL_MF_MFRD > 0 + ou GLOBAL.TL_MF_MFPS > 0 + ou GLOBAL.TL_MF_MFPSOL > 0 + ou GLOBAL.TL_MF_MFTAXAGA > 0 + ou GLOBAL.TL_MF_MFPCAP > 0 + ou GLOBAL.TL_MF_MFLOY > 0 + ou GLOBAL.TL_MF_MFGLO > 0 + ou GLOBAL.TL_MF_MFCHR > 0 + ou GLOBAL.TL_MF_MFCSAL > 0 + ou GLOBAL.TL_MF_MFCVN > 0 + ou GLOBAL.TL_MF_MFGAIN > 0 + ou GLOBAL.TL_MF_MFCDIS > 0 + ou GLOBAL.TL_MF_MFRSE1 > 0 + ou GLOBAL.TL_MF_MFRSE2 > 0 + ou GLOBAL.TL_MF_MFRSE3 > 0 + ou GLOBAL.TL_MF_MFRSE4 > 0 + ou GLOBAL.TL_MF_MFRSE5 > 0 + ou GLOBAL.TL_MF_MFRSE6 > 0 + ou GLOBAL.TL_MF_MFRSE7 > 0 + # ou GLOBAL.TL_MF_MFCHR7 > 0 + ou GLOBAL.TL_MF_MFIFI > 0 + ou GLOBAL.TL_MF_MFMCSG820 > 0 + ou GLOBAL.TL_MF_MFREGV > 0 +alors + GLOBAL.TL_NON_ACQUISE = TL_TL_MAUVAISE_FOI; +sinon_si GLOBAL.TL_NON_ACQUISE != TL_TL_DEFAUT_2042 alors + GLOBAL.TL_NON_ACQUISE = TL_TL_ACQUISE; +finsi +si + non ( + positif(GLOBAL.DEFAUT) + ou (positif(GLOBAL.RETARD) et positif(IS_PREMIER)) + ) +alors + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_RAPPEL_NON_M; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_RAPPEL_C; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_BASE_TL_INIT; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_MENTION_EXP_99; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_CUMULE_CHAMP_BASE_TL_RECT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_MENTION_EXP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_NON_MENTION_EXP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP; + MAJ2 = MAJ_ABAT_20; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_RAPPEL_CP01; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = MAJ_ABAT_20; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_INIT; + + calculer cible contexte_2042_TL_Ref; + F_TRAITEMENT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, F_TRAITEMENT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace TL_D2042_ABAT_RECT; +finsi + +cible is_def_ret_not_8_11: +application: iliad; +arguments: RESULTAT, R; +RESULTAT = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) dans (8, 11) + ) +); + +cible est_rappel_2A5: +application: iliad; +arguments: RESULTAT, R; +RESULTAT = ( + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) +); + +cible is_code_rappel_13: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et non positif(EST_SF_NAISS) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 13 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_12: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et positif(HAS_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) = 24 + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 12 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_11: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + (GLOBAL.CODE_PENA = 22 et positif(EST_TAX_INIT)) + ou ( + champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) = SENS_C + ou ( + champ_evenement(R, sens) = SENS_R + et meme_variable(champ_evenement(R, code), REGCO) + ) + ou ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et positif(HAS_C22R02) + ) + ) + ) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 11 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_10: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NATURE, RAPPEL_2A5, NOT_8_11, TROUVE_C22R02; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +calculer cible est_rappel_2A5 : avec RAPPEL_2A5, R; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec TROUVE_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et champ_evenement(R, sens) = SENS_R + et positif(RAPPEL_2A5) + et ( + NATURE = N_REVENU + ou (NATURE = N_CHARGE et champ_evenement(R, penalite) = 2) + ) + ) + ou ( + positif(TROUVE_C22R02) + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (22, 24) + ) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 10 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_09: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NATURE, RAPPEL_2A5, NOT_8_11; +calculer cible get_nature : avec NATURE, champ_evenement(R, code); +calculer cible est_rappel_2A5 : avec RAPPEL_2A5, R; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non (attribut(champ_evenement(R, code), categorie_TL) dans (10, 15)) + et ( + ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + et champ_evenement(R, penalite) dans (22, 24) + ) + ou + ( + champ_evenement(R, sens) = SENS_R + et positif(RAPPEL_2A5) + et + ( + NATURE = N_REVENU + ou (NATURE = N_CHARGE et champ_evenement(R, penalite) = 2) + ) + ) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 9 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_08: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 24 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 8 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_07: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, penalite) = 22 + et ( + champ_evenement(R, sens) dans (SENS_R, SENS_C) + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 7 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_06: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, HAS_C22R02; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 10 + et champ_evenement(R, penalite) dans (22, 24) + et ( + ( + champ_evenement(R, sens) = SENS_C + et non positif(HAS_C22R02) + ) + ou champ_evenement(R, sens) = SENS_R + ou meme_variable(champ_evenement(R, code), REGCO) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 6 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_05: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +RESULTAT = ( + positif(NOT_8_11) + ou ( + attribut(champ_evenement(R, code), categorie_TL) = 15 + et champ_evenement(R, sens) = SENS_R + et ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 5 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_04: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: HAS_C22R02, NOT_8_11; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) < 1 + ) + ou ( + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) + ) + et ( + ( + champ_evenement(R, sens) = SENS_C + et ( + ( + # is_rappel_1728_X + champ_evenement(R, penalite) dans (7, 8, 10, 11, 17, 18, 31) + ) + ou champ_evenement(R, penalite) = 6 + ou ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + ou ( + champ_evenement(R, penalite) = 22 + et attribut(champ_evenement(R, code), categorie_TL) = 10 + et positif(HAS_C22R02) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_R + et ( + champ_evenement(R, penalite) = 6 + ou ( + ( + # is_rappel_2A5 + champ_evenement(R, penalite) dans (2, 3, 4, 5, 30, 32, 35, 55) + ) + et attribut(champ_evenement(R, code), categorie_TL) = 10 + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et non positif(IS_PREMIER) + ) + ) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 4 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_03: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 3 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_02: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + ( + positif(EST_SF_NAISS) + et ( + (champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1) + ou (champ_evenement(R, sens) = SENS_M et positif(GLOBAL.MENTION_EXP)) + ou ( + champ_evenement(R, sens) = SENS_M + et non meme_variable(champ_evenement(R, code), REGCO) + et GLOBAL.PENALITE_REGCO dans (1, 22, 24, 99) + ) + ) + ) + ou ( + champ_evenement(R, sens) = SENS_C + et GLOBAL.CODE_PENA != 22 + et (champ_evenement(R, penalite) < 1 ou champ_evenement(R, penalite) = 99) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 2 = " (RESULTAT) "\n"; +finsi + +cible is_code_rappel_01: +application: iliad; +arguments: RESULTAT, R, INDICE_EVT, IS_PREMIER; +variables_temporaires: NOT_8_11, EST_SF_NAISS, EST_TAX_INIT; +calculer cible is_def_ret_not_8_11 : avec NOT_8_11, R; +calculer cible est_code_sf_naiss : avec EST_SF_NAISS, champ_evenement(R, code); +calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); +RESULTAT = ( + positif(NOT_8_11) + ou ( + non positif(IS_PREMIER) + et ( + ( + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 1 + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, sens) = SENS_M + et positif(GLOBAL.MENTION_EXP) + et positif(EST_SF_NAISS) + ) + ou ( + champ_evenement(R, penalite) = 99 + et non positif(GLOBAL.DEFAUT) + et GLOBAL.CODE_PENA != 22 + et ( + meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + ) + ) + ) +); +si positif(AFF) alors + afficher_erreur "prout code rappel 1 = " (RESULTAT) "\n"; +finsi + +cible prepare_1731_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, CAS_INR; +variables_temporaires: NUM_PREM_RAPPEL_EVT, NUM_EVT_PREMIER, PREM_EVT, IS_CODE, MAJ_TGV_COPIE; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si non present(NUM_PREM_RAPPEL_EVT) et champ_evenement(R, id_evt) = INDICE_EVT alors + NUM_PREM_RAPPEL_EVT = champ_evenement(R, numero); + finsi +) +NUM_EVT_PREMIER = champ_evenement(0, numero); +calculer cible empty_art1731; +iterer : variable V : categorie * : espace PRIM_COPIE : dans ( + V = GLOBAL.V; +) +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, numero) <= NUM_PREM_RAPPEL_EVT alors + PREM_EVT = (champ_evenement(R, numero) = NUM_EVT_PREMIER); + IS_CODE = 0; + MAJ_TGV_COPIE = 0; + calculer cible is_code_rappel_13 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 13 et positif(IS_CODE))); + calculer cible is_code_rappel_12 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 12 et positif(IS_CODE))); + calculer cible is_code_rappel_11 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 11 et positif(IS_CODE))); + calculer cible is_code_rappel_10 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 10 et positif(IS_CODE))); + calculer cible is_code_rappel_09 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 9 et positif(IS_CODE))); + calculer cible is_code_rappel_08 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 8 et positif(IS_CODE))); + calculer cible is_code_rappel_07 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 7 et positif(IS_CODE))); + calculer cible is_code_rappel_06 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 6 et positif(IS_CODE))); + calculer cible is_code_rappel_05 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 5 et positif(IS_CODE))); + calculer cible is_code_rappel_04 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 4 et positif(IS_CODE))); + calculer cible is_code_rappel_03 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 3 et positif(IS_CODE))); + calculer cible is_code_rappel_02 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 2 et positif(IS_CODE))); + calculer cible is_code_rappel_01 : avec IS_CODE, R, INDICE_EVT, IS_PREMIER; + MAJ_TGV_COPIE = (positif(MAJ_TGV_COPIE) ou (CAS_INR >= 1 et positif(IS_CODE))); + calculer cible prepare_1731_aux : avec R, PREM_EVT, MAJ_TGV_COPIE : espace PRIM_COPIE; + finsi +) +si positif(AFF) alors + afficher_erreur "prout PRIM_COPIE INR\n"; +finsi +calculer cible enchaine_calcul_prim_copie; +calculer cible calcul_1731 : espace PRIM_COPIE; + +cible calcul_inr: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: DEFAUT_RETARD_PREMIER, HAS_C22R02, MAJ0, MAJ1, MAJ2, MAJ3, INR_FLAG, CAS_INR; +DEFAUT_RETARD_PREMIER = ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et positif(IS_PREMIER) +); +calculer cible recherche_C22R02 : avec HAS_C22R02, INDICE_EVT; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_PROV_ANT.VAR = VAR; +) +si INDICE_EVT < 2 alors + si positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD) alors + iterer + : variable VAR + : categorie saisie * + : espace INR_D2042_R9901_ANT + : dans ( + INR_D2042.VAR = VAR; + ) + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_r9901_corr; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_R9901_ANT.VAR = VAR; +) +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 1; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_HR_corr; +CORR.REF1731 = 0; +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042_PROV_ANT +: dans ( + INR_D2042.VAR = VAR; +) +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_F; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +iterer +: variable VAR +: categorie saisie * +: espace INR_D2042 +: dans ( + INR_D2042_REFR99R_ANT.VAR = VAR; +) + +si positif(GLOBAL.MENTION_EXP) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_C; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +si + non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) +alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_R55; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 2; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +CORR.REF1731 = 1; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ref_corr; +CORR.REF1731 = 0; +si non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_MENTION_EXP_99R; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + CAS_INR = 3; + calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_inr_ntl_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + INR_FLAG = INR_FLAG_INR_NON_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat98_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_MF; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_2A5; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_CP; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_1728; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_R; + MAJ1 = MAJ_CODE_1729_6; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +si (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) et non positif(IS_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_RAPPEL_M; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 4; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_R; + MAJ2 = MAJ_CODE_1729_2A5; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 5; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_intertl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CONTEXTE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_CODE_24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL; + MAJ1 = MAJ_RAPPEL_CP24; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 6; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_CODE_22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_NON_TL15; + MAJ1 = MAJ_RAPPEL_CP22; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi +CAS_INR = 7; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_CODE_24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_NON_TL15; +MAJ1 = MAJ_RAPPEL_CP24; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 8; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_NON_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_ntl24_corr; + +CAS_INR = 9; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_cimr24_corr; + +si non positif(DEFAUT_RETARD_PREMIER) et positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + INR_FLAG = INR_FLAG_INR_TL; + calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; + calculer cible sauve_base_abat99_corr; +finsi +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_1729_2A5; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; +finsi + +CAS_INR = 10; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_CONTEXTE_22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_22; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP22; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 11; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl22_corr; + +si non positif(DEFAUT_RETARD_PREMIER) alors + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_R; + MAJ3 = MAJ_CODE_24; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi + + si non positif(HAS_C22R02) alors + calculer cible contexte_2042_INR; + MAJ0 = MAJ_TL; + MAJ1 = MAJ_TL15; + MAJ2 = MAJ_RAPPEL_CP24; + MAJ3 = indefini; + calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + finsi +finsi + +CAS_INR = 12; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_tl24_corr; + +calculer cible contexte_2042_INR; +MAJ0 = MAJ_RAPPEL_NF; +MAJ1 = indefini; +MAJ2 = indefini; +MAJ3 = indefini; +calculer cible met_a_jour_2042_INR_evt : avec INDICE_EVT, IS_PREMIER, MAJ0, MAJ1, MAJ2, MAJ3; + +CAS_INR = 13; +calculer cible prepare_1731_inr : avec IS_PREMIER, INDICE_EVT, CAS_INR; +INR_FLAG = INR_FLAG_INR_TL; +calculer cible calcul_inr_aux : avec IS_PREMIER, INDICE_EVT, INR_FLAG; +calculer cible sauve_base_inr_inter22_corr; + +cible traite_reference: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3; +si + non ( + ( + positif(GLOBAL.DEFAUT) # positif(GLOBAL.RETARD) + ou positif(GLOBAL.RETARD) + ) + et positif(IS_PREMIER) + ) +alors + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_RECT; + + calculer cible contexte_2042_TL_Ref; + ID_TRAIT = ID_SANS_TRAITEMENT; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace D2042_ABAT; +finsi + +cible calcul_majo_normal: +application: iliad; +arguments: + IS_PREMIER, INDICE_EVT, NUM_STRATE, + NB_RAPPELS_STRATE, PROCHAINE_STRATE; +variables_temporaires: TAUX_PENALITE; +TAUX_PENALITE = get_strate_taux(NUM_STRATE); +si TAUX_PENALITE = -1 alors + TAUX_PENALITE = GLOBAL.MAJO_TAUX_STRATE; +finsi +si NUM_STRATE = 0 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + GLOBAL.MAJO_PREM_STR = 1; + GLOBAL.MAJO_NB_STR_TR = 0; +finsi +si + (NB_RAPPELS_STRATE != 0 et GLOBAL.MAJO_D2042_STRATE_NB > 0) + ou NUM_STRATE = GLOBAL.NB_STRATES - 1 +alors + # if taux_penalite < 0 then failwith "Taux pénalite négatif"; + restaurer + : CORR.TL_CS, CORR.TL_TAXAGA, CORR.TL_CDIS, CORR.TL_CAP, CORR.TL_CHR, + CORR.TL_RSE1, CORR.TL_RSE2, CORR.TL_RSE3, CORR.TL_RSE4, CORR.TL_IFI + : apres ( + calculer cible reset_saisie_calc; + ) + CORR.FLAG_1STRATE = GLOBAL.MAJO_PREM_STR; + calculer cible remplit_tgv_majo_d2042_strate; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + MAJO_STR_TR[NUM_STRATE] = 1; + CORR.X = NUM_STRATE; + CORR.TAUX_STRATE = TAUX_PENALITE; + CORR.FLAG_NBSTRTR = GLOBAL.MAJO_NB_STR_TR; + CORR.FLAG_DERSTTR = GLOBAL.MAJO_DERN_STR_TR; + CORR.CSTRATE1 = GLOBAL.MAJO_CODE_STRATE; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; + CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; + CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; + CORR.FLAG_RECTIF = GLOBAL.RECTIF; + CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; + CORR.FLAG_PRIM = GLOBAL.SF_PRIMITIF; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.TARDIFEVT2 = GLOBAL.MAJO_TARDIF_EVT2; + si positif(GLOBAL.RETARD) et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) alors + CORR.CSTRATE99 = GLOBAL.CODE_PENA; + finsi + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.TAUX_2042 = get_taux_penalite(GLOBAL.CODE_PENA); + calculer cible detecte_penalites; + si NUM_STRATE = 1 alors + MAJO_STR_TR[NUM_STRATE] = 0; + calculer cible affect_code; + finsi + calculer cible affect_str_tr; + si + NUM_STRATE = GLOBAL.NB_STRATES - 1 + et positif(GLOBAL.RETARD) + et GLOBAL.CODE_PENA dans (2, 3, 7, 8, 9, 17, 22) + alors + CORR.FLAG_TRDEGTR = GLOBAL.CODE_PENA; + sinon + CORR.FLAG_TRDEGTR = 0; + finsi + calculer cible init_1731; + calculer cible prepare_1731_majo : avec PROCHAINE_STRATE; + si positif(AFF) alors + afficher_erreur "555\n"; + finsi + calculer cible enchaine_calcul_corr; + si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + finsi + calculer cible sauve_base_stratemajo_corr; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; + GLOBAL.MAJO_DERN_STR_TR = NUM_STRATE; + GLOBAL.MAJO_PREM_STR = 0; + GLOBAL.MAJO_NB_STR_TR = GLOBAL.MAJO_NB_STR_TR + 1; +finsi +si NUM_STRATE = GLOBAL.NB_STRATES - 1 alors + GLOBAL.MAJO_DERN_STR_TR = 0; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; +finsi + +cible calcul_majo_tardif: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +variables_temporaires: STRATE_0; +si GLOBAL.D2042_NB > 0 alors + calculer cible reset_saisie_calc; + calculer cible init_1731; + STRATE_0 = 0; + calculer cible prepare_1731_majo : avec STRATE_0; + calculer cible remplit_tgv_d2042; + CORR.PASS_TLIR = CORR.TL_IR + 0; + CORR.PASS_TLIFI = CORR.TL_IFI + 0; + CORR.PASS_TLCS = CORR.TL_CS + 0; + CORR.PASS_TLTAXAGA = CORR.TL_TAXAGA + 0; + CORR.PASS_TLCDIS = CORR.TL_CDIS + 0; + CORR.TAUX_2042 = TAUX_PENALITE; + CORR.CODE_2042 = GLOBAL.CODE_PENA; + CORR.FLAG_RETARD = GLOBAL.RETARD; + CORR.FLAG_RETARD08 = GLOBAL.RETARD08; + CORR.FLAG_RETARD07 = GLOBAL.RETARD07; + CORR.FLAG_RETARD99 = GLOBAL.RETARD99; + CORR.FLAG_RETARD22 = GLOBAL.RETARD22; + CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; + CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; + CORR.IND_RJLJ = GLOBAL.CORR_RJLJ; + CORR.FLAG_TRTARDIF = 1; + CORR.FLAG_1STRATE = 0; + CORR.FLAG_DERSTTR = 0; + calculer cible affect_code; + calculer cible affect_str_tr; + calculer cible detecte_penalites; + calculer cible enchaine_verification_corr; + calculer cible signaler_erreurs; + si positif(AFF) alors + afficher_erreur "666\n"; + finsi + calculer cible enchaine_calcul_corr; + calculer cible verif_calcul_corrective_corr; + calculer cible signaler_erreurs; + calculer cible sauve_base_stratemajo_corr; + calculer cible sauve_base_anterieure_corr; + CORR.FLAG_TRTARDIF = 0; + CORR.FLAG_RETARD = 0; + CORR.FLAG_RETARD08 = 0; +finsi +calculer cible sauve_base_anterieure_corr; + +cible calcul_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: + NUM_STRATE, TAUX_PENALITE, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3, + NB_RAPPELS_P, NB_RAPPELS_STRATE, PROCHAINE_STRATE; +si non positif(GLOBAL.RETARD) alors + calculer cible clear_majo_str_tr; +finsi +calculer cible remplit_tgv_d2042_rect; +si positif(AFF) alors + afficher_erreur "777\n"; +finsi +calculer cible enchaine_calcul_corr; +si present(CORR.IRBASE) alors + CORR.IRBASE2042_FIC = CORR.IRBASE; +finsi +si present(CORR.IRBASE_I) alors + CORR.IRBASE_IRECT = CORR.IRBASE_I; +finsi +si present(CORR.CSBASE_MAJO) alors + CORR.CSBASE2042_FIC = CORR.CSBASE_MAJO; +finsi +si present(CORR.RDBASE_MAJO) alors + CORR.RDBASE2042_FIC = CORR.RDBASE_MAJO; +finsi +si present(CORR.PSBASE_MAJO) alors + CORR.PSBASE2042_FIC = CORR.PSBASE_MAJO; +finsi +si present(CORR.TAXABASE_MAJO) alors + CORR.TAXABASE2042_FIC = CORR.TAXABASE_MAJO; +finsi +si present(CORR.TAXABASE_I) alors + CORR.TAXABASE_IRECT = CORR.TAXABASE_I; +finsi +si present(CORR.CSALBASE_MAJO) alors + CORR.CSALBASE2042_FIC = CORR.CSALBASE_MAJO; +finsi +si present(CORR.CDISBASE_MAJO) alors + CORR.CDISBASE2042_FIC = CORR.CDISBASE_MAJO; +finsi +si present(CORR.CAPBASE_MAJO) alors + CORR.CAPBASE2042_FIC = CORR.CAPBASE_MAJO; +finsi +si present(CORR.CAPBASE_I) alors + CORR.CAPBASE_IRECT = CORR.CAPBASE_I; +finsi +si present(CORR.HRBASE_MAJO) alors + CORR.HRBASE2042_FIC = CORR.HRBASE_MAJO; +finsi +si present(CORR.HRBASE_I) alors + CORR.HRBASE_IRECT = CORR.HRBASE_I; +finsi +si present(CORR.GAINBASE_MAJO) alors + CORR.GAINBASE2042_FIC = CORR.GAINBASE_MAJO; +finsi +si present(CORR.RSE1BASE_MAJO) alors + CORR.RSE1BASE2042_FIC = CORR.RSE1BASE_MAJO; +finsi +si present(CORR.RSE2BASE_MAJO) alors + CORR.RSE2BASE2042_FIC = CORR.RSE2BASE_MAJO; +finsi +si present(CORR.RSE3BASE_MAJO) alors + CORR.RSE3BASE2042_FIC = CORR.RSE3BASE_MAJO; +finsi +si present(CORR.RSE4BASE_MAJO) alors + CORR.RSE4BASE2042_FIC = CORR.RSE4BASE_MAJO; +finsi +si present(CORR.RSE5BASE_MAJO) alors + CORR.RSE5BASE2042_FIC = CORR.RSE5BASE_MAJO; +finsi +si present(CORR.RSE6BASE_MAJO) alors + CORR.RSE6BASE2042_FIC = CORR.RSE6BASE_MAJO; +finsi +si present(CORR.RSE8BASE_MAJO) alors + CORR.RSE8BASE2042_FIC = CORR.RSE8BASE_MAJO; +finsi +si present(CORR.CVNBASE_MAJO) alors + CORR.CVNBASE2042_FIC = CORR.CVNBASE_MAJO; +finsi +si present(CORR.GLOBASE_MAJO) alors + CORR.GLOBASE2042_FIC = CORR.GLOBASE_MAJO; +finsi +si present(CORR.PSOLBASE_MAJO) alors + CORR.PSOLBASE2042_FIC = CORR.PSOLBASE_MAJO; +finsi +si present(CORR.C820BASE_MAJO) alors + CORR.C820BASE2042_FIC = CORR.C820BASE_MAJO; +finsi +si present(CORR.IFI4BASE) alors + CORR.IFI4BASE2042_FIC = CORR.IFI4BASE; +finsi +si + positif(IS_PREMIER) + et (non positif(GLOBAL.DEFAUT)) + et positif(GLOBAL.RETARD) +alors + TAUX_PENALITE = get_taux_penalite(GLOBAL.CODE_PENA); + NUM_STRATE = GLOBAL.MAJO_NUM_STRATE; + calculer cible calcul_majo_tardif + : avec IS_PREMIER, INDICE_EVT, NUM_STRATE, TAUX_PENALITE; +sinon + ID_TRAIT = ID_TRAITE_MAJO_P; + MAJ0 = MAJ_RAPPEL_P; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_evt + : avec INDICE_EVT, ID_TRAIT, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NB_RAPPELS_P = GLOBAL.NB_RAPPELS_RES; + + NUM_STRATE = 0; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 1; + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_P; + + NUM_STRATE = 0; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + NUM_STRATE = 1; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STRATE, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_P; + + si NB_RAPPELS_P != 0 alors + calculer cible calcul_cum_p; + finsi + calculer cible calcul_majo_P : avec NB_RAPPELS_P; + calculer cible clear_majo_str_tr; + iterer + : variable NUM_STR + : entre 0 ..(GLOBAL.NB_STRATES + 0 - 1) increment 1 + : dans ( + arranger_evenements + : trier R1, R2 + : avec + si (champ_evenement(R1, strate) != -1 et champ_evenement(R2, strate) = -1) alors (1) + sinon (si (champ_evenement(R1, strate) = -1 et champ_evenement(R2, strate) != -1) alors (0) + sinon (si (champ_evenement(R1, strate) < champ_evenement(R2, strate)) alors (1) + sinon (si (champ_evenement(R1, strate) > champ_evenement(R2, strate)) alors (0) + sinon (si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi + : dans ( + si NUM_STR = 0 alors + PROCHAINE_STRATE = champ_evenement(0, strate); + sinon + PROCHAINE_STRATE = indefini; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si + (non present(PROCHAINE_STRATE)) + et champ_evenement(R, strate) = NUM_STR + alors + PROCHAINE_STRATE = champ_evenement(R, strate); + finsi + ) + si non present(PROCHAINE_STRATE) alors + PROCHAINE_STRATE = champ_evenement(nb_evenements() - 1, strate); + finsi + finsi + ) + si NUM_STR dans (20, 21, 22) alors + MAJ0 = MAJ_TL; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + sinon + MAJ0 = indefini; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_STRATE; + finsi + NB_RAPPELS_STRATE = GLOBAL.NB_RAPPELS_RES; + MAJ0 = MAJ_ABAT_20; + MAJ1 = indefini; + MAJ2 = indefini; + MAJ3 = indefini; + calculer cible met_a_jour_2042_strate + : avec NUM_STR, MAJ0, MAJ1, MAJ2, MAJ3 + : espace MAJO_D2042_ABAT_STRATE; + GLOBAL.MAJO_NUM_STRATE = NUM_STR; + calculer cible calcul_majo_normal + : avec IS_PREMIER, INDICE_EVT, NUM_STR, NB_RAPPELS_STRATE, PROCHAINE_STRATE; + ) +finsi +CORR.FLAG_RETARD = GLOBAL.RETARD; +CORR.FLAG_RETARD07 = GLOBAL.RETARD07; +CORR.FLAG_RETARD08 = GLOBAL.RETARD08; +CORR.FLAG_RETARD0718 = GLOBAL.RETARD0718; +CORR.FLAG_RETARD101718 = GLOBAL.RETARD101718; +CORR.FLAG_RETARD22 = GLOBAL.RETARD22; +CORR.FLAG_RETARD99 = GLOBAL.RETARD99; +CORR.FLAG_DEFAUT = GLOBAL.DEFAUT; +CORR.FLAG_DEFAUT10 = GLOBAL.DEFAUT10; +CORR.FLAG_DEFAUT11 = GLOBAL.DEFAUT11; +CORR.FLAG_RECTIF = GLOBAL.RECTIF; +CORR.FLAG_RECTIFMAJO = GLOBAL.RECTIF_MAJO; +calculer cible sauve_base_majo_corr; +calculer cible sauve_base_anterieure_corr; + +cible recherche_CR02: +application: iliad; +arguments: RESULTAT, R; +variables_temporaires: C0, R0, C1, R1, IM41, PREM_R02, NUM_EVT, NUM_RAP; +C0 = 0; +R0 = 0; +C1 = 0; +R1 = 0; +IM41 = 0; +PREM_R02 = 1; +NUM_EVT = 0; +NUM_RAP = 0; +iterer +: variable RR +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, penalite) = 2 + alors + si + champ_evenement(RR, sens) = SENS_C + et non positif(champ_evenement(RR, 2042_rect)) + alors + C0 = C0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et non positif(champ_evenement(RR, 2042_rect)) + alors + R0 = R0 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_C + et positif(champ_evenement(RR, 2042_rect)) + alors + C1 = C1 + champ_evenement(RR, montant); + finsi + si + champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + alors + R1 = R1 + champ_evenement(RR, montant); + finsi + finsi + si + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et champ_evenement(RR, sens) = SENS_R + et positif(champ_evenement(RR, 2042_rect)) + et positif(PREM_R02) + alors + PREM_R02 = 0; + NUM_EVT = champ_evenement(RR, numero); + NUM_RAP = champ_evenement(RR, rappel); + finsi + IM41 = ( + positif(IM41) + ou ( + meme_variable(champ_evenement(R, code), champ_evenement(RR, code)) + et ( + champ_evenement(RR, penalite) != 2 + ou ( + champ_evenement(RR, penalite) = 2 + et non positif(champ_evenement(RR, 2042_rect)) + ) + ) + et champ_evenement(RR, sens) dans (SENS_C, SENS_M) + et (non positif(PREM_R02)) + et ( + champ_evenement(RR, numero) > NUM_EVT + ou ( + champ_evenement(RR, numero) = NUM_EVT + et champ_evenement(RR, rappel) > NUM_RAP + ) + ) + ) + ); +) +si positif(IM41) alors + RESULTAT = 3; +sinon_si positif(champ_evenement(R, 2042_rect)) et C1 > R1 alors + RESULTAT = 2; +sinon_si (non positif(champ_evenement(R, 2042_rect))) et C0 > R0 alors + RESULTAT = 1; +sinon + RESULTAT = 0; +finsi + +cible is_code_situation_famille: +application: iliad; +arguments: RES_SF, VAR; +si meme_variable(VAR, 0AM) alors + RES_SF = SF_MARIAGE; +sinon_si meme_variable(VAR, 0AC) alors + RES_SF = SF_CELIBAT; +sinon_si meme_variable(VAR, 0AD) alors + RES_SF = SF_DIVORCE; +sinon_si meme_variable(VAR, 0AO) alors + RES_SF = SF_PACSE; +sinon_si meme_variable(VAR, 0AV) alors + si GLOBAL.ANNEE_DECES_CONJOINT = GLOBAL.V_MILLESIME alors + RES_SF = SF_VEUVAGE_TRUE; + sinon + RES_SF = SF_VEUVAGE_FALSE; + finsi +sinon + RES_SF = SF_INVALIDE; +finsi + +cible traite_majo: +application: iliad; +arguments: IS_PREMIER, INDICE_EVT; +variables_temporaires: RAP_SF, RAP_DA, RAP_DB, PENALITE, SF, STR; +RAP_SF = indefini; +RAP_DA = indefini; +RAP_DB = indefini; +PENALITE = -1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible is_code_situation_famille : avec SF, champ_evenement(R, code); + si SF != SF_INVALIDE alors + si + non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et positif(IS_PREMIER) + ) + alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + si + GLOBAL.SF_INITIALE dans (SF_MARIAGE, SF_VEUVAGE_TRUE, SF_PACSE) + alors + RAP_SF = R; + finsi + sinon + GLOBAL.SF_COURANTE = SF; + PENALITE = champ_evenement(R, penalite); + finsi + sinon_si positif(IS_PREMIER) alors + GLOBAL.SF_INITIALE = SF; + finsi + finsi + si meme_variable(champ_evenement(R, code), 0DA) alors + RAP_DA = R; + finsi + si meme_variable(champ_evenement(R, code), 0DB) alors + RAP_DB = R; + finsi + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +si PENALITE >= 0 alors + si present(RAP_SF) alors + champ_evenement(RAP_SF, penalite) = PENALITE; + finsi + si present(RAP_DA) alors + champ_evenement(RAP_DA, penalite) = PENALITE; + finsi + si present(RAP_DB) alors + champ_evenement(RAP_DB, penalite) = PENALITE; + finsi +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + si INDICE_EVT >= 1 et positif(GLOBAL.RETARD) alors + si champ_evenement(R, sens) dans (SENS_M, SENS_C) alors + GLOBAL.MAJO_TARDIF_EVT2 = 1; + finsi + sinon + GLOBAL.MAJO_TARDIF_EVT2 = 0; + finsi + finsi +) +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) <= INDICE_EVT alors + calculer cible get_strate : avec STR, R; + champ_evenement(R, strate) = STR; + sinon + champ_evenement(R, strate) = -1; + finsi +) +si positif(GLOBAL.DEFAUT) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042_CTXT + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + finsi + ) +sinon_si positif(GLOBAL.RETARD) alors + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace MAJO_D2042_REF_ABAT + : dans ( + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + ) +sinon + GLOBAL.MAJO_D2042_STRATE_NB = 0; + GLOBAL.MAJO_D2042_P_NB = 0; + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + MAJO_D2042_STRATE.VAR = VAR; + MAJO_D2042_ABAT_STRATE.VAR = VAR; + MAJO_D2042_P.VAR = VAR; + MAJO_D2042_ABAT_P.VAR = VAR; + si present(VAR) alors + GLOBAL.MAJO_D2042_STRATE_NB = GLOBAL.MAJO_D2042_STRATE_NB + 1; + GLOBAL.MAJO_D2042_P_NB = GLOBAL.MAJO_D2042_P_NB + 1; + finsi + ) +finsi + +cible controle: +application: iliad; +arguments: QUELLE_SP, INDICE_EVT; +variables_temporaires: NATURE, ELEM_2042, MONTANT_2042, NAT_RECH, COMMENCE_PAR_5; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si champ_evenement(R, id_evt) = INDICE_EVT alors + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si QUELLE_SP = 0 alors + ELEM_2042 = D2042.champ_evenement(R, code); + sinon + ELEM_2042 = INR_D2042.champ_evenement(R, code); + finsi + MONTANT_2042 = ELEM_2042 + 0; + si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) != 0 alors + calculer cible recherche_cpena : avec NAT_RECH, R; + sinon + NAT_RECH = 0; + finsi + si NAT_RECH = 5 alors + nettoie_erreurs_finalisees; + leve_erreur A72207; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, penalite) = 32 + et non meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A045; + calculer cible signaler_erreur_ano; + finsi + si + non (champ_evenement(R, penalite) dans (0, 32)) + et meme_variable(champ_evenement(R, code), 8VX) + alors + nettoie_erreurs_finalisees; + leve_erreur A044; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) != SENS_M + et non (champ_evenement(R, penalite) dans (0, 7, 8, 10, 11, 17, 18, 99)) + alors + si meme_variable(champ_evenement(R, code), 8VW) alors + nettoie_erreurs_finalisees; + leve_erreur A042; + calculer cible signaler_erreur_ano; + sinon_si meme_variable(champ_evenement(R, code), 8VV) alors + nettoie_erreurs_finalisees; + leve_erreur A041; + calculer cible signaler_erreur_ano; + finsi + finsi + si + non (champ_evenement(R, penalite) dans (30, 35, 99)) + et meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A046; + calculer cible signaler_erreur_ano; + finsi + calculer cible alias_commence_par_5 : avec COMMENCE_PAR_5, champ_evenement(R, code); + si + champ_evenement(R, penalite) = 31 + et ( + meme_variable(champ_evenement(R, code), 5QM) + ou meme_variable(champ_evenement(R, code), 5RM) + ou non positif(COMMENCE_PAR_5) + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A048; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, sens) = SENS_M + et champ_evenement(R, penalite) != 0 + et non meme_variable(champ_evenement(R, code), REGCO) + alors + nettoie_erreurs_finalisees; + leve_erreur A970; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XT > GLOBAL.NUM_EVT_9XU alors + nettoie_erreurs_finalisees; + leve_erreur A96903; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9XU > GLOBAL.NUM_EVT_9XT alors + nettoie_erreurs_finalisees; + leve_erreur A96904; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XT = 0 et GLOBAL.MONTANT_9XU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96803; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9XU = 0 et GLOBAL.MONTANT_9XT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96804; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YT > GLOBAL.NUM_EVT_9YU alors + nettoie_erreurs_finalisees; + leve_erreur A96901; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.NUM_EVT_9YU > GLOBAL.NUM_EVT_9YT alors + nettoie_erreurs_finalisees; + leve_erreur A96902; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YT = 0 et GLOBAL.MONTANT_9YU != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96801; + calculer cible signaler_erreur_ano; + finsi + si GLOBAL.MONTANT_9YU = 0 et GLOBAL.MONTANT_9YT != 0 alors + nettoie_erreurs_finalisees; + leve_erreur A96802; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 0 alors + nettoie_erreurs_finalisees; + leve_erreur A971; + calculer cible signaler_erreur_ano; + finsi + si present(ELEM_2042) alors + si + type(champ_evenement(R, code), BOOLEEN) + et non ( + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et champ_evenement(R, numero) = champ_evenement(0, numero) + ) + alors + si NATURE = N_REVENU alors + si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + sinon_si NATURE = N_CHARGE alors + si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_M alors + nettoie_erreurs_finalisees; + leve_erreur A72001; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 >= 1 et champ_evenement(R, sens) = SENS_C alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + sinon_si ELEM_2042 <= 0 et champ_evenement(R, sens) = SENS_R alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + finsi + finsi + finsi + si + NAT_RECH dans (0, 6) + et NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72002; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + et NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et non present(ELEM_2042) + alors + nettoie_erreurs_finalisees; + leve_erreur A72003; + calculer cible signaler_erreur_ano; + finsi + si champ_evenement(R, sens) = SENS_P et non present(ELEM_2042) alors + nettoie_erreurs_finalisees; + leve_erreur A721; + calculer cible signaler_erreur_ano; + finsi + si + non ( + meme_variable(champ_evenement(R, code), 0AX) + ou meme_variable(champ_evenement(R, code), 0AY) + ou meme_variable(champ_evenement(R, code), 0AZ) + ) + alors + si + NATURE = N_CHARGE + et champ_evenement(R, sens) = SENS_R + et champ_evenement(R, montant) > MONTANT_2042 + alors + si champ_evenement(R, penalite) = 99 alors + nettoie_erreurs_finalisees; + leve_erreur A72204; + calculer cible signaler_erreur_ano; + sinon + nettoie_erreurs_finalisees; + leve_erreur A72201; + calculer cible signaler_erreur_ano; + finsi + finsi + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_M + et ( + non present(ELEM_2042) + ou champ_evenement(R, montant) > MONTANT_2042 + ) + alors + nettoie_erreurs_finalisees; + leve_erreur A72202; + calculer cible signaler_erreur_ano; + finsi + CORR.V_FLAG8OT = positif(GLOBAL.COD8OT + 0); + si + NATURE = N_REVENU + et champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = 0 + et present(ELEM_2042) + et champ_evenement(R, montant) > MONTANT_2042 + alors + nettoie_erreurs_finalisees; + leve_erreur A72203; + calculer cible signaler_erreur_ano; + finsi + finsi + si + champ_evenement(R, sens) dans (SENS_R, SENS_P) + et champ_evenement(R, penalite) dans (9, 12) + et vers_annee(champ_evenement(R, date)) >= 2006 + alors + nettoie_erreurs_finalisees; + leve_erreur A724; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et champ_evenement(R, numero) != champ_evenement(0, numero) + et champ_evenement(R, penalite) = 22 + et non positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A725; + calculer cible signaler_erreur_ano; + finsi + si + (positif(GLOBAL.DEFAUT1011) ou positif(GLOBAL.RETARD0718)) + et non ( + # codes_sf + meme_variable(champ_evenement(R, code), 0AM) + ou meme_variable(champ_evenement(R, code), 0AC) + ou meme_variable(champ_evenement(R, code), 0AD) + ou meme_variable(champ_evenement(R, code), 0AO) + ou meme_variable(champ_evenement(R, code), 0AV) + ) + et champ_evenement(R, penalite) != 99 + et positif(CORR.V_FLAGANO726 + 0) + alors + nettoie_erreurs_finalisees; + leve_erreur A726; + calculer cible signaler_erreur_ano; + finsi + si + champ_evenement(R, numero) = champ_evenement(nb_evenements() - 1, numero) + et champ_evenement(R, sens) dans (SENS_R, SENS_C, SENS_M) + alors + calculer cible recherche_CR02 : avec NAT_RECH, R; + si NAT_RECH = 2 alors + nettoie_erreurs_finalisees; + leve_erreur A72301; + calculer cible signaler_erreur_ano; + sinon_si NAT_RECH = 3 et non positif(GLOBAL.ISF_PRIM) alors + leve_erreur IM41; + finalise_erreurs; + finsi + finsi + finsi +) + +cible make_2042_of_tgv: +application: iliad; +arguments: VAR; +variables_temporaires: SF; +si present(GLOBAL.VAR) alors + calculer cible is_code_situation_famille : avec SF, VAR; + si SF != SF_INVALIDE alors + GLOBAL.SF_INITIALE = SF; + finsi + si meme_variable(VAR, RJLJ) et GLOBAL.VAR != 0 alors + GLOBAL.CORR_RJLJ = 1; + finsi + D2042.VAR = GLOBAL.VAR; + GLOBAL.D2042_NB = GLOBAL.D2042_NB + 1; +finsi + +cible is_rappel_1728: +application: iliad; +arguments: RESULTAT, PENA, VAR; +variables_temporaires: EST_ISF; +calculer cible est_code_isf : avec EST_ISF, VAR; +si positif(EST_ISF) alors + RESULTAT = ( + PENA dans (7, 8, 9, 10, 11, 12, 17, 18, 31, 99) + ); +sinon + RESULTAT = ( + PENA dans (2, 3, 7, 8, 9, 10, 11, 12, 17, 18, 22, 31, 99) + ); +finsi + + +cible prepare_reference: +application: iliad; +variables_temporaires: + MAKE_2042, MONTANT, NATURE, LEVE_A989, EST_ISF, PENA, EST_RAPPEL_1728; +si non (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9XT)) alors + iterer + : variable VAR + : categorie saisie famille + : avec present(VAR) + : espace GLOBAL + : dans ( + SF_PRIMITIF = 1; + ) +finsi +GLOBAL.D2042_NB = 0; +si non (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) alors + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = ( + dans_domaine(VAR, saisie famille) + ou dans_domaine(VAR, saisie revenu) + ou dans_domaine(VAR, saisie revenu corrective) + ou dans_domaine(VAR, saisie variation) + ); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : avec present(VAR) + : espace D2042 + : dans ( + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + ) +sinon + iterer + : variable VAR + : categorie saisie * + : dans ( + D2042_ABAT.VAR = indefini; + D2042_RECT.VAR = indefini; + D2042_CTXT.VAR = indefini; + si dans_domaine(VAR, saisie contexte) alors + MAKE_2042 = (non meme_variable(VAR, IND_TRAIT)); + sinon + MAKE_2042 = (dans_domaine(VAR, saisie revenu)); + finsi + si positif(MAKE_2042) alors + calculer cible make_2042_of_tgv : avec VAR; + sinon + D2042.VAR = indefini; + finsi + ) + iterer + : variable VAR + : categorie saisie * + : espace D2042 + : dans ( + si present(VAR) alors + D2042_ABAT.VAR = VAR; + D2042_RECT.VAR = VAR; + D2042_CTXT.VAR = VAR; + MAJO_D2042_REF_ABAT.VAR = VAR; + sinon + MAJO_D2042_REF_ABAT.VAR = indefini; + finsi + ) + si positif(GLOBAL.PRESENT_9YT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(R, date) = GLOBAL.DATE_9YU; + finsi + si non (GLOBAL.MONTANT_9YT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9YT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + si positif(GLOBAL.PRESENT_9XT) alors + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, numero) <= GLOBAL.PREMIER_EVT alors + champ_evenement(R, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(R, date) = GLOBAL.DATE_9XU; + finsi + si non (GLOBAL.MONTANT_9XT dans (8, 11)) alors + GLOBAL.PREM_8_11 = 0; + CORR.PREM8_11 = 0; + finsi + si non (GLOBAL.MONTANT_9XT dans (7, 18)) alors + champ_evenement(R, 2042_rect) = 0; + finsi + ) + finsi + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si champ_evenement(R, id_evt) = 0 alors + si present(D2042.champ_evenement(R, code)) alors + MONTANT = D2042.champ_evenement(R, code) + champ_evenement(R, montant); + si + type(champ_evenement(R, code), BOOLEEN) + et non (MONTANT dans (0, 1)) + alors + MONTANT = D2042.champ_evenement(R, code); + finsi + sinon + MONTANT = champ_evenement(R, montant); + finsi + D2042.champ_evenement(R, code) = MONTANT; + D2042_RECT.champ_evenement(R, code) = MONTANT; + si positif(GLOBAL.RETARD) et champ_evenement(R, penalite) = 7 alors + D2042_ABAT.champ_evenement(R, code) = MONTANT; + MAJO_D2042_REF_ABAT.champ_evenement(R, code) = MONTANT; + finsi + calculer cible get_nature : avec NATURE, champ_evenement(R, code); + si NATURE = N_CHARGE alors + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, penalite) = 0; + finsi + finsi + ) +finsi +LEVE_A989 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si LEVE_A989 = 0 alors + calculer cible est_code_isf : avec EST_ISF, champ_evenement(R, code); + PENA = champ_evenement(R, penalite); + calculer cible is_rappel_1728 + : avec EST_RAPPEL_1728, PENA, champ_evenement(R, code); + si positif(EST_ISF) et positif(EST_RAPPEL_1728) alors + si + (positif(GLOBAL.ISF_PRIM) et GLOBAL.CODE_PENA_ISF = 1) + ou ((non positif(GLOBAL.ISF_PRIM)) et GLOBAL.CODE_PENA_ISF = 0) + alors + GLOBAL.CODE_PENA_ISF = champ_evenement(R, penalite); + finsi + si + non ( + champ_evenement(R, penalite) dans (1, 2, 3, 22, 99, GLOBAL.CODE_PENA_ISF) + ) + alors + LEVE_A989 = 1; + finsi + finsi + finsi +) +si positif(LEVE_A989) alors + nettoie_erreurs_finalisees; + leve_erreur A989; + calculer cible signaler_erreur_ano; +finsi + +cible calcul_aux: +application: iliad; +variables_temporaires: + HUIT, PENA_0DA, EST_TAX_INIT, VERIF_CODE, + QUELLE_SP, INDICE_EVT_CTRL, ANO_994_1, ANO_994_2, + IS_PREMIER, IS_DERNIER, EXISTE_SENS_RC; +GLOBAL.SAUVE_INR_R99 = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si GLOBAL.SAUVE_INR_R99 = 0 alors + si + champ_evenement(R, sens) = SENS_R + et champ_evenement(R, penalite) = 99 + alors + GLOBAL.SAUVE_INR_R99 = 1; + finsi + finsi +) +HUIT = 0; +PENA_0DA = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si meme_variable(champ_evenement(R, code), 9ZA) alors + GLOBAL.CODE_9ZA = (champ_evenement(R, montant) = 1); + finsi + HUIT = (positif(HUIT) ou champ_evenement(R, penalite) = 8); + si champ_evenement(R, penalite) = 18 alors + champ_evenement(R, penalite) = 7; + sinon_si champ_evenement(R, penalite) = 34 alors + si non positif(HUIT) alors + CORR.V_FLAGR34 = 1; + finsi + champ_evenement(R, penalite) = 8; + sinon_si champ_evenement(R, sens) = SENS_R et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 99; + sinon_si champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 1 alors + champ_evenement(R, penalite) = 0; + sinon_si champ_evenement(R, penalite) = 24 alors + CORR.V_FLAGANO726 = 1; + CORR.V_FLAGR24 = 1; + sinon_si champ_evenement(R, penalite) = 22 alors + CORR.V_FLAGR22 = 1; + finsi + si + meme_variable(champ_evenement(R, code), 0DA) + et champ_evenement(R, sens) = SENS_R + et (3 <= champ_evenement(R, penalite) et champ_evenement(R, penalite) <= 98) + alors + PENA_0DA = champ_evenement(R, penalite); + finsi + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + champ_evenement(R, sens) = SENS_M + et non ( + meme_variable(champ_evenement(R, code), 9GF) + ou meme_variable(champ_evenement(R, code), 9GH) + ou meme_variable(champ_evenement(R, code), 9NC) + ou meme_variable(champ_evenement(R, code), 9NG) + ou meme_variable(champ_evenement(R, code), 9GY) + ou meme_variable(champ_evenement(R, code), 9PR) + ou meme_variable(champ_evenement(R, code), 9RS) + ou meme_variable(champ_evenement(R, code), REGCO) + ou positif(EST_TAX_INIT) + ) + alors + CORR.V_FLAGMENC = 1; + GLOBAL.FLAGMENC = 1; + champ_evenement(R, sens) = SENS_C; + champ_evenement(R, penalite) = 0; + sinon_si + champ_evenement(R, sens) = SENS_C + et champ_evenement(R, penalite) = PENA_0DA + et non (champ_evenement(R, penalite) dans (2, 22)) + alors + champ_evenement(R, sens) = SENS_C; + calculer cible verif_code_prem_evt : avec VERIF_CODE, R; + si positif(VERIF_CODE) alors + champ_evenement(R, penalite) = 0; + finsi + finsi +) +calculer cible controle_defaut_retard_2042; +GLOBAL.PREM_8_11 = 1; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si positif(GLOBAL.PREM_8_11) alors + si + non ( + champ_evenement(R, id_evt) != 0 + ou champ_evenement(R, penalite) dans (8, 11) + ) + alors + GLOBAL.PREM_8_11 = 0; + finsi + finsi +) +GLOBAL.PREM_8_11 = ( + (GLOBAL.PREM_8_11 ou GLOBAL.MONTANT_9XT dans (8, 11)) + et (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) +); +CORR.PREM8_11 = GLOBAL.PREM_8_11; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible est_code_tax_init : avec EST_TAX_INIT, champ_evenement(R, code); + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ou positif(EST_TAX_INIT) + alors + GLOBAL.RECTIF = 0; + finsi + si + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) dans (1, 99) + alors + GLOBAL.RECTIF_MAJO = 1; + finsi + si + (positif(GLOBAL.DEFAUT) ou positif(GLOBAL.RETARD)) + et ( + (champ_evenement(R, sens) = SENS_C et champ_evenement(R, penalite) = 0) + ou champ_evenement(R, penalite) = 99 + ) + alors + champ_evenement(R, date) = champ_evenement(0, date); + finsi + si + champ_evenement(R, penalite) = 30 + et non meme_variable(champ_evenement(R, code), 8WW) + alors + nettoie_erreurs_finalisees; + leve_erreur A047; + calculer cible signaler_erreur_ano; + finsi +) +arranger_evenements +: trier R1, R2 +: avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (vers_annee(champ_evenement(R1, date)) < vers_annee(champ_evenement(R2, date))) alors (1) + sinon (si (vers_annee(champ_evenement(R1, date)) > vers_annee(champ_evenement(R2, date))) alors (0) + sinon (si (vers_mois(champ_evenement(R1, date)) < vers_mois(champ_evenement(R2, date))) alors (1) + sinon (si (vers_mois(champ_evenement(R1, date)) > vers_mois(champ_evenement(R2, date))) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi) finsi) finsi) finsi) finsi +: dans ( + calculer cible prepare_reference; + calculer cible prepare_tl; + calculer cible prepare_majo; + calculer cible prepare_inr; + QUELLE_SP = 0; + INDICE_EVT_CTRL = 0; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible denature_rappels; + ANO_994_1 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_1) alors + si + # penalites_1731bis + champ_evenement(R, penalite) dans (3, 4, 5, 6, 8, 11, 30, 31, 32, 35, 55) + alors + ANO_994_1 = 1; + finsi + finsi + ) + ANO_994_2 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(ANO_994_2) alors + si + champ_evenement(R, penalite) dans (2, 7, 10, 17, 18, 22) + alors + ANO_994_2 = 1; + finsi + finsi + ) + GLOBAL.PENA_994 = (positif(ANO_994_1) et positif(ANO_994_2)); + CORR.PENA994 = GLOBAL.PENA_994; + CORR.V_FLAGMENC = 0; + iterer + : variable INDICE_EVT + : entre 0..GLOBAL.MAX_ID_EVT increment 1 + : dans ( + IS_PREMIER = (INDICE_EVT = 0); + IS_DERNIER = (INDICE_EVT = GLOBAL.MAX_ID_EVT); + CORR.V_FLAGR22 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR22) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 22 + alors + CORR.V_FLAGR22 = 1; + finsi + finsi + ) + CORR.V_FLAGR24 = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(CORR.V_FLAGR24) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, penalite) = 24 + alors + CORR.V_FLAGR24 = 1; + finsi + finsi + ) + calculer cible traite_reference : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_tl : avec IS_PREMIER, INDICE_EVT; + calculer cible traite_inr : avec INDICE_EVT; + calculer cible traite_majo : avec IS_PREMIER, INDICE_EVT; + CORR.FLAGPREM = IS_PREMIER; + GLOBAL.FLAGPREM = IS_PREMIER; + si positif(IS_DERNIER) alors + CORR.FLAGDERNIE = IS_DERNIER; + GLOBAL.FLAGDERNIE = IS_DERNIER; + finsi + calculer cible init_1731; + EXISTE_SENS_RC = 0; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si non positif(EXISTE_SENS_RC) alors + si + champ_evenement(R, id_evt) = INDICE_EVT + et champ_evenement(R, sens) dans (SENS_R, SENS_C) + alors + EXISTE_SENS_RC = 1; + finsi + finsi + ) + si positif(EXISTE_SENS_RC) alors + CORR.ART1731BIS = 0; + GLOBAL.ART1731BIS = 0; + finsi + iterer + : variable VAR + : categorie calculee + : espace CORR + : dans ( + VAR = indefini; + ) + si positif(GLOBAL.FLAGMENC) alors + CORR.FLAGMENC = 1; + finsi + calculer cible calcul_tl : avec IS_PREMIER; + calculer cible calcul_inr : avec IS_PREMIER, INDICE_EVT; + si + positif(IS_DERNIER) + ou ( + positif(IS_PREMIER) + et non positif(GLOBAL.DEFAUT) + et positif(GLOBAL.RETARD) + ) + alors + calculer cible calcul_majo : avec IS_PREMIER, INDICE_EVT; + finsi + si + positif(IS_DERNIER) + et positif(GLOBAL.PRESENT_8VV) + et positif(GLOBAL.PRESENT_8VW) + et CORR.RE168 + 0 > 0 + et CORR.TAX1649 + 0 > 0 + alors + nettoie_erreurs_finalisees; + leve_erreur A043; + calculer cible signaler_erreur_ano; + finsi + si non positif(IS_DERNIER) alors + QUELLE_SP = 1; + INDICE_EVT_CTRL = INDICE_EVT + 1; + calculer cible controle : avec QUELLE_SP, INDICE_EVT_CTRL; + calculer cible sauve_base_anterieure_cor_corr; + si positif(IS_PREMIER) alors + calculer cible sauve_base_premier_corr; + finsi + finsi + CORR.V_FLAGR22 = 0; + CORR.V_FLAGR24 = 0; + ) +) + +cible nb_transf_2042_rappels: +application: iliad; +variables_temporaires: EST_ISF; +iterer +: variable VAR +: categorie saisie revenu, saisie revenu corrective, saisie variation, saisie penalite, calculee * +: avec present(VAR) +: espace CORR +: dans ( + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.NB_NOUVEAUX_RAPPELS = GLOBAL.NB_NOUVEAUX_RAPPELS + 1; + finsi + finsi +) + +cible prepare_rappels: +application: iliad; +variables_temporaires: FIN, MOIS, ANNEE; +GLOBAL.DATEINR = 0; +CORR.DATEINR = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YA) + et champ_evenement(R, numero) != champ_evenement(nb_evenements() - 1, numero) + alors + nettoie_erreurs_finalisees; + leve_erreur A99302; + calculer cible signaler_erreur_ano; + finsi + si + type(champ_evenement(R, code), BOOLEEN) + et non (champ_evenement(R, montant) dans (0, 1)) + alors + nettoie_erreurs_finalisees; + leve_erreur A910; + calculer cible signaler_erreur_ano; + finsi +) +calculer cible set_rappel_ifi_prim; +FIN = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(FIN) + et meme_variable(champ_evenement(R, code), REGCO) + alors + calculer cible transfo_pena_regco : avec R; + si present(GLOBAL.REGCO) alors + si GLOBAL.REGCO - champ_evenement(R, montant) < 0 alors + champ_evenement(R, sens) = SENS_R; + champ_evenement(R, montant) = champ_evenement(R, montant) - GLOBAL.REGCO; + sinon + champ_evenement(R, sens) = SENS_M; + champ_evenement(R, montant) = GLOBAL.REGCO - champ_evenement(R, montant); + finsi + FIN = 1; + finsi + finsi +) +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 8VV) alors + GLOBAL.PRESENT_8VV = 1; + sinon_si meme_variable(champ_evenement(R, code), 8VW) alors + GLOBAL.PRESENT_8VW = 1; + sinon_si meme_variable(champ_evenement(R, code), 9YT) alors + GLOBAL.PRESENT_9YT = 1; + si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9YT = 7; + sinon + GLOBAL.MONTANT_9YT = champ_evenement(R, montant); + finsi + GLOBAL.PENALITE_9YT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YT = champ_evenement(R, numero); + CORR.CMAJ2 = champ_evenement(R, montant); + GLOBAL.CMAJ2 = champ_evenement(R, montant); + si GLOBAL.MONTANT_9YT != 0 alors + GLOBAL.SENS_9YT = champ_evenement(R, sens); + GLOBAL.IND_20_9YT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9YT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9YU) alors + GLOBAL.PRESENT_9YU = 1; + GLOBAL.MONTANT_9YU = champ_evenement(R, montant); + GLOBAL.PENALITE_9YU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9YU = champ_evenement(R, numero); + GLOBAL.SENS_9YU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + CORR.DATEINR = ANNEE * 10000 + MOIS * 100 + 1; + GLOBAL.DATEINR = CORR.DATEINR; + CORR.MOISAN2 = champ_evenement(R, montant); + GLOBAL.MOISAN2 = champ_evenement(R, montant); + GLOBAL.DATE_9YU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9YT) ou positif(GLOBAL.PRESENT_9YU)) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +si non present(GLOBAL.CMAJ) alors + GLOBAL.PREMIER_EVT = champ_evenement(0, numero); + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + si meme_variable(champ_evenement(R, code), 9XT) alors + GLOBAL.PRESENT_9XT = 1; + si champ_evenement(R, montant) = 34 alors + GLOBAL.MONTANT_9XT = 8; + sinon_si champ_evenement(R, montant) = 18 alors + GLOBAL.MONTANT_9XT = 7; + sinon + GLOBAL.MONTANT_9XT = champ_evenement(R, montant); + finsi + si champ_evenement(R, montant) = 34 alors + CORR.V_FLAGR34 = 1; + finsi + GLOBAL.PENALITE_9XT = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XT = champ_evenement(R, numero); + si GLOBAL.MONTANT_9XT != 0 alors + GLOBAL.SENS_9XT = champ_evenement(R, sens); + GLOBAL.IND_20_9XT = champ_evenement(R, 2042_rect); + GLOBAL.BASE_TL_9XT = champ_evenement(R, base_tl); + GLOBAL.R_TARDIF = 1; + finsi + sinon_si meme_variable(champ_evenement(R, code), 9XU) alors + GLOBAL.PRESENT_9XU = 1; + GLOBAL.MONTANT_9XU = champ_evenement(R, montant); + GLOBAL.PENALITE_9XU = champ_evenement(R, penalite); + GLOBAL.NUM_EVT_9XU = champ_evenement(R, numero); + GLOBAL.SENS_9XU = champ_evenement(R, sens); + MOIS = vers_mois(champ_evenement(R, montant)); + ANNEE = vers_annee(champ_evenement(R, montant)); + GLOBAL.DATE_9XU = vers_date(MOIS, ANNEE); + finsi + ) +finsi +si + (positif(GLOBAL.PRESENT_9XT) ou positif(GLOBAL.PRESENT_9XU)) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + GLOBAL.R_TARDIF = 1; +finsi +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + meme_variable(champ_evenement(R, code), 9YT) + ou meme_variable(champ_evenement(R, code), 9YU) + ou meme_variable(champ_evenement(R, code), 9XT) + ou meme_variable(champ_evenement(R, code), 9XU) + alors + champ_evenement(R, numero) = -1; + sinon + si + positif(GLOBAL.PRESENT_9YT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9YT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + si + positif(GLOBAL.PRESENT_9XT) + et champ_evenement(R, numero) >= GLOBAL.NUM_EVT_9XT + alors + champ_evenement(R, numero) = champ_evenement(R, numero) + 1; + finsi + finsi +) +NB_RAPPELS = nb_evenements(); +NB_NOUVEAUX_RAPPELS = 0; +si + positif(GLOBAL.PRESENT_9YT) + et positif(GLOBAL.PRESENT_9YU) + et GLOBAL.MONTANT_9YT != 0 + et GLOBAL.MONTANT_9YU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi +si + positif(GLOBAL.PRESENT_9XT) + et positif(GLOBAL.PRESENT_9XU) + et GLOBAL.MONTANT_9XT != 0 + et GLOBAL.MONTANT_9XU != 0 +alors + calculer cible nb_transf_2042_rappels; +finsi + +cible set_id_evt: +application: iliad; +variables_temporaires: ID_EVT, NUM_EVT, NUM; +ID_EVT = 0; +GLOBAL.MAX_ID_EVT = 0; +NUM_EVT = champ_evenement(0, numero); +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + NUM = champ_evenement(R, numero); + si NUM != NUM_EVT alors + ID_EVT = ID_EVT + 1; + GLOBAL.MAX_ID_EVT = ID_EVT; + NUM_EVT = NUM; + finsi + champ_evenement(R, id_evt) = ID_EVT; +) + +cible test_9YT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9YT dans (0, 7, 8, 10, 11, 17, 18)) + et positif(CORR.APPLI_ILIAD + 0) + et ( + positif(CORR.CALCULIR + 0) + ou ( + (CORR.NOTRAIT + 0) dans (16, 23, 26, 33, 36, 43, 46, 53, 56) + ) + ) +); + +cible test_9XT: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + (GLOBAL.MONTANT_9XT dans (0, 7, 8, 10, 11, 17, 18, 34)) + et positif(CORR.APPLI_ILIAD + 0) + et (positif(CORR.CALCULIR + 0) ou CORR.NOTRAIT + 0 >= 16) +); + +cible test_mois_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = (CORR.NOTRAIT + 0 >= 16 et vers_mois(GLOBAL.DATE_9XU) <= 12); + +cible test_an_9XU: +application: iliad; +arguments: RESULTAT; +RESULTAT = ( + vers_annee(GLOBAL.DATE_9XU) = 0 + ou ( + vers_annee(GLOBAL.DATE_9XU) > GLOBAL.V_MILLESIME + et vers_annee(GLOBAL.DATE_9XU) < GLOBAL.V_MILLESIME + 7 + ) +); + +cible transf_2042_rappels: +application: iliad; +variables_temporaires: NUM_RAP, EST_ISF; +NUM_RAP = 0; +iterer +: variable VAR +: categorie * +: avec present(VAR) +: espace CORR +: dans ( + si dans_domaine(VAR, saisie famille) alors + GLOBAL.SF_PRIMITIF = 1; + sinon_si dans_domaine(VAR, saisie contexte) alors + GLOBAL.VAR = VAR; + sinon + calculer cible est_code_isf : avec EST_ISF, VAR; + si positif(EST_ISF) alors + si positif(GLOBAL.PRESENT_9XT) alors + GLOBAL.VAR = indefini; + GLOBAL.ISF_PRIM = 0; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9XT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9XT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9XU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9XT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9XT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + sinon + si positif(GLOBAL.PRESENT_9YT) alors + GLOBAL.VAR = indefini; + champ_evenement(NOUVEAU_RAPPEL, numero) = GLOBAL.PREMIER_EVT; + champ_evenement(NOUVEAU_RAPPEL, rappel) = NUM_RAP; + champ_evenement(NOUVEAU_RAPPEL, code) reference VAR; + champ_evenement(NOUVEAU_RAPPEL, montant) = VAR; + champ_evenement(NOUVEAU_RAPPEL, sens) = GLOBAL.SENS_9YT; + champ_evenement(NOUVEAU_RAPPEL, penalite) = GLOBAL.MONTANT_9YT; + champ_evenement(NOUVEAU_RAPPEL, date) = GLOBAL.DATE_9YU; + champ_evenement(NOUVEAU_RAPPEL, 2042_rect) = GLOBAL.IND_20_9YT; + champ_evenement(NOUVEAU_RAPPEL, base_tl) = GLOBAL.BASE_TL_9YT; + champ_evenement(NOUVEAU_RAPPEL, anc_penalite) = 0; + champ_evenement(NOUVEAU_RAPPEL, id_evt) = -1; + champ_evenement(NOUVEAU_RAPPEL, strate) = -1; + NUM_RAP = NUM_RAP + 1; + NOUVEAU_RAPPEL = NOUVEAU_RAPPEL + 1; + finsi + finsi + finsi +) + +cible prepare_rappels_puis_calcul: +application: iliad; +variables_temporaires: TEST_9YT, TEST_9XT, TEST_MOIS_9XU, TEST_AN_9XU; +arranger_evenements +: ajouter NB_NOUVEAUX_RAPPELS +: dans ( + iterer + : variable R + : entre NB_RAPPELS..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, numero) = -1; + ) + NOUVEAU_RAPPEL = NB_RAPPELS; + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + si GLOBAL.MONTANT_9YT != 0 et GLOBAL.MONTANT_9YU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + si GLOBAL.MONTANT_9XT != 0 et GLOBAL.MONTANT_9XU != 0 alors + calculer cible transf_2042_rappels; + sinon + calculer cible transf_rappels_prim; + finsi + finsi + + arranger_evenements + : trier R1, R2 : avec + si (champ_evenement(R1, numero) < champ_evenement(R2, numero)) alors (1) + sinon (si (champ_evenement(R1, numero) > champ_evenement(R2, numero)) alors (0) + sinon (si (champ_evenement(R1, rappel) < champ_evenement(R2, rappel)) alors (1) + sinon (si (champ_evenement(R1, rappel) > champ_evenement(R2, rappel)) alors (0) + sinon (1) finsi) finsi) finsi) finsi + : filtrer R : avec + champ_evenement(R, numero) >= 0 + : dans ( + calculer cible set_id_evt; + iterer + : variable R + : entre 0..(nb_evenements() - 1) increment 1 + : dans ( + champ_evenement(R, strate) = -1; + ) + si positif(GLOBAL.PRESENT_9YT) et positif(GLOBAL.PRESENT_9YU) alors + calculer cible test_9YT : avec TEST_9YT; + si non positif(TEST_9YT) alors + nettoie_erreurs_finalisees; + leve_erreur A96102; + calculer cible signaler_erreur_ano; + finsi + finsi + si positif(GLOBAL.PRESENT_9XT) et positif(GLOBAL.PRESENT_9XU) alors + calculer cible test_9XT : avec TEST_9XT; + si non positif(TEST_9XT) alors + nettoie_erreurs_finalisees; + leve_erreur A96103; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_mois_9XU : avec TEST_MOIS_9XU; + si non positif(TEST_MOIS_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96303; + calculer cible signaler_erreur_ano; + finsi + calculer cible test_an_9XU : avec TEST_AN_9XU; + si non positif(TEST_AN_9XU) alors + nettoie_erreurs_finalisees; + leve_erreur A96304; + calculer cible signaler_erreur_ano; + finsi + finsi + calculer cible calcul_aux; + ) +) + +cible range_rappel: +application: iliad; +arguments: R; +calculer cible reset_codes_rappel; +CORR.PEN_RAPPEL = champ_evenement(R, penalite); +calculer cible verif_cohe_horizontale_corr; +calculer cible reset_codes_rappel; +si nb_anomalies() + nb_discordances() + nb_informatives() > 0 alors + iterer + : variable VAR + : categorie * + : espace CORR + : dans ( + GLOBAL.VAR = VAR; + ) + stop application; +finsi + +cible calcul_avec_rappels: +application: iliad; +variables_temporaires: TROUVE_0AZ; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + calculer cible range_rappel : avec R; +) +TROUVE_0AZ = 0; +iterer +: variable R +: entre 0..(nb_evenements() - 1) increment 1 +: dans ( + si + non positif(TROUVE_0AZ) + et meme_variable(champ_evenement(R, code), 0AZ) + alors + GLOBAL.ANNEE_DECES_CONJOINT = champ_evenement(R, montant); + TROUVE_0AZ = 1; + finsi +) +calculer cible prepare_rappels; +calculer cible prepare_rappels_puis_calcul; + +cible calcul: +application: iliad; +calculer cible init_variables; +iterer +: variable VAR +: categorie * +: espace GLOBAL +: dans ( + CORR.VAR = VAR; +) +CORR.IND_TRAIT = 5; # correctif +si nb_evenements() = 0 alors + arranger_evenements + : ajouter 1 + : dans ( + champ_evenement(0, rappel) = 1; + champ_evenement(0, numero) = 1; + champ_evenement(0, code) reference V_MILLESIME; + champ_evenement(0, sens) = SENS_R; + champ_evenement(0, montant) = 0; + champ_evenement(0, penalite) = 1; + champ_evenement(0, base_tl) = 0; + champ_evenement(0, date) = vers_date(1, GLOBAL.V_MILLESIME + 1); + champ_evenement(0, 2042_rect) = 0; + champ_evenement(0, anc_penalite) = 0; + champ_evenement(0, id_evt) = -1; + champ_evenement(0, strate) = -1; + calculer cible calcul_avec_rappels; + ) +sinon + calculer cible calcul_avec_rappels; +finsi +exporte_erreurs; +iterer +: variable VAR +: categorie * +: espace CORR +: dans ( + GLOBAL.VAR = VAR; +) + +#{ tester l'existence des attributs dans les fonctions attribut(...), + meme_variable(...), dans_domaine(...) }# +#{ contrôler les espaces dans l'usage des références }# +#{ dans_espace(...), dans_tableau(...) }# +#{ tester si la variable d'itération existe déjà ailleurs }# +#{ compléter exec_verif avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ cas des tableaux statiques avec les fonctions sur les variables + (attribut(...), etc.) }# +#{ déplacer les expansions dans mir.ml }# + diff --git a/m_ext/2025/main.m b/m_ext/2025/main.m new file mode 100644 index 000000000..f75dbb6f3 --- /dev/null +++ b/m_ext/2025/main.m @@ -0,0 +1,25 @@ +# primitif iterpréteur + +cible enchaineur_primitif: +application: iliad; +GLOBAL.IND_TRAIT = 4; # primitif +GLOBAL.ANCSDED = ANREV + 1; +calculer cible enchaine_verification_prim; +si nb_anomalies() = 0 alors + calculer cible calcul_primitif_isf_prim; + calculer cible verif_calcul_primitive_isf_prim; + calculer cible enchaine_calcul_prim; +finsi +# finalise_erreurs; +# exporte_erreurs; + +cible enchaineur_correctif: +application: iliad; +calculer cible calcul; + +cible enchainement_primitif_interpreteur: +application: iliad; +V_IND_TRAIT = 4; # primitif +calculer cible enchainement_primitif; +exporte_erreurs; + diff --git a/makefiles/c_backend.mk b/makefiles/c_backend.mk index 33938ffff..e14bd388d 100644 --- a/makefiles/c_backend.mk +++ b/makefiles/c_backend.mk @@ -30,16 +30,6 @@ OCAMLFLAGS= #OCAMLFLAGS="-g -inline 0" # Pour instrumenter la couverture de code, il est nécessaire d'installer # le paquet OCaml bisect_ppx -# Utiliser l'indicateur WITH_BISECT=1 pour activer l'instrumentation nécessaire -# à l'analyse de la couverture de code lors des étapes de compilation. -WITH_BISECT?=0 -ifeq ($(WITH_BISECT), 1) - BISECT_PATH:=$(shell ocamlfind query bisect_ppx) - ifeq ($(BISECT_PATH),) - $(error $(BISECT_PATH) Pour instrumenter la couverture de code, il faut \ - installer le paquet OCaml bisect_ppx) - endif -endif ################################################## # Building the backend @@ -56,7 +46,7 @@ endif ifeq ($(call is_in,$(DGFIP_DIR)/calc),1) %.o: %.c - $(CC) $(BACKEND_CFLAGS) -c $< -o $@ + $(CC) $(BACKEND_CFLAGS) -I. -c $< -o $@ endif ifeq ($(call is_in,$(DGFIP_DIR)),1) @@ -105,8 +95,7 @@ endif # Build derivative file lists DRIVER_TARGETS:=$(foreach file,$(DRIVER_FILES),calc/$(file)) -DRIVER_TEMP:=$(DRIVER_FILES:.ml=.o) -DRIVER_OBJECT_FILES:=$(DRIVER_TEMP:.c=.o) +DRIVER_OBJECT_FILES:=$(DRIVER_C_FILES:.c=.o) # TODO: use &: when upgraded to GNU Make 4.3+ ifeq ($(call is_in,$(DGFIP_DIR)),1) @@ -120,18 +109,11 @@ endif ifeq ($(call is_in,$(DGFIP_DIR)),1) cal: $(DRIVER_TARGETS) @echo "Compilation de la calculette primitive:" - @echo " OCAMLFLAGS=$(OCAMLFLAGS)" - @echo " WITH_BISECT=$(WITH_BISECT)" - cd calc && rm -f $(DRIVER_OBJECT_FILES) -ifeq ($(WITH_BISECT), 1) - cd calc && ocamlopt -cc $(CC) -ccopt -std=c99 -ccopt -fno-common \ - -I $(BISECT_PATH)/common -I $(BISECT_PATH)/runtime \ - -ppx "$(BISECT_PATH)/ppx.exe --as-ppx" \ - unix.cmxa bisect_common.cmxa bisect.cmxa *.o $(DRIVER_FILES) -o cal -else - cd calc && ocamlopt -cc $(CC) $(OCAMLFLAGS) -ccopt -std=c99 -ccopt -fno-common \ - unix.cmxa *.o $(DRIVER_FILES) -o ../cal -endif + @for I in $(DRIVER_C_FILES:.c=.o) ; \ + do \ + $(MAKE_DGFIP_CALC) $$I || exit; \ + done + cd calc && $(CC) -lm *.o -o ../cal @echo "Compilation terminée" endif @@ -155,7 +137,7 @@ endif ifeq ($(call is_in,$(DGFIP_DIR)),1) backend_tests: compile_dgfip_c_backend - ./cal ${TEST_FILES} + ./cal -mode primitif -recursif ${TEST_FILES} endif ifeq ($(call is_in,$(DGFIP_DIR)),1) diff --git a/makefiles/functions.mk b/makefiles/functions.mk index 0000ec977..7f64e223b 100644 --- a/makefiles/functions.mk +++ b/makefiles/functions.mk @@ -56,6 +56,10 @@ define source_dir $(shell find $(1) -name tgvI.m) $(shell find $(1) -name errI.m) $(shell find $(1) -name \*.m ! -name err\*.m ! -name tgv\*.m | sort) endef +define source_dir_sans_cibles_m +$(shell find $(1) -name tgvI.m) $(shell find $(1) -name errI.m) $(shell find $(1) -name \*.m ! -name err\*.m ! -name tgv\*.m ! -name cibles.m | sort) +endef + define source_dir_ext $(shell find $(1) -name \*.m | sort) endef diff --git a/makefiles/mlang.mk b/makefiles/mlang.mk index 15659e899..26cd49d47 100644 --- a/makefiles/mlang.mk +++ b/makefiles/mlang.mk @@ -110,6 +110,15 @@ else OCAMLRUNPARAM=b $(MLANG_TEST) --run_test=$(TEST_FILE) $(SOURCE_FILES) $(SOURCE_EXT_FILES) endif +test_irj: FORCE build-dev + @for dir in $(IRJ_TESTS_DIRS); do \ + OCAMLRUNPARAM=b dune exec -- irj_checker $$dir -mhuman; \ + if [ $$? -ne 0 ]; \ + then \ + echo "Failed test $$dir"; \ + exit 1; \ + fi; \ + done; ################################################## # Doc diff --git a/makefiles/variables.mk b/makefiles/variables.mk index b47ce37ad..355fde3f1 100644 --- a/makefiles/variables.mk +++ b/makefiles/variables.mk @@ -15,21 +15,41 @@ MUSL_HOME?=/usr/local/musl MPP_FUNCTION_BACKEND?=enchainement_primitif MPP_FUNCTION?=enchainement_primitif_interpreteur -SOURCE_EXT_FILES?=$(call source_dir_ext,$(ROOT_DIR)/m_ext/$(YEAR)/) +SOURCE_EXT_DIR=$(ROOT_DIR)/m_ext/$(YEAR) # Add a TESTS_DIR for 2024 when available -ifeq ($(filter $(YEAR), 2024), $(YEAR)) - #$(warning WARNING: the source M files and fuzzer tests have not yet been published for year: $(YEAR). Should you choose to provide your own source files, you can create a directory ir-calcul/M_SVN/$(YEAR) and put them in there) - SOURCE_FILES?=$(call source_dir,$(ROOT_DIR)/ir-calcul/M_SVN/$(YEAR)/code_m/) +ifeq ($(filter $(YEAR), 2024 2025), $(YEAR)) + SOURCE_FILES?=$(call source_dir_sans_cibles_m,$(ROOT_DIR)/ir-calcul/M_SVN/$(YEAR)/code_m/) + SOURCE_EXT_FILES?=\ + $(SOURCE_EXT_DIR)/cibles.m \ + $(SOURCE_EXT_DIR)/codes_1731.m \ + $(SOURCE_EXT_DIR)/commence_par_5.m \ + $(SOURCE_EXT_DIR)/commence_par_7.m \ + $(SOURCE_EXT_DIR)/commence_par_H.m \ + $(SOURCE_EXT_DIR)/correctif.m \ + $(SOURCE_EXT_DIR)/main.m TESTS_DIR?=$(ROOT_DIR)/tests/$(YEAR)/fuzzing -else ifeq ($(filter $(YEAR), 2019 2020 2021 2022 2023), $(YEAR)) +else ifeq ($(filter $(YEAR), 2022 2023), $(YEAR)) + SOURCE_FILES?=$(call source_dir_sans_cibles_m,$(ROOT_DIR)/ir-calcul/sources$(YEAR)*/) + SOURCE_EXT_FILES?=\ + $(SOURCE_EXT_DIR)/cibles.m \ + $(SOURCE_EXT_DIR)/codes_1731.m \ + $(SOURCE_EXT_DIR)/commence_par_5.m \ + $(SOURCE_EXT_DIR)/commence_par_7.m \ + $(SOURCE_EXT_DIR)/commence_par_H.m \ + $(SOURCE_EXT_DIR)/correctif.m \ + $(SOURCE_EXT_DIR)/main.m + TESTS_DIR?=$(ROOT_DIR)/tests/$(YEAR)/fuzzing +else ifeq ($(filter $(YEAR), 2018 2019 2020 2021), $(YEAR)) SOURCE_FILES?=$(call source_dir,$(ROOT_DIR)/ir-calcul/sources$(YEAR)*/) + SOURCE_EXT_FILES?=$(call source_dir_ext,$(ROOT_DIR)/m_ext/$(YEAR)/) TESTS_DIR?=$(ROOT_DIR)/tests/$(YEAR)/fuzzing else ifeq ($(filter $(YEAR), 0), $(YEAR)) - SOURCE_FILES?=$(call source_dir,$(ROOT_DIR)/m_ext/$(YEAR)/src/) + SOURCE_FILES?=#$(call source_dir,$(ROOT_DIR)/m_ext/$(YEAR)/src/) + SOURCE_EXT_FILES?=$(call source_dir_ext,$(ROOT_DIR)/m_ext/$(YEAR)/) TESTS_DIR?=$(ROOT_DIR)/tests/$(YEAR) else - $(warning WARNING: there is no default configuration for year: $(YEAR)) - $(warning WARNING: example specification files and fuzzer tests are not included for year: $(YEAR)) + $(warning WARNING: there is no default configuration for year: $(YEAR)) + $(warning WARNING: example specification files and fuzzer tests are not included for year: $(YEAR)) endif ################################################## @@ -67,9 +87,11 @@ endif BACKEND_CFLAGS?=$(COMMON_CFLAGS) $(COMPILER_SPECIFIC_CFLAGS) # Directory of the driver sources for tax calculator -DRIVER_DIR?=ml_driver -# Driver sources for tax calculator (must be manually ordered for OCaml compiler) -DRIVER_FILES?=irdata.c stubs.c common.ml m.ml read_test.ml main.ml +DRIVER_DIR?=c_driver +# Driver sources for tax calculator +DRIVER_H_FILES?=aide.h chaine.h commun.h fichiers.h format.h ida.h irj.h liste.h mem.h options.h traitement.h utils.h +DRIVER_C_FILES?=aide.c chaine.c commun.c fichiers.c format.c ida.c irdata.c irj.c liste.c main.c mem.c options.c traitement.c utils.c +DRIVER_FILES?=$(DRIVER_H_FILES) $(DRIVER_C_FILES) # Flag to disable binary dump comparison NO_BINARY_COMPARE?=1 @@ -108,3 +130,5 @@ MAKE_DGFIP=$(MAKE) --no-print-directory -f $(ROOT_DIR)/Makefile -C $(ROOT_DIR)/$ MAKE_DGFIP_CALC=$(MAKE) --no-print-directory -f $(ROOT_DIR)/Makefile -C $(ROOT_DIR)/$(DGFIP_DIR)/calc ROOT_DIR="$(ROOT_DIR)" +IRJ_BIN=irj_checker +IRJ_TESTS_DIRS?=tests/2019 tests/2020 tests/2022 tests/2023 diff --git a/mlang-deps b/mlang-deps index 557442de6..03f6a0a59 160000 --- a/mlang-deps +++ b/mlang-deps @@ -1 +1 @@ -Subproject commit 557442de66a43143c1cb79e82fb9f3bce7cc5f4d +Subproject commit 03f6a0a59555a5311abd0e670010aecb142548c0 diff --git a/mlang.opam b/mlang.opam index af79511af..12afa4f76 100644 --- a/mlang.opam +++ b/mlang.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "1.1.0" +version: "186-15-ga4a1d1ff" synopsis: "Compiler for DGFiP's M language" description: """ The Direction Générale des Finances Publiques (DGFiP) diff --git a/src/dune b/src/dune index 07489c622..1a3906950 100644 --- a/src/dune +++ b/src/dune @@ -1,7 +1,7 @@ (env (dev (flags - (:standard -warn-error -a -g))) + (:standard -warn-error -a+8 -g))) ;; fail on warnings in CI mode (ci (flags diff --git a/src/irj_checker/backend_irj/pas_calc.ml b/src/irj_checker/backend_irj/pas_calc.ml index ecee5db80..b6c12512f 100644 --- a/src/irj_checker/backend_irj/pas_calc.ml +++ b/src/irj_checker/backend_irj/pas_calc.ml @@ -1,5 +1,5 @@ -open Mlang -open Mlang.Irj_ast +open Utils +open Irj_utils.Irj_ast type avis_type = Texte | Gavlir diff --git a/src/irj_checker/irj_checker.ml b/src/irj_checker/irj_checker.ml index 6d7cbc640..b6e4dc741 100644 --- a/src/irj_checker/irj_checker.ml +++ b/src/irj_checker/irj_checker.ml @@ -14,13 +14,15 @@ this program. If not, see . *) (** The Irj_checker Module is a simple entry point to use the Mlang IRJ file - parser in order to perform syntactic checks on test files or produce other IR - test formats. + parser in order to perform syntactic checks on test files or produce other + IR test formats. - Usage: irj_checker.exe [--message-format=VAL] [transformation-target]*) + Usage: irj_checker.exe [--message-format=VAL] + [transformation-target]*) open Cmdliner -open Mlang +open Irj_utils +open Utils type message_format_enum = Human | GNU @@ -36,14 +38,11 @@ let gen_file generator test_data = Format.pp_print_newline out_fmt (); Format.pp_print_flush out_fmt () -let irj_checker (f : string) (message_format : message_format_enum) +let irj_check_file (f : string) (message_format : message_format_enum) (validation_mode : validation_mode_enum) (transform_target : transformation_target) : unit = try - if not (Sys.file_exists f && not (Sys.is_directory f)) then - Errors.raise_error - (Format.asprintf "%s: this path is not a valid file in the filesystem" f); - let test_data = Mlang.Irj_file.parse_file f in + let test_data = Irj_file.parse_file f in let test_data = match validation_mode with | Primitive -> @@ -70,12 +69,33 @@ let irj_checker (f : string) (message_format : message_format_enum) | PasCalcC -> gen_file Pas_calc.gen_pas_calc_json_correctif test_data with Errors.StructuredError (msg, pos, kont) -> (match message_format with - | Human -> Cli.error_print "%a" Errors.format_structured_error + | Human -> + Cli.error_print "There has been an error in %S: %a" f + Errors.format_structured_error | GNU -> Format.eprintf "%a" Errors.format_structured_error_gnu_format) (msg, pos); (match kont with None -> () | Some kont -> kont ()); exit 123 +let rec irj_checker (f : string) (message_format : message_format_enum) + (validation_mode : validation_mode_enum) + (transform_target : transformation_target) : unit = + if not (Sys.file_exists f) then ( + Cli.error_print "%s: this path is not a valid file in the filesystem" f; + exit 124); + if Sys.is_directory f then + Array.iter + (fun sub -> + irj_checker (Filename.concat f sub) message_format validation_mode + transform_target) + (Sys.readdir f) + else irj_check_file f message_format validation_mode transform_target + +let irj_checker (f : string) (message_format : message_format_enum) + (validation_mode : validation_mode_enum) + (transform_target : transformation_target) : unit = + irj_checker f message_format validation_mode transform_target + let validation_mode_opt = [ ("strict", Strict); ("corrective", Corrective); ("primitive", Primitive) ] diff --git a/src/mlang/backend_compilers/bir_to_dgfip_c.ml b/src/mlang/backend_compilers/bir_to_dgfip_c.ml index ba411932a..ee9aed24e 100644 --- a/src/mlang/backend_compilers/bir_to_dgfip_c.ml +++ b/src/mlang/backend_compilers/bir_to_dgfip_c.ml @@ -17,6 +17,92 @@ module D = DecoupledExpr module VID = Dgfip_varid +type scope = + | Id of string (* The identifier of a given scope *) + | Sanitize of (unit -> unit) +(* Some code blocks require to be properly cleaned before being stopped. + For example, when a stop happens in a restoration inside an iteration, + we must properly sanitize the restoration before jumping to the + end of the loop. *) + +(* An environment to keep track of local ids' scopes through the + compilation. Local labels are used to specify the locations targetted by + gotos generated by the 'stop;' instructions. *) +type env = { + scopes : scope list; + (* Each M iterator will be given a specific id, which will be used as a + C local label. The head of the list corresponds to the id of the + current scope, while its tail contails the scopes the current one + belong to. *) + quit_label : string; + (* The label name used for quitting completely the current target. *) +} + +(* Returns an empty initial environment. *) +let empty_env ~name = + { scopes = []; quit_label = Format.sprintf "label_%s" name } + +let label_id_of_var_name vname = Format.sprintf "label_%s" vname + +let label_id_of_var (v : Com.Var.t) = label_id_of_var_name (Pos.unmark v.name) + +(* Given an iterator variable, returns a unique scope identifier. + Simply uses the variable name given we can't have nested iterators with + the same variable name. This scope identifier also is the M identifier + that can be used to reference nested scopes. *) +(* let scope_of_var (v : Com.Var.t) : string = Pos.unmark v.name *) + +(* Creates a fresh scope label from an iterator variable and adds it to + the environment. *) +let fresh_scope = + let cpt = ref 0 in + fun ~(var : Com.Var.t) env -> + let id = Format.sprintf "%s_%i" (label_id_of_var var) !cpt in + incr cpt; + (id, { env with scopes = Id id :: env.scopes }) + +let get_current_label env = + List.find_map (function Id i -> Some i | _ -> None) env.scopes + +(* Given a scope identifier, returns its C label name. *) +let get_label_from ~scope_id env = + List.find_map + (function + | Id i when Strings.starts_with ~prefix:(label_id_of_var_name scope_id) i + -> + Some i + | _ -> None) + env.scopes + +(* Adds a sanitizer to the stack of scopes. *) +let add_sanitizer ~f env = { env with scopes = Sanitize f :: env.scopes } + +(* Sanitize the current scope, i.e. calls all the sanitizers stored + in the scope stack. If an id is given [up_to], sanitize up to + the given scope. *) +let sanitize ~up_to env = + let stop_at_id = + match up_to with + | `Bottom -> fun _ -> false + | `NextId -> fun _ -> true + | `Id i -> + let prefix = label_id_of_var_name i in + fun i' -> Strings.starts_with ~prefix i' + in + let rec loop = function + | [] -> ( + match up_to with + | `Bottom -> () + | `NextId -> failwith "Sanitizing outside scope" + | `Id u -> + Format.ksprintf failwith "Sanitizing outside scope up to %s" u) + | Sanitize f :: tl -> + f (); + loop tl + | Id i :: tl -> if not (stop_at_id i) then loop tl + in + loop env.scopes + let str_escape str = let l = String.length str in let buf = Buffer.create l in @@ -504,21 +590,130 @@ and generate_c_expr (p : Mir.program) (e : Mir.expression Pos.marked) : let def_test = D.dinstr res_def in let value_comp = D.dinstr res_val in D.build_transitive_composition { set_vars; def_test; value_comp }) - | IsVariable (m_acc, m_name) -> ( + | Type (m_acc, m_typ) -> + let d_irdata = D.ddirect (D.dinstr "irdata") in + let set_vars0, evt_d_fun0 = + match Pos.unmark m_acc with + | Com.VarAccess (_, v) -> + ([], D.ddirect @@ D.dinstr @@ VID.gen_info_ptr v) + | Com.TabAccess (_, v, m_i) -> + let ei = generate_c_expr p m_i in + let d_fun = + D.dfun "lis_tabaccess_varinfo" + [ + d_irdata; + D.ddirect @@ D.dinstr @@ Pp.spr "%d" (Com.Var.loc_tab_idx v); + ei.def_test; + ei.value_comp; + ] + in + (ei.set_vars, D.ddirect @@ d_fun) + | Com.FieldAccess (_, ie, f, _) -> + let e = generate_c_expr p ie in + let fn = Pp.spr "event_field_%s_var" (Pos.unmark f) in + let d_fun = D.dfun fn [ d_irdata; e.def_test; e.value_comp ] in + (e.set_vars, D.ddirect d_fun) + in + let c_type = + match Pos.unmark m_typ with + | Boolean -> "TYPE_BOOLEEN" + | DateYear -> "TYPE_DATE_AAAA" + | DateDayMonthYear -> "TYPE_DATE_JJMMAAAA" + | DateMonth -> "TYPE_DATE_MM" + | Integer -> "TYPE_ENTIER" + | Real -> "TYPE_REEL" + in + let res = fresh_c_local "res" in + let res_def = Pp.spr "%s_def" res in + let res_val = Pp.spr "%s_val" res in + let res_def_ptr = Pp.spr "&%s" res_def in + let res_val_ptr = Pp.spr "&%s" res_val in + let d_fun = + D.dfun "est_type" + [ + evt_d_fun0; + D.ddirect @@ D.dinstr c_type; + D.ddirect @@ D.dinstr res_def_ptr; + D.ddirect @@ D.dinstr res_val_ptr; + ] + in + let set_vars = + set_vars0 + @ [ + (D.Def, res_def, d_fun); + (D.Val, res_val, D.ddirect (D.dinstr res_val)); + ] + in + let def_test = D.dinstr res_def in + let value_comp = D.dinstr res_val in + D.build_transitive_composition { set_vars; def_test; value_comp } + | SameVariable (m_acc0, m_acc1) -> + let d_irdata = D.ddirect (D.dinstr "irdata") in + let code_access m_acc = + match Pos.unmark m_acc with + | Com.VarAccess (_, v) -> + ([], D.ddirect @@ D.dinstr @@ VID.gen_info_ptr v) + | Com.TabAccess (_, v, m_i) -> + let ei = generate_c_expr p m_i in + let d_fun = + D.dfun "lis_tabaccess_varinfo" + [ + d_irdata; + D.ddirect @@ D.dinstr @@ Pp.spr "%d" (Com.Var.loc_tab_idx v); + ei.def_test; + ei.value_comp; + ] + in + (ei.set_vars, D.ddirect @@ d_fun) + | Com.FieldAccess (_, ie, f, _) -> + let e = generate_c_expr p ie in + let fn = Pp.spr "event_field_%s_var" (Pos.unmark f) in + let d_fun = D.dfun fn [ d_irdata; e.def_test; e.value_comp ] in + (e.set_vars, D.ddirect d_fun) + in + let set_vars0, evt_d_fun0 = code_access m_acc0 in + let set_vars1, evt_d_fun1 = code_access m_acc1 in + let res = fresh_c_local "res" in + let res_def = Pp.spr "%s_def" res in + let res_val = Pp.spr "%s_val" res in + let res_def_ptr = Pp.spr "&%s" res_def in + let res_val_ptr = Pp.spr "&%s" res_val in + let d_fun = + D.dfun "meme_variable" + [ + evt_d_fun0; + evt_d_fun1; + D.ddirect @@ D.dinstr res_def_ptr; + D.ddirect @@ D.dinstr res_val_ptr; + ] + in + let set_vars = + set_vars0 @ set_vars1 + @ [ + (D.Def, res_def, d_fun); + (D.Val, res_val, D.ddirect (D.dinstr res_val)); + ] + in + let def_test = D.dinstr res_def in + let value_comp = D.dinstr res_val in + D.build_transitive_composition { set_vars; def_test; value_comp } + | InDomain (m_acc, cvm) -> ( + assert (Com.CatVar.Map.cardinal cvm = 1); + let cv = fst @@ Com.CatVar.Map.min_binding cvm in + let id_cv = (Com.CatVar.Map.find cv p.program_var_categories).id_int in match Pos.unmark m_acc with | VarAccess (_, v) -> let ptr = VID.gen_info_ptr v in - let nameCmp = Pos.unmark m_name in let res = fresh_c_local "res" in let res_def = Pp.spr "%s_def" res in let res_val = Pp.spr "%s_val" res in let res_def_ptr = Pp.spr "&%s" res_def in let res_val_ptr = Pp.spr "&%s" res_val in let d_fun = - D.dfun "est_variable" + D.dfun "dans_domaine" [ D.ddirect @@ D.dinstr ptr; - D.ddirect @@ D.dinstr @@ Pp.spr "\"%s\"" nameCmp; + D.ddirect @@ D.dinstr @@ Pp.spr "%d" id_cv; D.ddirect @@ D.dinstr res_def_ptr; D.ddirect @@ D.dinstr res_val_ptr; ] @@ -534,7 +729,6 @@ and generate_c_expr (p : Mir.program) (e : Mir.expression Pos.marked) : D.build_transitive_composition { set_vars; def_test; value_comp } | TabAccess (_, v, m_i) -> let d_irdata = D.ddirect (D.dinstr "irdata") in - let nameCmp = Pos.unmark m_name in let res = fresh_c_local "res" in let res_def = Pp.spr "%s_def" res in let res_val = Pp.spr "%s_val" res in @@ -543,13 +737,13 @@ and generate_c_expr (p : Mir.program) (e : Mir.expression Pos.marked) : let set_vars, d_fun = let ei = generate_c_expr p m_i in let d_fun = - D.dfun "est_variable_tabaccess" + D.dfun "dans_domaine_tabaccess" [ d_irdata; D.ddirect @@ D.dinstr @@ Pp.spr "%d" (Com.Var.loc_tab_idx v); ei.def_test; ei.value_comp; - D.ddirect @@ D.dinstr @@ Pp.spr "\"%s\"" nameCmp; + D.ddirect @@ D.dinstr @@ Pp.spr "%d" id_cv; D.ddirect @@ D.dinstr res_def_ptr; D.ddirect @@ D.dinstr res_val_ptr; ] @@ -573,17 +767,16 @@ and generate_c_expr (p : Mir.program) (e : Mir.expression Pos.marked) : let evt_fn = Pp.spr "event_field_%s_var" (Pos.unmark f) in (e.set_vars, D.dfun evt_fn [ d_irdata; e.def_test; e.value_comp ]) in - let nameCmp = Pos.unmark m_name in let res = fresh_c_local "res" in let res_def = Pp.spr "%s_def" res in let res_val = Pp.spr "%s_val" res in let res_def_ptr = Pp.spr "&%s" res_def in let res_val_ptr = Pp.spr "&%s" res_val in let d_fun = - D.dfun "est_variable" + D.dfun "dans_domaine" [ D.ddirect evt_d_fun; - D.ddirect @@ D.dinstr @@ Pp.spr "\"%s\"" nameCmp; + D.ddirect @@ D.dinstr @@ Pp.spr "%d" id_cv; D.ddirect @@ D.dinstr res_def_ptr; D.ddirect @@ D.dinstr res_val_ptr; ] @@ -743,8 +936,8 @@ let generate_event_field_ref (p : Mir.program) pr "@]@;}"; pr "@]@;}") -let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) - (oc : Format.formatter) (stmt : Mir.m_instruction) = +let rec generate_stmt (env : env) (dgfip_flags : Dgfip_options.flags) + (p : Mir.program) (oc : Format.formatter) (stmt : Mir.m_instruction) = let pr fmt = Format.fprintf oc fmt in match Pos.unmark stmt with | Affectation (Pos.Mark (SingleFormula (VarDecl (m_acc, expr)), _)) -> ( @@ -768,12 +961,69 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@;char %s;@;double %s;" cond_def cond_val; generate_expr_with_res_in p dgfip_flags oc cond_def cond_val cond_expr; pr "@;@[if (%s && %s != 0.0) {" cond_def cond_val; - pr "%a" (generate_stmts dgfip_flags p) iftrue; + pr "%a" (generate_stmts env dgfip_flags p) iftrue; if iffalse <> [] then ( pr "@]@;@[} else if (%s) {" cond_def; - pr "%a" (generate_stmts dgfip_flags p) iffalse); + pr "%a" (generate_stmts env dgfip_flags p) iffalse); pr "@]@;}"; pr "@]@;}" + | Switch (e, l) -> + pr "@;@[{"; + (* Undef & Default should be unique, but just in case we take them all *) + let undef_branches, default_branches, other_branches = + List.fold_left + (fun acc (cl, l) -> + List.fold_left + (fun (und, def, oth) c -> + match c with + | Com.Default -> (und, l :: def, oth) + | Com.(Value Undefined) -> (l :: und, def, oth) + | Com.(Value (Float f)) -> (und, def, (f, l) :: oth)) + acc cl) + ([], [], []) l + in + let undef_branches = List.rev undef_branches + and default_branches = List.rev default_branches + and other_branches = List.rev other_branches in + let exp = fresh_c_local "exp" in + let exp_def = exp ^ "_def" in + let exp_val = exp ^ "_val" in + pr "@;char %s;@;double %s;" exp_def exp_val; + generate_expr_with_res_in p dgfip_flags oc exp_def exp_val e; + pr "@;@[if (%s) {" exp_def; + pr "@;"; + (* Expression is defined *) + let () = + match other_branches with + | [] -> () + | (v, br) :: tl -> + pr "if (EQ_E((%s),(%#.19g))) {@;@[%a@]@;}" exp_val v + (generate_stmts env dgfip_flags p) + br; + List.iter + (fun (v, br) -> + pr "@; else if (EQ_E((%s),(%#.19g))) {@;@[%a@]@;}" exp_val + v + (generate_stmts env dgfip_flags p) + br) + tl + in + let () = + match (default_branches, other_branches) with + | [], _ -> () + | hd :: _, [] -> + pr "@;@[%a@]" (generate_stmts env dgfip_flags p) hd + | hd :: _, _ -> + pr "@;else {@[%a@]@;}" (generate_stmts env dgfip_flags p) hd + in + pr "@;}"; + (* Expression is undefined *) + let () = + match undef_branches with + | [] -> () + | hd :: _ -> pr " else %a" (generate_stmts env dgfip_flags p) hd + in + pr "@]@;}@]" | WhenDoElse (wdl, ed) -> let goto_label = fresh_c_local "when_do_block" in let fin_label = fresh_c_local "when_do_end" in @@ -787,7 +1037,7 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) generate_expr_with_res_in p dgfip_flags oc cond_def cond_val expr; pr "@;@[if(%s) {" cond_def; pr "@;if (! %s) goto %s;" cond_val goto_label; - pr "%a" (generate_stmts dgfip_flags p) dl; + pr "%a" (generate_stmts env dgfip_flags p) dl; pr "@]@;}"; aux l | [] -> () @@ -795,14 +1045,14 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) aux wdl; pr "@;goto %s;" fin_label; pr "@;%s:" goto_label; - pr "%a" (generate_stmts dgfip_flags p) (Pos.unmark ed); + pr "%a" (generate_stmts env dgfip_flags p) (Pos.unmark ed); pr "@;%s:{}" fin_label; pr "@]@;}" | VerifBlock stmts -> let goto_label = fresh_c_local "verif_block" in pr "@;@[{"; pr "@;if (setjmp(irdata->jmp_bloq) != 0) goto %s;" goto_label; - pr "%a" (generate_stmts dgfip_flags p) stmts; + pr "%a" (generate_stmts env dgfip_flags p) stmts; pr "%s:;" goto_label; pr "@]@;}" | Print (std, args) -> @@ -976,6 +1226,10 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) (match m_sp_opt with | None -> () | Some _ -> pr "@;irdata->var_space = var_space_sav;"); + pr "@;if (irdata->abandon) {@;@["; + sanitize ~up_to:`Bottom env; + pr "@;goto %s;" env.quit_label; + pr "@]@;}@;"; pr "@]@;}@;" | Iterate (var, al, var_params, stmts) -> let it_name = fresh_c_local "iterate" in @@ -984,6 +1238,9 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) let ref_space = VID.gen_ref_var_space_ptr var in let ref_def = VID.gen_def_ptr None var in let ref_val = VID.gen_val_ptr None var in + let scope, env = fresh_scope ~var env in + (* !!! *) + pr "@;@[{"; pr "@;%s = \"%s\";" ref_name (Com.Var.name_str var); List.iter (fun m_a -> @@ -994,7 +1251,7 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@;%s = %s;" ref_space (VID.gen_var_space_id m_sp_opt v); pr "@;%s = %s;" ref_def (VID.gen_def_ptr m_sp_opt v); pr "@;%s = %s;" ref_val (VID.gen_val_ptr m_sp_opt v); - pr "%a" (generate_stmts dgfip_flags p) stmts; + pr "%a" (generate_stmts env dgfip_flags p) stmts; pr "@]@;}" | Com.TabAccess (m_sp_opt, var, vidx) -> pr "@;@[{"; @@ -1016,7 +1273,7 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) ref_info; pr "@;%s = lis_varinfo_val_ptr(irdata, %s, %s);" ref_val space_ptr ref_info; - pr "%a" (generate_stmts dgfip_flags p) stmts; + pr "%a" (generate_stmts env dgfip_flags p) stmts; pr "@]@;}"; pr "@]@;}" | Com.FieldAccess (m_sp_opt, e, Pos.Mark (f, _), _) -> @@ -1035,7 +1292,7 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) ref_info; pr "@;%s = lis_varinfo_val_ptr(irdata, %s, %s);" ref_val space_ptr ref_info; - pr "%a" (generate_stmts dgfip_flags p) stmts; + pr "%a" (generate_stmts env dgfip_flags p) stmts; pr "@]@;}"; pr "@]@;}") al; @@ -1065,7 +1322,7 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) ref_tab ref_info; generate_expr_with_res_in p dgfip_flags oc cond_def cond_val expr; pr "@;@[if (%s && %s != 0.0) {" cond_def cond_val; - pr "%a" (generate_stmts dgfip_flags p) stmts; + pr "%a" (generate_stmts env dgfip_flags p) stmts; pr "@]@;}"; pr "@]@;}"; pr "@;tab_%s++;" it_name; @@ -1073,22 +1330,27 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@]@;}"; pr "@]@;}") vcs) - var_params + var_params; + pr "@;@]%s: ;} /* End of scope %s */" scope scope | Iterate_values (var, var_intervals, stmts) -> let itval_def = VID.gen_def None var in (* !!! *) let itval_val = VID.gen_val None var in (* !!! *) let postfix = fresh_c_local "" in + let i_val = Format.sprintf "i_val%s" postfix in let e0_def = Format.sprintf "e0_def%s" postfix in let e0_val = Format.sprintf "e0_val%s" postfix in let e1_def = Format.sprintf "e1_def%s" postfix in let e1_val = Format.sprintf "e1_val%s" postfix in let step_def = Format.sprintf "step_def%s" postfix in let step_val = Format.sprintf "step_val%s" postfix in + let id, env = fresh_scope ~var env in + pr "@;@[{"; List.iter (fun (e0, e1, step) -> pr "@;@[{"; + pr "@;double %s;" i_val; pr "@;char %s;@;double %s;" e0_def e0_val; pr "@;char %s;@;double %s;" e1_def e1_val; pr "@;char %s;@;double %s;" step_def step_val; @@ -1099,15 +1361,17 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) step_val; pr "@;\ - @[@[for (%s = 1,@ %s = %s;@ (%s > 0.0 ? %s <= %s : %s \ - >= %s);@ %s = %s + %s) {@]" - itval_def itval_val e0_val step_val itval_val e1_val itval_val - e1_val itval_val itval_val step_val; - pr "%a" (generate_stmts dgfip_flags p) stmts; + @[@[for (%s = %s;@ (%s > 0.0 ? %s <= %s : %s >= %s);@ \ + %s = %s + %s) {@]" + i_val e0_val step_val i_val e1_val i_val e1_val i_val i_val step_val; + pr "@;%s = 1;" itval_def; + pr "@;%s = %s;" itval_val i_val; + pr "%a" (generate_stmts env dgfip_flags p) stmts; pr "@]@;}"; pr "@]@;}"; pr "@]@;}") - var_intervals + var_intervals; + pr "@;@]%s:;} /* End of scope %s */" id id | ArrangeEvents (sort, filter, add, stmts) -> let events_sav = fresh_c_local "events_sav" in let events_tmp = fresh_c_local "events_tmp" in @@ -1116,6 +1380,12 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) let cpt_i = fresh_c_local "i" in let cpt_j = fresh_c_local "j" in let evt = fresh_c_local "evt" in + let pp_sanitize () = + pr "@;free(irdata->events);"; + pr "@;irdata->events = %s;" events_sav; + pr "@;irdata->nb_events = %s;" nb_events_sav + in + let env = add_sanitizer ~f:pp_sanitize env in pr "@;@[{"; pr "@;T_event **%s = irdata->events;" events_sav; pr "@;int %s = irdata->nb_events;" nb_events_sav; @@ -1259,15 +1529,18 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@;free(b);"; pr "@]@;}" | None -> ()); - pr "%a" (generate_stmts dgfip_flags p) stmts; - pr "@;free(irdata->events);"; - pr "@;irdata->events = %s;" events_sav; - pr "@;irdata->nb_events = %s;" nb_events_sav; + pr "%a" (generate_stmts env dgfip_flags p) stmts; + pp_sanitize (); pr "@]@;}" | Restore (al, var_params, evts, evtfs, stmts) -> pr "@;@[{"; let rest_name = fresh_c_local "restore" in let rest_evt_name = fresh_c_local "restore_evt" in + let pp_sanitize () = + pr "@;env_restaurer(&%s);@;" rest_name; + pr "@;env_restaurer_evt(&%s);@;" rest_evt_name + in + let env = add_sanitizer ~f:pp_sanitize env in pr "@;T_env_sauvegarde *%s = NULL;" rest_name; pr "@;T_env_sauvegarde_evt *%s = NULL;" rest_evt_name; List.iter @@ -1331,8 +1604,8 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) let ref_tab = VID.gen_tab vcd.loc in let ref_name = VID.gen_ref_name_ptr var in let ref_info = VID.gen_info_ptr var in - let ref_def = VID.gen_def_ptr m_sp_opt var in - let ref_val = VID.gen_val_ptr m_sp_opt var in + let ref_def = VID.gen_def_ptr None var in + let ref_val = VID.gen_val_ptr None var in let cond = fresh_c_local "cond" in let cond_def = cond ^ "_def" in let cond_val = cond ^ "_val" in @@ -1401,9 +1674,8 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@]@;}"; pr "@]@;}") evtfs; - pr "%a" (generate_stmts dgfip_flags p) stmts; - pr "@;env_restaurer(&%s);@;" rest_name; - pr "@;env_restaurer_evt(&%s);@;" rest_evt_name; + pr "%a" (generate_stmts env dgfip_flags p) stmts; + pp_sanitize (); pr "@]@;}" | RaiseError (m_err, var_opt) -> let err = Pos.unmark m_err in @@ -1415,13 +1687,38 @@ let rec generate_stmt (dgfip_flags : Dgfip_options.flags) (p : Mir.program) in pr "@;add_erreur(irdata, &erreur_%s, %s);" err_name code | CleanErrors -> Format.fprintf oc "@;nettoie_erreur(irdata);" + | CleanFinalizedErrors -> + Format.fprintf oc "@;nettoie_erreurs_finalisees(irdata);" | ExportErrors -> Format.fprintf oc "@;exporte_erreur(irdata);" | FinalizeErrors -> Format.fprintf oc "@;finalise_erreur(irdata);" + | Stop (SKId None) -> ( + match get_current_label env with + | None -> Format.ksprintf failwith "Stop instruction with no scope" + | Some lbl -> + sanitize ~up_to:`NextId env; + Format.fprintf oc "@;goto %s;" lbl) + | Stop (SKId (Some id)) -> ( + match get_label_from ~scope_id:id env with + | None -> Format.ksprintf failwith "Stop %s instruction with no scope" id + | Some lbl -> + sanitize ~up_to:(`Id id) env; + Format.fprintf oc "@;goto %s;" lbl) + | Stop SKApplication -> + sanitize ~up_to:`Bottom env; + pr "@;irdata->abandon = 1;"; + pr "@;goto %s;" env.quit_label + | Stop SKTarget | Stop SKFun -> pr "@;goto %s;" env.quit_label | ComputeDomain _ | ComputeChaining _ | ComputeVerifs _ -> assert false -and generate_stmts (dgfip_flags : Dgfip_options.flags) (p : Mir.program) - (oc : Format.formatter) (stmts : Mir.m_instruction list) = - List.iter (generate_stmt dgfip_flags p oc) stmts +and generate_stmts (env : env) (dgfip_flags : Dgfip_options.flags) + (p : Mir.program) (oc : Format.formatter) (stmts : Mir.m_instruction list) = + List.iter (generate_stmt env dgfip_flags p oc) stmts + +(* Non recursive wrapper for generate_stmts, adds the quit_label. *) +let generate_stmts (env : env) (dgfip_flags : Dgfip_options.flags) + (p : Mir.program) (oc : Format.formatter) (stmts : Mir.m_instruction list) = + generate_stmts env dgfip_flags p oc stmts; + Format.fprintf oc "@;%s: ;" env.quit_label let generate_function_tmp_decls (oc : Format.formatter) (tf : Mir.target) = let pr fmt = Format.fprintf oc fmt in @@ -1483,6 +1780,7 @@ let generate_function_prototype (add_semicolon : bool) (oc : Format.formatter) let generate_function (dgfip_flags : Dgfip_options.flags) (p : Mir.program) (oc : Format.formatter) (fn : string) = + let env = empty_env ~name:fn in let pr fmt = Format.fprintf oc fmt in let fd = StrMap.find fn p.program_functions in pr "@.@[%a {" (generate_function_prototype false) fd; @@ -1497,7 +1795,7 @@ let generate_function (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@;irdata->nb_refs_target = %d;" fd.target_nb_refs; pr "@;"; if dgfip_flags.flg_trace then pr "@;aff1(\"debut %s\\n\");" fn; - pr "%a" (generate_stmts dgfip_flags p) fd.target_prog; + pr "%a" (generate_stmts env dgfip_flags p) fd.target_prog; if dgfip_flags.flg_trace then pr "@;aff1(\"fin %s\\n\");" fn; pr "@;"; @@ -1552,6 +1850,7 @@ let generate_cible_tmp_decls (oc : Format.formatter) (tf : Mir.target) = let generate_target (dgfip_flags : Dgfip_options.flags) (p : Mir.program) (oc : Format.formatter) (f : string) = + let env = empty_env ~name:f in let pr fmt = Format.fprintf oc fmt in let tf = StrMap.find f p.program_targets in pr "@.@[%a {" (generate_target_prototype false) f; @@ -1566,7 +1865,7 @@ let generate_target (dgfip_flags : Dgfip_options.flags) (p : Mir.program) pr "@;irdata->nb_refs_target = %d;" tf.target_nb_refs; pr "@;"; if dgfip_flags.flg_trace then pr "@;aff1(\"debut %s\\n\");" f; - pr "%a" (generate_stmts dgfip_flags p) tf.target_prog; + pr "%a" (generate_stmts env dgfip_flags p) tf.target_prog; if dgfip_flags.flg_trace then pr "@;aff1(\"fin %s\\n\");" f; pr "@;"; if tf.target_nb_refs > 0 then diff --git a/src/mlang/backend_compilers/decoupledExpr.mli b/src/mlang/backend_compilers/decoupledExpr.mli index 166ffcd26..1ba26a603 100644 --- a/src/mlang/backend_compilers/decoupledExpr.mli +++ b/src/mlang/backend_compilers/decoupledExpr.mli @@ -39,7 +39,9 @@ val new_local : unit -> local_var would turn into - {[ mult (lit 0.5) (plus (local_var x) (local_var y)) ]} + {[ + mult (lit 0.5) (plus (local_var x) (local_var y)) + ]} where [x] and [y] are previously defined {!local_var}s *) @@ -116,7 +118,8 @@ val ite : constr -> constr -> constr -> constr (** {2 Decoupled expressions} *) (** While {!constr} is the expression language for decoupled values, the - following represents complete and optimized expressions for M computations *) + following represents complete and optimized expressions for M computations +*) type expression_composition = { set_vars : (dflag * string * constr) list; @@ -139,7 +142,8 @@ type t (** Decoupled expression type. Closed representation of a computation. *) val is_always_true : t -> bool -(** Tells if the expression [t] reprensents a value statically different to zero *) +(** Tells if the expression [t] reprensents a value statically different to zero +*) type local_decls (** Representation of local variables existing in an expression *) diff --git a/src/mlang/backend_compilers/dgfip_compir_files.ml b/src/mlang/backend_compilers/dgfip_compir_files.ml index 0967de8bf..d47ba2d90 100644 --- a/src/mlang/backend_compilers/dgfip_compir_files.ml +++ b/src/mlang/backend_compilers/dgfip_compir_files.ml @@ -15,7 +15,7 @@ this program. If not, see . *) let open_file filename = - let folder = Filename.dirname !Cli.output_file in + let folder = Filename.dirname !Config.output_file in let oc = open_out (Filename.concat folder filename) in let fmt = Format.formatter_of_out_channel oc in (oc, fmt) diff --git a/src/mlang/backend_compilers/dgfip_gen_files.ml b/src/mlang/backend_compilers/dgfip_gen_files.ml index 77a616149..140f40194 100644 --- a/src/mlang/backend_compilers/dgfip_gen_files.ml +++ b/src/mlang/backend_compilers/dgfip_gen_files.ml @@ -15,7 +15,7 @@ this program. If not, see . *) let open_file filename = - let folder = Filename.dirname !Cli.output_file in + let folder = Filename.dirname !Config.output_file in let oc = open_out (Filename.concat folder filename) in let fmt = Format.formatter_of_out_channel oc in (oc, fmt) @@ -124,6 +124,13 @@ let gen_table_varinfos (cprog : Mir.program) flags = #include "mlang.h" |}; + Pp.fpr fmt "char *espaces_variables[NB_ESPACES_VARIABLES + 1] = {@\n"; + IntMap.iter + (fun _ (vsd : Com.variable_space) -> + let sp = Pos.unmark vsd.vs_name in + Pp.fpr fmt " \"%s\",@\n" sp) + cprog.program_var_spaces_idx; + Pp.fpr fmt " NULL@\n};@\n@\n"; let attrs = Com.CatVar.Map.fold (fun _ Com.CatVar.{ attributs; _ } res -> @@ -270,7 +277,7 @@ typedef struct S_varinfo_map { attrs let is_valid_app apps = - StrMap.exists (fun app _ -> List.mem app !Cli.application_names) apps + StrMap.exists (fun app _ -> List.mem app !Config.application_names) apps let gen_erreurs_c fmt flags (cprog : Mir.program) = Pp.fpr fmt {|/****** LICENCE CECIL *****/ @@ -347,7 +354,7 @@ let gen_conf_h fmt (cprog : Mir.program) flags = FLG_TRACE_IRDATA\n"; *) if flags.flg_debug then Pp.fpr fmt "#define FLG_DEBUG\n"; Pp.fpr fmt "#define NB_DEBUG_C %d\n" flags.nb_debug_c; - Pp.fpr fmt "#define EPSILON %f\n" !Cli.comparison_error_margin; + Pp.fpr fmt "#define EPSILON %f\n" !Config.comparison_error_margin; let count loc = StrMap.fold (fun _ var nb -> @@ -366,8 +373,8 @@ let gen_conf_h fmt (cprog : Mir.program) flags = let gen_dbg fmt = Pp.fpr fmt {|int change_couleur(int couleur, int typographie); -int get_couleur(); -int get_typo(); +int get_couleur(void); +int get_typo(void); #ifdef FLG_TRACE extern int niv_trace; @@ -474,6 +481,7 @@ typedef struct S_ref_var T_ref_var; (IntMap.cardinal cprog.program_var_spaces_idx); Pp.fpr fmt "#define ESPACE_PAR_DEFAUT %d@\n@\n" cprog.program_var_space_def.vs_id; + Pp.fpr fmt "extern char *espaces_variables[];@\n@\n"; Pp.fpr fmt {| struct S_irdata { @@ -524,6 +532,7 @@ struct S_irdata { int nb_events; T_print_context ctx_pr_out; T_print_context ctx_pr_err; + char abandon; }; typedef struct S_irdata T_irdata; @@ -587,13 +596,17 @@ extern int size_varinfo(T_varinfo *info, char *res_def, double *res_val); #define TYPE_REEL 6 extern void add_erreur(T_irdata *irdata, T_erreur *erreur, char *code); -extern void free_erreur(); +#ifdef ANCIEN +extern void free_erreur(void); +#else +extern void free_erreur(T_irdata *irdata); +#endif /* ANCIEN */ #define fabs(a) (((a) < 0.0) ? -(a) : (a)) #define min(a,b) (((a) <= (b)) ? (a) : (b)) #define max(a,b) (((a) >= (b)) ? (a) : (b)) |}; - Pp.fpr fmt "#define EPSILON %f" !Cli.comparison_error_margin; + Pp.fpr fmt "#define EPSILON %f" !Config.comparison_error_margin; Pp.fpr fmt {| #define GT_E(a,b) ((a) > (b) + EPSILON) @@ -719,18 +732,19 @@ extern int nb_anomalies(T_irdata *irdata); extern int nb_bloquantes(T_irdata *irdata); extern void nettoie_erreur _PROTS((T_irdata *irdata )); extern void finalise_erreur _PROTS((T_irdata *irdata )); +extern void nettoie_erreurs_finalisees _PROTS((T_irdata *irdata )); extern void exporte_erreur _PROTS((T_irdata *irdata )); extern T_irdata *cree_irdata(void); -extern void init_saisie(T_irdata *irdata); -extern void init_calculee(T_irdata *irdata); -extern void init_base(T_irdata *irdata); +extern void init_saisie(T_irdata *irdata, int sp); +extern void init_calculee(T_irdata *irdata, int sp); +extern void init_base(T_irdata *irdata, int sp); extern void init_erreur(T_irdata *irdata); extern void detruis_irdata(T_irdata *irdata); extern void set_max_bloquantes(T_irdata *irdata, const int max_ano); -extern void recopie_saisie(T_irdata *irdata_src, T_irdata *irdata_dst); -extern void recopie_calculee(T_irdata *irdata_src, T_irdata *irdata_dst); -extern void recopie_base(T_irdata *irdata_src, T_irdata *irdata_dst); +extern void recopie_saisie(T_irdata *irdata_src, int sp_src, T_irdata *irdata_dst, int sp_dst); +extern void recopie_calculee(T_irdata *irdata_src, int sp_src, T_irdata *irdata_dst, int sp_dst); +extern void recopie_base(T_irdata *irdata_src, int sp_src, T_irdata *irdata_dst, int sp_dst); extern void ecris_saisie(T_irdata *irdata, int idx, char def, double val); extern void ecris_calculee(T_irdata *irdata, int idx, char def, double val); extern void ecris_base(T_irdata *irdata, int idx, char def, double val); @@ -757,6 +771,7 @@ extern char *lis_erreur_nom(T_erreur *err); extern int lis_erreur_type(T_erreur *err); extern int nb_evenements(T_irdata *irdata); +extern T_varinfo *cherche_varinfo_statique(const char *nom); extern T_varinfo *cherche_varinfo(T_irdata *irdata, const char *nom); extern char lis_varinfo( @@ -817,16 +832,22 @@ extern void pr_var(T_print_context *pr_ctx, T_irdata *irdata, int var_space, cha extern void pr_out_var(T_irdata *irdata, int var_space, char *nom); extern void pr_err_var(T_irdata *irdata, int var_space, char *nom); -extern char est_variable( - T_varinfo *info, char *nomCmp, char *res_def, double *res_val +extern char meme_variable( + T_varinfo *info0, T_varinfo *info1, char *res_def, double *res_val +); + +extern char dans_domaine( + T_varinfo *info, int id_cv, char *res_def, double *res_val ); -extern char est_variable_tabaccess( +extern char dans_domaine_tabaccess( T_irdata *irdata, int idx_tab, char idx_def, double idx_val, - char *nomCmp, char *res_def, double *res_val + int id_cv, char *res_def, double *res_val ); +extern char est_type(T_varinfo *info, int type, char *res_def, double *res_val); + |} let gen_decl_functions fmt (cprog : Mir.program) = @@ -900,11 +921,11 @@ int change_couleur (int couleur,int typographie) { return 0; } -int get_couleur () { +int get_couleur (void) { return color ; } -int get_typo () { +int get_typo (void) { return typo ; } @@ -1028,7 +1049,7 @@ void free_keep_discord(T_irdata *irdata) { /* Libération de la mémoire allouée par la fonction add_erreur */ #ifdef ANCIEN -void free_erreur() {} +void free_erreur(void) {} #else void free_erreur(T_irdata *irdata) { init_erreur(irdata); @@ -1286,9 +1307,11 @@ static void init_tab(char *p_def, double *p_val, int nb) { memset(p_def, 0, nb); } -void init_saisie(T_irdata *irdata) { +void init_saisie(T_irdata *irdata, int sp) { if (irdata == NULL) return; - init_tab(irdata->def_saisie, irdata->saisie, TAILLE_SAISIE); + if (sp < 0 || NB_ESPACES_VARIABLES <= sp) sp = ESPACE_PAR_DEFAUT; + if (irdata->var_spaces[sp].saisie == NULL) return; + init_tab(irdata->var_spaces[sp].def_saisie, irdata->var_spaces[sp].saisie, TAILLE_SAISIE); } void init_saisie_espace(char *def, double *val) { @@ -1296,9 +1319,11 @@ void init_saisie_espace(char *def, double *val) { init_tab(def, val, TAILLE_SAISIE); } -void init_calculee(T_irdata *irdata) { +void init_calculee(T_irdata *irdata, int sp) { if (irdata == NULL) return; - init_tab(irdata->def_calculee, irdata->calculee, TAILLE_CALCULEE); + if (sp < 0 || NB_ESPACES_VARIABLES <= sp) sp = ESPACE_PAR_DEFAUT; + if (irdata->var_spaces[sp].calculee == NULL) return; + init_tab(irdata->var_spaces[sp].def_calculee, irdata->var_spaces[sp].calculee, TAILLE_CALCULEE); } void init_calculee_espace(char *def, double *val) { @@ -1306,9 +1331,11 @@ void init_calculee_espace(char *def, double *val) { init_tab(def, val, TAILLE_CALCULEE); } -void init_base(T_irdata *irdata) { +void init_base(T_irdata *irdata, int sp) { if (irdata == NULL) return; - init_tab(irdata->def_base, irdata->base, TAILLE_BASE); + if (sp < 0 || NB_ESPACES_VARIABLES <= sp) sp = ESPACE_PAR_DEFAUT; + if (irdata->var_spaces[sp].base == NULL) return; + init_tab(irdata->var_spaces[sp].def_base, irdata->var_spaces[sp].base, TAILLE_BASE); } void init_base_espace(char *def, double *val) { @@ -1485,6 +1512,7 @@ T_irdata *cree_irdata(void) { irdata->ctx_pr_err.std = stderr; irdata->ctx_pr_err.indent = 0; irdata->ctx_pr_err.is_newline = 1; + irdata->abandon = 0; return irdata; erreur_cree_irdata: @@ -1501,22 +1529,61 @@ void set_max_bloquantes(T_irdata *irdata, const int max_ano) { } } -void recopie_saisie(T_irdata *irdata_src, T_irdata *irdata_dst) { +void recopie_saisie(T_irdata *irdata_src, int sp_src, T_irdata *irdata_dst, int sp_dst) { if (irdata_src == NULL || irdata_dst == NULL) return; - memcpy(irdata_dst->saisie, irdata_src->saisie, TAILLE_SAISIE * sizeof(double)); - memcpy(irdata_dst->def_saisie, irdata_src->def_saisie, TAILLE_SAISIE); -} - -void recopie_calculee(T_irdata *irdata_src, T_irdata *irdata_dst) { + if (0 < sp_src || sp_src <= NB_ESPACES_VARIABLES) sp_src = ESPACE_PAR_DEFAUT; + if (0 < sp_dst || sp_dst <= NB_ESPACES_VARIABLES) sp_dst = ESPACE_PAR_DEFAUT; + if (irdata_src->var_spaces[sp_src].saisie == NULL || irdata_dst->var_spaces[sp_dst].saisie == NULL) { + return; + } + memcpy( + irdata_dst->var_spaces[sp_dst].saisie, + irdata_src->var_spaces[sp_src].saisie, + TAILLE_SAISIE * sizeof(double) + ); + memcpy( + irdata_dst->var_spaces[sp_dst].def_saisie, + irdata_src->var_spaces[sp_src].def_saisie, + TAILLE_SAISIE + ); +} + +void recopie_calculee(T_irdata *irdata_src, int sp_src, T_irdata *irdata_dst, int sp_dst) { if (irdata_src == NULL || irdata_dst == NULL) return; - memcpy(irdata_dst->calculee, irdata_src->calculee, TAILLE_CALCULEE * sizeof(double)); - memcpy(irdata_dst->def_calculee, irdata_src->def_calculee, TAILLE_CALCULEE); -} - -void recopie_base(T_irdata *irdata_src, T_irdata *irdata_dst) { + if (0 < sp_src || sp_src <= NB_ESPACES_VARIABLES) sp_src = ESPACE_PAR_DEFAUT; + if (0 < sp_dst || sp_dst <= NB_ESPACES_VARIABLES) sp_dst = ESPACE_PAR_DEFAUT; + if (irdata_src->var_spaces[sp_src].calculee == NULL || irdata_dst->var_spaces[sp_dst].calculee == NULL) { + return; + } + memcpy( + irdata_dst->var_spaces[sp_dst].calculee, + irdata_src->var_spaces[sp_src].calculee, + TAILLE_CALCULEE * sizeof(double) + ); + memcpy( + irdata_dst->var_spaces[sp_dst].def_calculee, + irdata_src->var_spaces[sp_src].def_calculee, + TAILLE_CALCULEE + ); +} + +void recopie_base(T_irdata *irdata_src, int sp_src, T_irdata *irdata_dst, int sp_dst) { if (irdata_src == NULL || irdata_dst == NULL) return; - memcpy(irdata_dst->base, irdata_src->base, TAILLE_BASE * sizeof(double)); - memcpy(irdata_dst->def_base, irdata_src->def_base, TAILLE_BASE); + if (0 < sp_src || sp_src <= NB_ESPACES_VARIABLES) sp_src = ESPACE_PAR_DEFAUT; + if (0 < sp_dst || sp_dst <= NB_ESPACES_VARIABLES) sp_dst = ESPACE_PAR_DEFAUT; + if (irdata_src->var_spaces[sp_src].base == NULL || irdata_dst->var_spaces[sp_dst].base == NULL) { + return; + } + memcpy( + irdata_dst->var_spaces[sp_dst].base, + irdata_src->var_spaces[sp_src].base, + TAILLE_BASE * sizeof(double) + ); + memcpy( + irdata_dst->var_spaces[sp_dst].def_base, + irdata_src->var_spaces[sp_src].def_base, + TAILLE_BASE + ); } static void ecris_tab(char *t_def, double *t_val, int t_nb, int idx, char def, double val) { @@ -1671,6 +1738,30 @@ int nb_evenements(T_irdata *irdata) { return irdata->nb_events; } +T_varinfo *cherche_varinfo_statique(const char *nom) { + T_varinfo_map *map = NULL; + int res = -1; + int inf = 0; + int sup = NB_variable + NB_saisie; + int millieu = 0; + + if (nom == NULL) return NULL; + while ((res != 0) && (inf < sup)) { + millieu = (inf + sup) / 2; + map = &(varinfo[millieu]); + res = strcmp(nom, map->name); + if (res < 0) { + sup = millieu; + } else if (res > 0) { + inf = millieu + 1; + } + } + if (res == 0) { + return map->info; + } + return NULL; +} + T_varinfo *cherche_varinfo(T_irdata *irdata, const char *nom) { T_varinfo_map *map = NULL; int res = -1; @@ -2047,15 +2138,21 @@ void pr_err_var(T_irdata *irdata, int var_space, char *nom) { pr_var(&(irdata->ctx_pr_err), irdata, var_space, nom); } -char est_variable(T_varinfo *info, char *nomCmp, char *res_def, double *res_val) { +char meme_variable(T_varinfo *info0, T_varinfo *info1, char *res_def, double *res_val) { *res_def = 1; - if (info == NULL || nomCmp == NULL) { + if (info0 == NULL || info1 == NULL) { *res_val = 0.0; return *res_def; } if ( - strcmp(info->name, nomCmp) == 0 - || (info->alias != NULL && strcmp(info->alias, nomCmp) == 0) + strcmp(info0->name, info1->name) == 0 + || ( + info0->alias != NULL + && info1->alias != NULL + && strcmp(info0->alias, "") != 0 + && strcmp(info1->alias, "") != 0 + && strcmp(info0->alias, info1->alias) == 0 + ) ) { *res_val = 1.0; return *res_def; @@ -2064,15 +2161,42 @@ char est_variable(T_varinfo *info, char *nomCmp, char *res_def, double *res_val) return *res_def; } -char est_variable_tabaccess( +char dans_domaine(T_varinfo *info, int id_cv, char *res_def, double *res_val) { + *res_def = 1; + if (info == NULL) { + *res_val = 0.0; + return *res_def; + } + if (id_cv == info->cat) { + *res_val = 1.0; + return *res_def; + } + *res_val = 0.0; + return *res_def; +} + +char dans_domaine_tabaccess( T_irdata *irdata, int idx_tab, char idx_def, double idx_val, - char *nomCmp, char *res_def, double *res_val + int id_cv, char *res_def, double *res_val ) { T_varinfo *info = lis_tabaccess_varinfo(irdata, idx_tab, idx_def, idx_val); - return est_variable(info, nomCmp, res_def, res_val); + return dans_domaine(info, id_cv, res_def, res_val); +} + +char est_type(T_varinfo *info, int type, char *res_def, double *res_val) { + *res_def = 1; + *res_val = 0.0; + if (info == NULL || info->type == SANS_TYPE) return *res_def; + if (info->type == type) { + *res_val = 1.0; + } else { + *res_val = 0.0; + } + return *res_def; } + #ifdef FLG_TRACE /* int niv_trace = 3; */ diff --git a/src/mlang/backend_compilers/dgfip_varid.ml b/src/mlang/backend_compilers/dgfip_varid.ml index 6169c906a..48ca81ce1 100644 --- a/src/mlang/backend_compilers/dgfip_varid.ml +++ b/src/mlang/backend_compilers/dgfip_varid.ml @@ -65,15 +65,25 @@ let gen_tmp_info_ptr (l : Com.loc_tmp) vn = (* reference accessors *) -let gen_ref_def_ptr i vn = Printf.sprintf "DR_((%d)/*%s*/)" i vn +let gen_ref_def_ptr m_sp_opt i vn = + match m_sp_opt with + | None -> Printf.sprintf "DR_((%d)/*%s*/)" i vn + | Some (_, i_sp) -> + let info = Printf.sprintf "irdata->refs[irdata->refs_org + %d].info" i in + Printf.sprintf "lis_varinfo_def_ptr(irdata, %d, %s)" i_sp info -let gen_ref_val_ptr i vn = Printf.sprintf "R_((%d)/*%s*/)" i vn +let gen_ref_val_ptr m_sp_opt i vn = + match m_sp_opt with + | None -> Printf.sprintf "R_((%d)/*%s*/)" i vn + | Some (_, i_sp) -> + let info = Printf.sprintf "irdata->refs[irdata->refs_org + %d].info" i in + Printf.sprintf "lis_varinfo_val_ptr(irdata, %d, %s)" i_sp info let gen_ref_info_ptr i vn = Printf.sprintf "IR_((%d)/*%s*/)" i vn -let gen_ref_def i vn = Pp.spr "*(%s)" (gen_ref_def_ptr i vn) +let gen_ref_def m_sp_opt i vn = Pp.spr "*(%s)" (gen_ref_def_ptr m_sp_opt i vn) -let gen_ref_val i vn = Pp.spr "*(%s)" (gen_ref_val_ptr i vn) +let gen_ref_val m_sp_opt i vn = Pp.spr "*(%s)" (gen_ref_val_ptr m_sp_opt i vn) (* generic accessors *) @@ -82,14 +92,14 @@ let gen_def (m_sp_opt : Com.var_space) (v : Com.Var.t) = match v.loc with | LocTgv (_, l) -> gen_tgv_def m_sp_opt l vn | LocTmp (_, l) -> gen_tmp_def l vn - | LocRef (_, i) -> gen_ref_def i vn + | LocRef (_, i) -> gen_ref_def m_sp_opt i vn let gen_val (m_sp_opt : Com.var_space) (v : Com.Var.t) = let vn = Pos.unmark v.name in match v.loc with | LocTgv (_, l) -> gen_tgv_val m_sp_opt l vn | LocTmp (_, l) -> gen_tmp_val l vn - | LocRef (_, i) -> gen_ref_val i vn + | LocRef (_, i) -> gen_ref_val m_sp_opt i vn let gen_info_ptr (v : Com.Var.t) = let vn = Pos.unmark v.name in @@ -103,14 +113,14 @@ let gen_def_ptr (m_sp_opt : Com.var_space) (v : Com.Var.t) = match v.loc with | LocTgv (_, l) -> gen_tgv_def_ptr m_sp_opt l vn | LocTmp (_, l) -> gen_tmp_def_ptr l vn - | LocRef (_, i) -> gen_ref_def_ptr i vn + | LocRef (_, i) -> gen_ref_def_ptr m_sp_opt i vn let gen_val_ptr (m_sp_opt : Com.var_space) (v : Com.Var.t) = let vn = Pos.unmark v.name in match v.loc with | LocTgv (_, l) -> gen_tgv_val_ptr m_sp_opt l vn | LocTmp (_, l) -> gen_tmp_val_ptr l vn - | LocRef (_, i) -> gen_ref_val_ptr i vn + | LocRef (_, i) -> gen_ref_val_ptr m_sp_opt i vn let gen_ref_name_ptr (v : Com.Var.t) = let vn = Pos.unmark v.name in @@ -153,4 +163,7 @@ let gen_var_space_id_opt = function let gen_var_space_id (m_sp_opt : Com.var_space) (v : Com.Var.t) = match v.loc with | LocTgv _ | LocTmp _ -> gen_var_space_id_opt m_sp_opt - | LocRef (_, i) -> Pp.spr "(irdata->refs[irdata->refs_org + %d].var_space)" i + | LocRef (_, i) -> ( + match m_sp_opt with + | None -> Pp.spr "(irdata->refs[irdata->refs_org + %d].var_space)" i + | Some (_, i_sp) -> Pp.spr "%d" i_sp) diff --git a/src/mlang/backend_compilers/dune b/src/mlang/backend_compilers/dune new file mode 100644 index 000000000..6868f596b --- /dev/null +++ b/src/mlang/backend_compilers/dune @@ -0,0 +1,6 @@ +(library + (name backend_compilers) + (public_name mlang.backend_compilers) + (flags + (:standard -open Utils -open M_ir -open M_frontend)) + (libraries m_frontend m_ir utils menhirLib parmap)) diff --git a/src/mlang/driver.ml b/src/mlang/driver.ml index 39eeda92f..dccc47c20 100644 --- a/src/mlang/driver.ml +++ b/src/mlang/driver.ml @@ -14,36 +14,19 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *) +open Backend_compilers +open Irj_utils open Lexing +open M_ir +open M_frontend open Mlexer exception Exit -let process_dgfip_options (backend : Cli.backend) - ~(application_names : string list) (dgfip_options : string list option) = - match backend with - | Dgfip_c -> begin - match dgfip_options with - | None -> - Cli.error_print - "when using the DGFiP backend, DGFiP options MUST be provided"; - raise Exit - | Some options -> begin - match - Dgfip_options.process_dgfip_options ~application_names options - with - | None -> - Cli.error_print "parsing of DGFiP options failed, aborting"; - raise Exit - | Some flags -> flags - end - end - | UnknownBackend -> Dgfip_options.default_flags - (* The legacy compiler plays a nasty trick on us, that we have to reproduce: rule 1 is modified to add assignments to APPLI_XXX variables according to the target application (OCEANS, BATCH and ILIAD). *) -let patch_rule_1 (backend : Cli.backend) (dgfip_flags : Dgfip_options.flags) +let patch_rule_1 (backend : Config.backend) (dgfip_flags : Dgfip_options.flags) (program : Mast.program) : Mast.program = let open Mast in let var_exists name = @@ -116,7 +99,7 @@ let parse () = in let parse_m_dgfip m_program = - if !Cli.without_dgfip_m then m_program + if !Config.without_dgfip_m then m_program else let parse_internal str = let filebuf = Lexing.from_string str in @@ -135,126 +118,44 @@ let parse () = in (*FIXME: use a fold here *) let prog = - List.map parse_file_progress @@ Cli.get_files !Cli.source_files + List.map parse_file_progress @@ Config.get_files !Config.source_files in List.rev prog @ m_program in let m_program = [] |> parse_m_dgfip |> parse_m_files |> List.rev - |> patch_rule_1 !Cli.backend !Cli.dgfip_flags + |> patch_rule_1 !Config.backend !Config.dgfip_flags in finish "completed!"; m_program -(** Entry function for the executable. Returns a negative number in case of - error. *) - -let set_opts (files : string list) (application_names : string list) - (without_dgfip_m : bool) (debug : bool) (var_info_debug : string list) - (display_time : bool) (dep_graph_file : string) (print_cycles : bool) - (backend : string option) (output : string option) - (run_tests : string option) (dgfip_test_filter : bool) - (run_test : string option) (mpp_function : string) - (optimize_unsafe_float : bool) (precision : string option) - (roundops : string option) (comparison_error_margin : float option) - (income_year : int option) (m_clean_calls : bool) - (dgfip_options : string list option) = - let value_sort = - let precision = Option.get precision in - if precision = "double" then Cli.RegularFloat - else - let mpfr_regex = Re.Pcre.regexp "^mpfr(\\d+)$" in - if Re.Pcre.pmatch ~rex:mpfr_regex precision then - let mpfr_prec = - Re.Pcre.get_substring (Re.Pcre.exec ~rex:mpfr_regex precision) 1 - in - Cli.MPFR (int_of_string mpfr_prec) - else if precision = "interval" then Cli.Interval - else - let bigint_regex = Re.Pcre.regexp "^fixed(\\d+)$" in - if Re.Pcre.pmatch ~rex:bigint_regex precision then - let fixpoint_prec = - Re.Pcre.get_substring (Re.Pcre.exec ~rex:bigint_regex precision) 1 - in - Cli.BigInt (int_of_string fixpoint_prec) - else if precision = "mpq" then Cli.Rational - else - Errors.raise_error - (Format.asprintf "Unkown precision option: %s" precision) - in - let round_ops = - match roundops with - | Some "default" -> Cli.RODefault - | Some "multi" -> Cli.ROMulti - | Some roundops -> - let mf_regex = Re.Pcre.regexp "^mainframe(\\d+)$" in - if Re.Pcre.pmatch ~rex:mf_regex roundops then - let mf_long_size = - Re.Pcre.get_substring (Re.Pcre.exec ~rex:mf_regex roundops) 1 - in - match int_of_string mf_long_size with - | (32 | 64) as sz -> Cli.ROMainframe sz - | _ -> - Errors.raise_error - (Format.asprintf "Invalid long size for mainframe: %s" - mf_long_size) - else - Errors.raise_error - (Format.asprintf "Unknown roundops option: %s" roundops) - | None -> Errors.raise_error @@ Format.asprintf "Unspecified roundops@." - in - let backend = - match backend with Some "dgfip_c" -> Cli.Dgfip_c | _ -> UnknownBackend - in - let execution_mode = - match (run_tests, run_test) with - | Some s, _ -> Cli.MultipleTests s - | None, Some s -> Cli.SingleTest s - | None, None -> Cli.Extraction - in - let files = - match List.length files with - | 0 -> Errors.raise_error "please provide at least one M source file" - | _ -> Cli.NonEmpty files - in - let dgfip_flags = - process_dgfip_options backend ~application_names dgfip_options - in - Cli.set_all_arg_refs files application_names without_dgfip_m debug - var_info_debug display_time dep_graph_file print_cycles output - optimize_unsafe_float m_clean_calls comparison_error_margin income_year - value_sort round_ops backend dgfip_test_filter mpp_function dgfip_flags - execution_mode - let run_single_test m_program test = Mir_interpreter.repl_debug := true; - ignore - (Test_interpreter.check_one_test m_program test !Cli.value_sort - !Cli.round_ops); - Test_interpreter.check_one_test m_program test !Cli.value_sort !Cli.round_ops; + Test_interpreter.check_one_test m_program test !Config.value_sort + !Config.round_ops; Cli.result_print "Test passed!" let run_multiple_tests m_program tests = let filter_function = - match !Cli.dgfip_test_filter with + match !Config.dgfip_test_filter with | false -> fun _ -> true | true -> ( fun x -> match x.[0] with 'A' .. 'Z' -> true | _ -> false) in - Test_interpreter.check_all_tests m_program tests !Cli.value_sort - !Cli.round_ops filter_function + Test_interpreter.check_all_tests m_program tests !Config.value_sort + !Config.round_ops filter_function let extract m_program = Cli.debug_print "Extracting the desired function from the whole program..."; - match !Cli.backend with - | Cli.Dgfip_c -> + match !Config.backend with + | Config.Dgfip_c -> Cli.debug_print "Compiling the codebase to DGFiP C..."; - if !Cli.output_file = "" then + if !Config.output_file = "" then Errors.raise_error "an output file must be defined with --output"; - Dgfip_gen_files.generate_auxiliary_files !Cli.dgfip_flags m_program; - Bir_to_dgfip_c.generate_c_program !Cli.dgfip_flags m_program - !Cli.output_file; - Cli.debug_print "Result written to %s" !Cli.output_file + Dgfip_gen_files.generate_auxiliary_files !Config.dgfip_flags m_program; + Bir_to_dgfip_c.generate_c_program !Config.dgfip_flags m_program + !Config.output_file; + Cli.debug_print "Result written to %s" !Config.output_file | UnknownBackend -> Errors.raise_error "No backend specified!" let driver () = @@ -263,11 +164,11 @@ let driver () = let m_program = parse () in Cli.debug_print "Elaborating..."; let m_program = Expander.proceed m_program in - let m_program = Validator.proceed !Cli.mpp_function m_program in + let m_program = Validator.proceed !Config.mpp_function m_program in let m_program = Mast_to_mir.translate m_program in let m_program = Mir.expand_functions m_program in Cli.debug_print "Creating combined program suitable for execution..."; - match !Cli.execution_mode with + match !Config.execution_mode with | SingleTest test -> run_single_test m_program test | MultipleTests tests -> run_multiple_tests m_program tests | Extraction -> extract m_program @@ -276,8 +177,38 @@ let driver () = (match kont with None -> () | Some kont -> kont ()); raise e +let set_opts (files : string list) (application_names : string list) + (without_dgfip_m : bool) (debug : bool) (var_info_debug : string list) + (display_time : bool) (print_cycles : bool) (backend : string option) + (output : string option) (run_tests : string option) + (dgfip_test_filter : bool) (run_test : string option) + (mpp_function : string option) (optimize_unsafe_float : bool) + (precision : string option) (roundops : string option) + (comparison_error_margin : float option) (income_year : int) + (m_clean_calls : bool) (dgfip_options : string list option) = + Config.set_opts ~files ~application_names ~without_dgfip_m ~debug + ~var_info_debug ~display_time ~print_cycles ~backend ~output ~run_tests + ~dgfip_test_filter ~run_test ~mpp_function ~optimize_unsafe_float ~precision + ~roundops ~comparison_error_margin ~income_year ~m_clean_calls + ~dgfip_options + +let run () = + let eval_cli = + Cmdliner.Cmd.eval_value @@ Cmdliner.Cmd.v Cli.info (Cli.mlang_t set_opts) + in + match eval_cli with + | Ok `Help | Ok `Version | Ok (`Ok `Displayed_dgfip_help) -> () + | Ok (`Ok `Run) -> driver () + | Ok (`Ok (`Error m)) -> Errors.raise_error m + | Error `Exn -> + Errors.raise_error + "Uncaught exception while reading command line arguments" + | Error `Parse -> Errors.raise_error "Parsing command line arguments failed" + | Error `Term -> Errors.raise_error "Term evaluation error" + let main () = - let opt_code = - Cmdliner.Cmd.eval @@ Cmdliner.Cmd.v Cli.info (Cli.mlang_t set_opts) - in - match opt_code with 0 -> driver () | i -> exit i + try run () + with Errors.StructuredError (msg, pos_list, kont) as e -> + Cli.error_print "%a" Errors.format_structured_error (msg, pos_list); + (match kont with None -> () | Some kont -> kont ()); + raise e diff --git a/src/mlang/dune b/src/mlang/dune index 44f12dbe2..0e489f79d 100644 --- a/src/mlang/dune +++ b/src/mlang/dune @@ -1,9 +1,9 @@ -(include_subdirs unqualified) - (library (public_name mlang) + (flags + (:standard -open Utils)) (libraries re ANSITerminal parmap cmdliner threads dune-build-info num gmp - menhirLib)) + menhirLib m_frontend m_ir irj_utils backend_compilers)) (documentation (package mlang) diff --git a/src/mlang/m_frontend/dune b/src/mlang/m_frontend/dune index 994196619..adb2113e0 100644 --- a/src/mlang/m_frontend/dune +++ b/src/mlang/m_frontend/dune @@ -3,3 +3,10 @@ (menhir (modules mparser) (flags --explain)) + +(library + (public_name mlang.frontend) + (name m_frontend) + (flags + (:standard -open Utils -open M_ir)) + (libraries utils m_ir)) diff --git a/src/mlang/m_frontend/expander.ml b/src/mlang/m_frontend/expander.ml index 624ae3795..d37c203a2 100644 --- a/src/mlang/m_frontend/expander.ml +++ b/src/mlang/m_frontend/expander.ml @@ -75,6 +75,9 @@ module Err = struct let constant_cannot_have_a_size pos = Errors.raise_spanned_error "constant cannot have a size" pos + let constant_cannot_have_a_type pos = + Errors.raise_spanned_error "constant cannot have a type" pos + let constant_cannot_have_a_name pos = Errors.raise_spanned_error "constant cannot have a name" pos @@ -265,7 +268,7 @@ let elim_unselected_apps (p : Mast.program) : Mast.program = (apps_env, []) source_file in (apps_env, List.rev prog_file :: prog)) - (empty_apps_env !Cli.application_names, []) + (empty_apps_env !Config.application_names, []) p in check_apps_on_cmdline apps_env; @@ -514,9 +517,11 @@ let rec iterate_all_combinations (ld : loop_domain) : loop_context list = iterated values. In OCaml terms, if you want [translate_loop_variables lvs f ctx], then you - should define [f] by [let f = fun lc i ctx -> ...] and use {!val: - merge_loop_ctx} inside [...] before translating the loop body. [lc] is the - loop context, [i] the loop sequence index and [ctx] the translation context. *) + should define [f] by [let f = fun lc i ctx -> ...] and use + {!val: + merge_loop_ctx} inside [...] before translating the loop body. + [lc] is the loop context, [i] the loop sequence index and [ctx] the + translation context. *) let expand_loop_variables (lvs : Com.m_var_name Com.loop_variables Pos.marked) (const_map : const_context) : (loop_context -> 'a) -> 'a list = @@ -684,10 +689,26 @@ and expand_expression (const_map : const_context) (loop_map : loop_context) match expand_access const_map loop_map (Pos.same a m_expr) with | ExpLiteral _ -> Err.constant_cannot_have_a_size a_pos | ExpAccess m_a -> Pos.same (Size m_a) m_expr) - | IsVariable (Pos.Mark (a, a_pos), name) -> ( + | Type (Pos.Mark (a, a_pos), m_typ) -> ( + match expand_access const_map loop_map (Pos.same a m_expr) with + | ExpLiteral _ -> Err.constant_cannot_have_a_type a_pos + | ExpAccess m_a -> Pos.same (Type (m_a, m_typ)) m_expr) + | SameVariable (Pos.Mark (a0, a0_pos), Pos.Mark (a1, a1_pos)) -> + let m_a0' = + match expand_access const_map loop_map (Pos.same a0 m_expr) with + | ExpLiteral _ -> Err.constant_cannot_have_a_name a0_pos + | ExpAccess m_a -> m_a + in + let m_a1' = + match expand_access const_map loop_map (Pos.same a1 m_expr) with + | ExpLiteral _ -> Err.constant_cannot_have_a_name a1_pos + | ExpAccess m_a -> m_a + in + Pos.same (SameVariable (m_a0', m_a1')) m_expr + | InDomain (Pos.Mark (a, a_pos), cvm) -> ( match expand_access const_map loop_map (Pos.same a m_expr) with | ExpLiteral _ -> Err.constant_cannot_have_a_name a_pos - | ExpAccess m_a -> Pos.same (IsVariable (m_a, name)) m_expr) + | ExpAccess m_a -> Pos.same (InDomain (m_a, cvm)) m_expr) | NbCategory _ | NbAnomalies | NbDiscordances | NbInformatives | NbBloquantes -> m_expr @@ -759,6 +780,12 @@ let rec expand_instruction (const_map : const_context) let ithen' = expand_instructions const_map ithen in let ielse' = expand_instructions const_map ielse in Pos.same (Com.IfThenElse (expr', ithen', ielse')) m_instr :: prev + | Com.Switch (e, l) -> + let e' = expand_expression const_map ParamsMap.empty e in + let l' = + List.map (fun (c, l) -> (c, expand_instructions const_map l)) l + in + Pos.same (Com.Switch (e', l')) m_instr :: prev | Com.WhenDoElse (wdl, ed) -> let map (expr, dl, pos) = let expr' = expand_expression const_map ParamsMap.empty expr in @@ -910,8 +937,8 @@ let rec expand_instruction (const_map : const_context) m_sp_opt in Pos.same (Com.ComputeChaining (chain, m_sp_opt')) m_instr :: prev - | Com.RaiseError _ | Com.CleanErrors | Com.ExportErrors | Com.FinalizeErrors - -> + | Com.RaiseError _ | Com.CleanErrors | Com.CleanFinalizedErrors + | Com.ExportErrors | Com.FinalizeErrors | Com.Stop _ -> m_instr :: prev and expand_instructions (const_map : const_context) diff --git a/src/mlang/m_frontend/mast_to_mir.ml b/src/mlang/m_frontend/mast_to_mir.ml index 7fb1f0366..ea2b26b90 100644 --- a/src/mlang/m_frontend/mast_to_mir.ml +++ b/src/mlang/m_frontend/mast_to_mir.ml @@ -55,8 +55,15 @@ let complete_vars_stack (prog : Validator.program) : Validator.program = let nbItFilter = match filter with Some _ -> 1 | None -> 0 in let nbRef, nbIt = aux_instrs instrs in (nbRef, max nbIt @@ max nbItSort nbItFilter) + | Com.Switch (_, l) -> + List.fold_left + (fun (mNbRef, mNbIt) (_, l) -> + let nbRef, nbIt = aux_instrs l in + (max nbRef mNbRef, max nbIt mNbIt)) + (0, 0) l | Com.Affectation _ | Com.Print _ | Com.ComputeTarget _ | Com.RaiseError _ - | Com.CleanErrors | Com.ExportErrors | Com.FinalizeErrors -> + | Com.CleanErrors | Com.CleanFinalizedErrors | Com.ExportErrors + | Com.FinalizeErrors | Com.Stop _ -> (0, 0) | Com.ComputeDomain _ | Com.ComputeChaining _ | Com.ComputeVerifs _ -> assert false @@ -374,6 +381,13 @@ let complete_stats ((prog : Validator.program), (stats : Mir.stats)) : let sz = max szI @@ max szT szE in let nbRef = max nbRefI @@ max nbRefT nbRefE in (nb, sz, nbRef, tdata) + | Com.Switch (expr, l) -> + let nbI, szI, nbRefI, tdata = aux_expr tdata expr in + List.fold_left + (fun (mNb, mSz, mNbRef, tdata) (_, l) -> + let nb, sz, rbRef, tdata = aux_instrs tdata l in + (max nb mNb, max sz mSz, max rbRef mNbRef, tdata)) + (nbI, szI, nbRefI, tdata) l | Com.WhenDoElse (wdl, ed) -> let rec wde (nb, sz, nbRef, tdata) = function | (me, dl, _) :: wdl' -> @@ -508,8 +522,8 @@ let complete_stats ((prog : Validator.program), (stats : Mir.stats)) : let sz = max n' n'' + (max sz @@ max sz' @@ max sz'' sz''') in let nbRef = max nbRef @@ max nbRef' @@ max nbRef'' nbRef''' in (nb, sz, nbRef, tdata) - | Com.RaiseError _ | Com.CleanErrors | Com.ExportErrors - | Com.FinalizeErrors -> + | Com.RaiseError _ | Com.CleanErrors | Com.CleanFinalizedErrors + | Com.ExportErrors | Com.FinalizeErrors | Com.Stop _ -> (0, 0, 0, tdata) | Com.ComputeDomain _ | Com.ComputeChaining _ | Com.ComputeVerifs _ -> assert false @@ -533,12 +547,25 @@ let complete_stats ((prog : Validator.program), (stats : Mir.stats)) : | Com.Var (FieldAccess (_, me, _, _)) | Com.Size (Pos.Mark (TabAccess (_, _, me), _)) | Com.Size (Pos.Mark (FieldAccess (_, me, _, _), _)) + | Com.Type (Pos.Mark (TabAccess (_, _, me), _), _) + | Com.Type (Pos.Mark (FieldAccess (_, me, _, _), _), _) | Com.Attribut (Pos.Mark (TabAccess (_, _, me), _), _) - | Com.Attribut (Pos.Mark (FieldAccess (_, me, _, _), _), _) - | Com.IsVariable (Pos.Mark (TabAccess (_, _, me), _), _) - | Com.IsVariable (Pos.Mark (FieldAccess (_, me, _, _), _), _) -> + | Com.Attribut (Pos.Mark (FieldAccess (_, me, _, _), _), _) -> aux_expr tdata me - | Com.Comparison (_, me0, me1) | Com.Binop (_, me0, me1) -> + | Com.Comparison (_, me0, me1) + | Com.Binop (_, me0, me1) + | Com.SameVariable + ( Pos.Mark (TabAccess (_, _, me0), _), + Pos.Mark (TabAccess (_, _, me1), _) ) + | Com.SameVariable + ( Pos.Mark (TabAccess (_, _, me0), _), + Pos.Mark (FieldAccess (_, me1, _, _), _) ) + | Com.SameVariable + ( Pos.Mark (FieldAccess (_, me0, _, _), _), + Pos.Mark (TabAccess (_, _, me1), _) ) + | Com.SameVariable + ( Pos.Mark (FieldAccess (_, me0, _, _), _), + Pos.Mark (FieldAccess (_, me1, _, _), _) ) -> let nb0, sz0, nbRef0, tdata = aux_expr tdata me0 in let nb1, sz1, nbRef1, tdata = aux_expr tdata me1 in (max nb0 nb1, max sz0 sz1, max nbRef0 nbRef1, tdata) @@ -570,9 +597,9 @@ let complete_stats ((prog : Validator.program), (stats : Mir.stats)) : (max nb nb', max sz sz', max nbRef nbRef', tdata) | Com.Literal _ | Com.Var (VarAccess _) - | Com.NbCategory _ | Com.Attribut _ | Com.Size _ | Com.IsVariable _ - | Com.NbAnomalies | Com.NbDiscordances | Com.NbInformatives - | Com.NbBloquantes -> + | Com.NbCategory _ | Com.Attribut _ | Com.Size _ | Com.Type _ + | Com.SameVariable _ | Com.InDomain _ | Com.NbAnomalies + | Com.NbDiscordances | Com.NbInformatives | Com.NbBloquantes -> (0, 0, 0, tdata) | Com.FuncCallLoop _ | Com.Loop _ -> assert false in @@ -589,7 +616,7 @@ let complete_stats ((prog : Validator.program), (stats : Mir.stats)) : in (prog, { stats with nb_all_tmps; sz_all_tmps; nb_all_refs }) -(** {1 Translation } *) +(** {1 Translation} *) (** {2 General translation context} *) @@ -698,23 +725,27 @@ let rec translate_expression (p : Validator.program) (dict : Com.Var.t IntMap.t) let e' = translate_expression p dict e in let i = (StrMap.find (Pos.unmark f) p.prog_event_fields).index in Size (Pos.mark (FieldAccess (m_sp_opt', e', f, i)) pos)) - | IsVariable (Pos.Mark (access, pos), m_name) -> ( + | Type (Pos.Mark (access, pos), m_typ) -> + let access' = translate_access p dict access in + Type (Pos.mark access' pos, m_typ) + | SameVariable (Pos.Mark (access0, pos0), Pos.Mark (access1, pos1)) -> + let access0' = translate_access p dict access0 in + let access1' = translate_access p dict access1 in + SameVariable (Pos.mark access0' pos0, Pos.mark access1' pos1) + | InDomain (Pos.Mark (access, pos), cvm) -> ( match access with - | VarAccess (_, m_id) -> ( + | VarAccess (_, m_id) -> let var = get_var dict m_id in if Com.Var.is_ref var then let access' = translate_access p dict access in - IsVariable (Pos.mark access' pos, m_name) - else - let name = Pos.unmark m_name in - if Com.Var.name_str var = name then Literal (Float 1.0) - else - match Com.Var.alias var with - | Some m_a when Pos.unmark m_a = name -> Literal (Float 1.0) - | _ -> Literal (Float 0.0)) + InDomain (Pos.mark access' pos, cvm) + else if + Com.Var.is_tgv var && Com.CatVar.Map.mem (Com.Var.cat var) cvm + then Literal (Float 1.0) + else Literal (Float 0.0) | _ -> let access' = translate_access p dict access in - IsVariable (Pos.mark access' pos, m_name)) + InDomain (Pos.mark access' pos, cvm)) | NbAnomalies -> NbAnomalies | NbDiscordances -> NbDiscordances | NbInformatives -> NbInformatives @@ -781,6 +812,17 @@ let rec translate_prog (p : Validator.program) (dict : Com.Var.t IntMap.t) let prog_else, dict = aux ([], dict) ile in let instr' = Com.IfThenElse (expr, prog_then, prog_else) in aux (Pos.mark instr' pos :: res, dict) il + | Pos.Mark (Com.Switch (e, l), pos) :: il -> + let e' = translate_expression p dict e in + let revl', dict = + List.fold_left + (fun (revl, dict) (c, l) -> + let l', dict = aux ([], dict) l in + ((c, l') :: revl, dict)) + ([], dict) l + in + let i' = Com.Switch (e', List.rev revl') in + aux (Pos.mark i' pos :: res, dict) il | Pos.Mark (Com.WhenDoElse (wdl, ed), pos) :: il -> let wdl', dict = rev_fst @@ -916,34 +958,32 @@ let rec translate_prog (p : Validator.program) (dict : Com.Var.t IntMap.t) let instr = Com.Restore (al', var_params', evts', evtfs', prog_rest) in aux (Pos.mark instr pos :: res, dict) il | Pos.Mark (Com.ArrangeEvents (sort, filter, add, instrs), pos) :: il -> - let sort', itval_depth', dict = + let sort', dict = match sort with | Some (m_id0, m_id1, expr) -> let var0 = get_var dict m_id0 in let var0' = Com.Var.set_loc_idx var0 itval_depth in let var1 = get_var dict m_id1 in let var1' = Com.Var.set_loc_idx var1 (itval_depth + 1) in - let dict = + let dict' = dict |> IntMap.add var0.id var0' |> IntMap.add var1.id var1' in - let expr' = translate_expression p dict expr in - (Some (var0', var1', expr'), itval_depth + 2, dict) - | None -> (None, itval_depth, dict) + let expr' = translate_expression p dict' expr in + (Some (var0', var1', expr'), dict') + | None -> (None, dict) in - let filter', itval_depth', dict = + let filter', dict = match filter with | Some (m_id, expr) -> let var = get_var dict m_id in let var' = Com.Var.set_loc_idx var itval_depth in - let dict = IntMap.add var.id var' dict in - let expr' = translate_expression p dict expr in - (Some (var', expr'), max itval_depth' (itval_depth + 1), dict) - | None -> (None, itval_depth', dict) + let dict' = IntMap.add var.id var' dict in + let expr' = translate_expression p dict' expr in + (Some (var', expr'), dict') + | None -> (None, dict) in let add' = Option.map (translate_expression p dict) add in - let instrs', dict = - translate_prog p dict it_depth itval_depth' instrs - in + let instrs', dict = translate_prog p dict it_depth itval_depth instrs in let instr = Com.ArrangeEvents (sort', filter', add', instrs') in aux (Pos.mark instr pos :: res, dict) il | Pos.Mark (Com.RaiseError (err_name, var_opt), pos) :: il -> @@ -953,10 +993,14 @@ let rec translate_prog (p : Validator.program) (dict : Com.Var.t IntMap.t) aux (Pos.mark instr' pos :: res, dict) il | Pos.Mark (Com.CleanErrors, pos) :: il -> aux (Pos.mark Com.CleanErrors pos :: res, dict) il + | Pos.Mark (Com.CleanFinalizedErrors, pos) :: il -> + aux (Pos.mark Com.CleanFinalizedErrors pos :: res, dict) il | Pos.Mark (Com.ExportErrors, pos) :: il -> aux (Pos.mark Com.ExportErrors pos :: res, dict) il | Pos.Mark (Com.FinalizeErrors, pos) :: il -> aux (Pos.mark Com.FinalizeErrors pos :: res, dict) il + | Pos.Mark (Com.Stop i, pos) :: il -> + aux (Pos.mark (Com.Stop i) pos :: res, dict) il | Pos.Mark (Com.ComputeDomain _, _) :: _ | Pos.Mark (Com.ComputeChaining _, _) :: _ | Pos.Mark (Com.ComputeVerifs _, _) :: _ -> diff --git a/src/mlang/m_frontend/mlexer.mll b/src/mlang/m_frontend/mlexer.mll index 7f6be109c..08be84845 100644 --- a/src/mlang/m_frontend/mlexer.mll +++ b/src/mlang/m_frontend/mlexer.mll @@ -64,6 +64,7 @@ rule token = parse | "REEL" -> REAL | "afficher" -> PRINT | "afficher_erreur" -> PRINT_ERR + | "aiguillage" -> MATCH | "ajouter" -> ADD | "alias" -> ALIAS | "alors" -> THEN @@ -79,11 +80,13 @@ rule token = parse | "calculable" -> COMPUTABLE | "calculee" -> COMPUTED | "calculer" -> COMPUTE + | "cas" -> CASE | "categorie" -> CATEGORY | "champ_evenement" -> EVENT_FIELD | "cible" -> TARGET | "const" -> CONST | "dans" -> IN + | "dans_domaine" -> IN_DOMAIN | "discordance" -> DISCORDANCE | "domaine" -> DOMAIN | "enchaineur" -> CHAINING @@ -91,7 +94,6 @@ rule token = parse | "erreur" -> ERROR | "espace" -> SPACE | "espace_variables" -> VARIABLE_SPACE - | "est_variable" -> IS_VARIABLE | "et" -> AND | "evenement" -> EVENT | "evenements" -> EVENTS @@ -108,13 +110,15 @@ rule token = parse | "informative" -> INFORMATIVE | "iterer" -> ITERATE | "leve_erreur" -> RAISE_ERROR + | "meme_variable" -> SAME_VARIABLE + | "nb_anomalies" -> NB_ANOMALIES | "nb_bloquantes" -> NB_BLOCKING | "nb_categorie" -> NB_CATEGORY - | "nb_anomalies" -> NB_ANOMALIES | "nb_discordances" -> NB_DISCORDANCES | "nb_informatives" -> NB_INFORMATIVES | "neant" -> NOTHING | "nettoie_erreurs" -> CLEAN_ERRORS + | "nettoie_erreurs_finalisees" -> CLEAN_FINALIZED_ERRORS | "nom" -> NAME | "non" -> NOT | "numero_compl" -> COMPL_NUMBER @@ -136,6 +140,7 @@ rule token = parse | "sinon_si" -> ELSEIF | "sortie" -> OUTPUT | "specialise" -> SPECIALIZE + | "stop" -> STOP | "tableau" -> TABLE | "taille" -> SIZE | "trier" -> SORT diff --git a/src/mlang/m_frontend/mparser.mly b/src/mlang/m_frontend/mparser.mly index be48db696..51f38dbe8 100644 --- a/src/mlang/m_frontend/mparser.mly +++ b/src/mlang/m_frontend/mparser.mly @@ -25,11 +25,6 @@ along with this program. If not, see . | CompSubTyp of string Pos.marked | Attr of variable_attribute - let parse_to_atom (v: parse_val) (pos : Pos.t) : Com.m_var_name Com.atom = - match v with - | ParseVar v -> AtomVar (Pos.mark v pos) - | ParseInt v -> AtomLiteral (Float (float_of_int v)) - (** Module generated automaticcaly by Menhir, the parser generator *) %} @@ -59,11 +54,13 @@ along with this program. If not, see . %token BASE GIVEN_BACK COMPUTABLE BY_DEFAULT %token DOMAIN SPECIALIZE AUTHORIZE VERIFIABLE EVENT EVENTS VALUE STEP %token EVENT_FIELD ARRANGE_EVENTS SORT FILTER ADD REFERENCE -%token IS_VARIABLE VARIABLE_SPACE SPACE +%token SAME_VARIABLE VARIABLE_SPACE SPACE IN_DOMAIN CLEAN_FINALIZED_ERRORS +%token STOP MATCH CASE %token EOF %type source_file +%type instruction_list_rev %nonassoc SEMICOLON %left OR @@ -878,8 +875,29 @@ instruction: Some (RaiseError (e_name, var)) } | CLEAN_ERRORS SEMICOLON { Some CleanErrors } +| CLEAN_FINALIZED_ERRORS SEMICOLON { Some CleanFinalizedErrors } | EXPORT_ERRORS SEMICOLON { Some ExportErrors } | FINALIZE_ERRORS SEMICOLON { Some FinalizeErrors } +| STOP APPLICATION SEMICOLON { Some (Stop SKApplication) } +| STOP FONCTION SEMICOLON { Some (Stop SKFun) } +| STOP TARGET SEMICOLON { Some (Stop SKTarget) } +| STOP s = SYMBOL SEMICOLON { Some (Stop (SKId (Some s))) } +| STOP SEMICOLON { Some (Stop (SKId None)) } +| MATCH LPAREN e = with_pos(expression) RPAREN COLON LPAREN l = nonempty_list(switch_case) RPAREN + { Some (Switch (e, l)) } + +switch_case_value: +| CASE s = SYMBOL COLON { Value (Com.Float (float_of_string s)) } +| CASE UNDEFINED COLON { Value Com.Undefined } +| BY_DEFAULT COLON { Com.Default } + +switch_cases_rev: + | sc = switch_case_value { [ sc ] } + | scl = switch_cases_rev sc = switch_case_value { sc :: scl } + +switch_case: + | scr = switch_cases_rev ilt = instruction_list_rev + { List.rev scr, List.rev ilt } target_param: | COLON SPACE sp = symbol_with_pos { @@ -1467,14 +1485,21 @@ function_call: Attribut (access, attr) } | SIZE LPAREN access = with_pos(var_access) RPAREN { Size access } +| TYPE LPAREN access = with_pos(var_access) + COMMA typ = with_pos(value_type_prim) RPAREN { Type (access, typ) } | NB_ANOMALIES LPAREN RPAREN { NbAnomalies } | NB_DISCORDANCES LPAREN RPAREN { NbDiscordances } | NB_INFORMATIVES LPAREN RPAREN { NbInformatives } | NB_BLOCKING LPAREN RPAREN { NbBloquantes } -| IS_VARIABLE LPAREN access = with_pos(var_access) - COMMA name = symbol_with_pos RPAREN { - IsVariable (access, name) - } +| SAME_VARIABLE LPAREN access0 = with_pos(var_access) + COMMA access1 = with_pos(var_access) RPAREN { + SameVariable (access0, access1) + } +| IN_DOMAIN LPAREN access = with_pos(var_access) + COMMA vcat = with_pos(var_category_id) RPAREN { + let vc = Com.CatVar.Map.from_string_list vcat in + InDomain (access, vc) + } | s = with_pos(function_name) LPAREN RPAREN { FuncCall (parse_function_name s, []) } diff --git a/src/mlang/m_frontend/parse_utils.ml b/src/mlang/m_frontend/parse_utils.ml index 3b6ac0bcb..a6ba22fdb 100644 --- a/src/mlang/m_frontend/parse_utils.ml +++ b/src/mlang/m_frontend/parse_utils.ml @@ -87,6 +87,11 @@ let parse_literal sloc (s : string) : Com.literal = try Com.Float (float_of_string s) with Failure _ -> E.raise_spanned_error "invalid literal" (mk_position sloc) +let parse_to_atom (v : parse_val) (pos : Pos.t) : Com.m_var_name Com.atom = + match v with + | ParseVar v -> AtomVar (Pos.mark v pos) + | ParseInt v -> AtomLiteral (Float (float_of_int v)) + let parse_atom sloc (s : string) : Com.m_var_name Com.atom = try Com.AtomLiteral (Com.Float (float_of_string s)) with Failure _ -> diff --git a/src/mlang/m_frontend/parse_utils.mli b/src/mlang/m_frontend/parse_utils.mli index 186ebc546..713f4d397 100644 --- a/src/mlang/m_frontend/parse_utils.mli +++ b/src/mlang/m_frontend/parse_utils.mli @@ -51,6 +51,8 @@ val parse_literal : Lexing.position * Lexing.position -> string -> Com.literal val parse_atom : Lexing.position * Lexing.position -> string -> Com.m_var_name Com.atom +val parse_to_atom : parse_val -> Pos.t -> Com.m_var_name Com.atom + val parse_function_name : string Pos.marked -> Com.func Pos.marked val parse_index_format : string Pos.marked -> string Pos.marked diff --git a/src/mlang/m_frontend/validator.ml b/src/mlang/m_frontend/validator.ml index ccee6b821..b64fc4b26 100644 --- a/src/mlang/m_frontend/validator.ml +++ b/src/mlang/m_frontend/validator.ml @@ -61,6 +61,14 @@ module Err = struct in Errors.raise_spanned_error msg pos + let alias_already_declared_as_var alias old_pos pos = + let msg = + Format.asprintf + "alias \"%s\" declared more than once: already declared as variable %a" + alias Pos.format old_pos + in + Errors.raise_spanned_error msg pos + let variable_already_declared name old_pos pos = let msg = Format.asprintf @@ -69,6 +77,14 @@ module Err = struct in Errors.raise_spanned_error msg pos + let variable_already_declared_as_alias name old_pos pos = + let msg = + Format.asprintf + "variable \"%s\" declared more than once: already declared as alias %a" + name Pos.format old_pos + in + Errors.raise_spanned_error msg pos + let temporary_variable_already_declared name old_pos pos = let msg = Format.asprintf @@ -189,9 +205,15 @@ module Err = struct let unknown_variable_category pos = Errors.raise_spanned_error "unknown_variable_category" pos - let insruction_forbidden_in_rules pos = + let instruction_forbidden_in_rules pos = Errors.raise_spanned_error "instruction forbidden in rules" pos + let instruction_forbidden_outside_target pos = + Errors.raise_spanned_error "instruction only allowed in targets" pos + + let instruction_forbidden_outside_function pos = + Errors.raise_spanned_error "instruction only allowed in functions" pos + let unknown_domain rov pos = let msg = Format.asprintf "unknown %s domain" (rov_to_str rov) in Errors.raise_spanned_error msg pos @@ -374,11 +396,42 @@ module Err = struct in Errors.raise_spanned_error msg pos + let tmp_var_has_no_var_space var_name pos = + let msg = + Pp.spr "temporary variable \"%s\" does not has a space" var_name + in + Errors.raise_spanned_error msg pos + let category_forbidden_with_space cat_pos sp_name = let msg = Pp.spr "variable category forbidden with variable space \"%s\"" sp_name in Errors.raise_spanned_error msg cat_pos + + let stop_outside_scope ?scope pos = + let msg = + Format.sprintf + "instruction 'stop%s;' should only be used inside an iteration" + (match scope with None -> String.empty | Some s -> " " ^ s) + in + Errors.raise_spanned_error msg pos + + let stop_with_invalid_scope scope current_scopes pos = + let msg = + Pp.spr "scope %s cannot be exited; current scopes are: %a" scope + (Format.pp_print_list + ~pp_sep:(fun fmt _ -> Format.fprintf fmt ",") + Format.pp_print_string) + current_scopes + in + Errors.raise_spanned_error msg pos + + let non_exclusive_cases case pos = + let msg = + Pp.spr "switch cases must be exclusive: %a cannot be used twice" + Com.format_case case + in + Errors.raise_spanned_error msg pos end type syms = Com.DomainId.t Pos.marked Com.DomainIdMap.t @@ -478,6 +531,7 @@ type program = { prog_dict : Com.Var.t IntMap.t; prog_vars : int StrMap.t; prog_alias : int StrMap.t; + prog_varalias : int StrMap.t; prog_var_spaces : int StrMap.t; prog_var_spaces_idx : Com.variable_space IntMap.t; prog_event_fields : Com.event_field StrMap.t; @@ -504,22 +558,32 @@ let is_vartmp (var : string) = let check_name_in_tgv prog m_name = let vn, vpos = Pos.to_couple m_name in - let err old_pos = Err.variable_already_declared vn old_pos vpos in - match StrMap.find_opt vn prog.prog_vars with + (match StrMap.find_opt vn prog.prog_vars with | Some id -> let var = IntMap.find id prog.prog_dict in let old_pos = Pos.get @@ Com.Var.name var in - err old_pos + Err.variable_already_declared vn old_pos vpos + | None -> ()); + match StrMap.find_opt vn prog.prog_alias with + | Some id -> + let var = IntMap.find id prog.prog_dict in + let old_pos = Pos.get @@ Com.Var.name var in + Err.variable_already_declared_as_alias vn old_pos vpos | None -> () let check_alias_in_tgv prog m_alias = let an, apos = Pos.to_couple m_alias in - let err old_pos = Err.alias_already_declared an old_pos apos in - match StrMap.find_opt an prog.prog_alias with + (match StrMap.find_opt an prog.prog_alias with + | Some id -> + let var = IntMap.find id prog.prog_dict in + let old_pos = Pos.get @@ Option.get @@ Com.Var.alias var in + Err.alias_already_declared an old_pos apos + | None -> ()); + match StrMap.find_opt an prog.prog_vars with | Some id -> let var = IntMap.find id prog.prog_dict in let old_pos = Pos.get @@ Option.get @@ Com.Var.alias var in - err old_pos + Err.alias_already_declared_as_var an old_pos apos | None -> () let check_name_in_tmp tmps m_name = @@ -583,7 +647,7 @@ let safe_prefix (p : Mast.program) : string = let empty_program (p : Mast.program) main_target = let prog_app = let fold s a = StrMap.add a Pos.none s in - List.fold_left fold StrMap.empty !Cli.application_names + List.fold_left fold StrMap.empty !Config.application_names in { prog_prefix = safe_prefix p; @@ -594,12 +658,13 @@ let empty_program (p : Mast.program) main_target = prog_var_cats = Com.CatVar.Map.empty; prog_dict = IntMap.empty; prog_vars = StrMap.empty; + prog_alias = StrMap.empty; + prog_varalias = StrMap.empty; prog_var_spaces = StrMap.empty; prog_var_spaces_idx = IntMap.empty; prog_event_fields = StrMap.empty; prog_event_field_idxs = IntMap.empty; prog_event_pos = Pos.none; - prog_alias = StrMap.empty; prog_errors = StrMap.empty; prog_rdoms = Com.DomainIdMap.empty; prog_rdom_syms = Com.DomainIdMap.empty; @@ -737,15 +802,19 @@ let check_global_var (var : Com.Var.t) (prog : program) : program = cat.attributs; check_name_in_tgv prog var.name; let prog_dict = IntMap.add var.id var prog.prog_dict in - let prog_vars = StrMap.add name var.id prog.prog_vars in - let prog_alias = + let prog_vars, prog_varalias = + ( StrMap.add name var.id prog.prog_vars, + StrMap.add name var.id prog.prog_varalias ) + in + let prog_alias, prog_varalias = match Com.Var.alias var with | Some m_alias -> check_alias_in_tgv prog m_alias; - StrMap.add (Pos.unmark m_alias) var.id prog.prog_alias - | None -> prog.prog_alias + ( StrMap.add (Pos.unmark m_alias) var.id prog.prog_alias, + StrMap.add (Pos.unmark m_alias) var.id prog_varalias ) + | None -> (prog.prog_alias, prog_varalias) in - { prog with prog_dict; prog_vars; prog_alias } + { prog with prog_dict; prog_vars; prog_alias; prog_varalias } let check_var_decl (var_decl : Mast.variable_decl) (prog : program) : program = match var_decl with @@ -1134,10 +1203,16 @@ type var_mem_type = Num | Table | Both type proc_type = Target of call_compute * Pos.t | Rule | Verif | Func | Filter -type var_env = { prog : program; proc_type : proc_type; vars : int StrMap.t } +type var_env = { + prog : program; + proc_type : proc_type; + vars : int StrMap.t; + scopes : string list; + (* Scopes of what can be stopped with the "stop" instruction. *) +} let new_var_env ?(vars = StrMap.empty) prog proc_type = - { prog; proc_type; vars } + { prog; proc_type; vars; scopes = [] } let mod_var_env env proc_type = { env with proc_type } @@ -1145,6 +1220,11 @@ let add_var_env (var : Com.Var.t) env = let prog_dict = IntMap.add var.id var env.prog.prog_dict in let prog = { env.prog with prog_dict } in let vars = StrMap.add (Com.Var.name_str var) var.id env.vars in + let vars = + match Com.Var.alias var with + | None -> vars + | Some (Pos.Mark (alias, _)) -> StrMap.add alias var.id vars + in { env with prog; vars } let check_name_in_env env m_name = @@ -1328,7 +1408,9 @@ let rec fold_var_expr (get_var : 'v -> string Pos.marked) | Some _ -> Err.event_field_is_not_a_reference f_name f_pos | None -> Err.unknown_event_field f_name f_pos); fold_aux acc e env) - | Size (Pos.Mark (access, _)) | IsVariable (Pos.Mark (access, _), _) -> ( + | Size (Pos.Mark (access, _)) + | InDomain (Pos.Mark (access, _), _) + | Type (Pos.Mark (access, _), _) -> ( match access with | VarAccess (m_sp_opt, m_v) -> let acc = fold_sp m_sp_opt env acc in @@ -1347,6 +1429,28 @@ let rec fold_var_expr (get_var : 'v -> string Pos.marked) | Some _ -> Err.event_field_is_not_a_reference f_name f_pos | None -> Err.unknown_event_field f_name f_pos); fold_aux acc e env) + | SameVariable (Pos.Mark (access0, _), Pos.Mark (access1, _)) -> + let fold_access access acc = + match access with + | Com.VarAccess (m_sp_opt, m_v) -> + let acc = fold_sp m_sp_opt env acc in + fold_var m_sp_opt m_v Both env acc + | Com.TabAccess (m_sp_opt, m_v, m_i) -> + let acc = fold_sp m_sp_opt env acc in + let acc = fold_var m_sp_opt m_v Table env acc in + fold_aux acc m_i env + | Com.FieldAccess (m_sp_opt, e, f, _) -> + if env.proc_type = Filter then + Err.forbidden_expresion_in_filter expr_pos; + let acc = fold_sp m_sp_opt env acc in + let f_name, f_pos = Pos.to_couple f in + (match StrMap.find_opt f_name env.prog.prog_event_fields with + | Some ef when ef.is_var -> () + | Some _ -> Err.event_field_is_not_a_reference f_name f_pos + | None -> Err.unknown_event_field f_name f_pos); + fold_aux acc e env + in + acc |> fold_access access0 |> fold_access access1 | NbAnomalies | NbDiscordances | NbInformatives | NbBloquantes -> if env.proc_type = Filter then Err.forbidden_expresion_in_filter expr_pos; acc @@ -1402,9 +1506,12 @@ let check_variable (m_sp_opt : Com.var_space) (m_vn : Com.m_var_name) let id = StrMap.find v_name env.vars in IntMap.find id env.prog.prog_dict in - let var_loc = Com.Var.cat_var_loc var in - if not (Com.CatVar.LocMap.mem var_loc vsd.vs_cats) then - Err.variable_not_in_var_space v_name sp_name (Pos.get m_vn) + if Com.Var.is_tgv var then ( + let var_loc = Com.Var.cat_var_loc var in + if not (Com.CatVar.LocMap.mem var_loc vsd.vs_cats) then + Err.variable_not_in_var_space v_name sp_name (Pos.get m_vn)) + else if Com.Var.is_temp var then + Err.tmp_var_has_no_var_space v_name (Pos.get m_vn) let check_expression (env : var_env) (m_expr : Mast.m_expression) : unit = let get_var m_v = Pos.same (Com.get_normal_var @@ Pos.unmark m_v) m_v in @@ -1540,7 +1647,7 @@ let rec check_instructions (env : var_env) Pos.mark (Com.TabAccess (m_sp_opt, m_v', m_i')) apos | Com.FieldAccess (m_sp_opt, m_i, f, id) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules (Pos.get m_a); + Err.instruction_forbidden_in_rules (Pos.get m_a); check_var_space m_sp_opt env; let f_name, f_pos = Pos.to_couple f in (match StrMap.find_opt f_name env.prog.prog_event_fields with @@ -1572,7 +1679,7 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark instr' instr_pos :: res) il | Com.SingleFormula (EventFieldRef (m_i, f, iFmt, m_v)) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let f_name, f_pos = Pos.to_couple f in (match StrMap.find_opt f_name env.prog.prog_event_fields with | Some ef when ef.is_var -> () @@ -1614,7 +1721,7 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark wde_res instr_pos :: res) il | Com.ComputeDomain (rdom, m_sp_opt) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let tname = get_compute_domain_id_str rdom env.prog in let rdom_list, rdom_pos = Pos.to_couple rdom in let id = Com.DomainId.from_marked_list rdom_list in @@ -1638,7 +1745,7 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark res_instr instr_pos :: res) il | Com.ComputeChaining (chain, m_sp_opt) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let tname = get_compute_chaining_id_str chain env.prog in let prog_call_map = let sp_opt = get_sp_opt m_sp_opt in @@ -1653,7 +1760,7 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark res_instr instr_pos :: res) il | Com.ComputeVerifs (vdom, expr, m_sp_opt) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let vdom_list, vdom_pos = Pos.to_couple vdom in let tname = get_compute_verifs_id_str vdom env.prog in let id = Com.DomainId.from_marked_list vdom_list in @@ -1678,14 +1785,14 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark res_instr instr_pos :: res) il | Com.VerifBlock instrs -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let prog, res_instrs = check_instructions env instrs in let env = { env with prog } in let res_instr = Com.VerifBlock res_instrs in aux (env, Pos.mark res_instr instr_pos :: res) il | Com.ComputeTarget (Pos.Mark (tn, tpos), targs, m_sp_opt) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; (match StrMap.find_opt tn env.prog.prog_targets with | None -> Err.unknown_target tn tpos | Some target -> @@ -1756,7 +1863,7 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark instr' instr_pos :: res) il | Com.Iterate (var, al, var_params, instrs) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let m_name = check_it_var env var in let env' = let v = Com.Var.new_ref ~name:m_name in @@ -1789,7 +1896,11 @@ let rec check_instructions (env : var_env) (vcats, map_expr env' expr, m_sp_opt)) var_params in - let prog, instrs' = check_instructions env' instrs in + let env'' = + let new_scope = Com.get_var_name @@ Pos.unmark var in + { env' with scopes = new_scope :: env'.scopes } + in + let prog, instrs' = check_instructions env'' instrs in let env = { env with prog } in let instr' = Com.Iterate (var', al', var_params', instrs') in aux (env, Pos.mark instr' instr_pos :: res) il @@ -1809,13 +1920,17 @@ let rec check_instructions (env : var_env) (e0', e1', step')) var_intervals in - let prog, instrs' = check_instructions env' instrs in + let env'' = + let new_scope = Com.get_var_name @@ Pos.unmark var in + { env' with scopes = new_scope :: env'.scopes } + in + let prog, instrs' = check_instructions env'' instrs in let env = { env with prog } in let instr' = Com.Iterate_values (var', var_intervals', instrs') in aux (env, Pos.mark instr' instr_pos :: res) il | Com.Restore (al, var_params, evts, evtfs, instrs) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let al' = List.map (check_m_access ~onlyVar:true Both env) al in let env, var_params' = let fold (env, var_params') (var, vcats, expr, m_sp_opt) = @@ -1877,7 +1992,7 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark instr' instr_pos :: res) il | Com.ArrangeEvents (sort, filter, add, instrs) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let env, sort' = match sort with | Some (var0, var1, expr) -> @@ -1915,9 +2030,24 @@ let rec check_instructions (env : var_env) let env = { env with prog } in let instr' = Com.ArrangeEvents (sort', filter', add', instrs') in aux (env, Pos.mark instr' instr_pos :: res) il + | Com.Switch (e, l) -> + let e' = map_expr env e in + let _cases, env, rev_l' = + List.fold_left + (fun (cases, env, rev_l') (cl, l) -> + match List.find (fun c -> List.mem c cases) cl with + | c -> Err.non_exclusive_cases c instr_pos + | exception Not_found -> + let prog, l'elt = check_instructions env l in + (cl @ cases, { env with prog }, (cl, l'elt) :: rev_l')) + ([], env, []) l + in + let l' = List.rev rev_l' in + let res_instr = Com.Switch (e', l') in + aux (env, Pos.mark res_instr instr_pos :: res) il | Com.RaiseError (m_err, m_var_opt) -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; let err_name, err_pos = Pos.to_couple m_err in (match StrMap.find_opt err_name env.prog.prog_errors with | None -> Err.unknown_error err_pos @@ -1936,16 +2066,41 @@ let rec check_instructions (env : var_env) aux (env, Pos.mark instr' instr_pos :: res) il | Com.CleanErrors -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; aux (env, Pos.mark Com.CleanErrors instr_pos :: res) il + | Com.CleanFinalizedErrors -> + if env.proc_type = Rule then + Err.instruction_forbidden_in_rules instr_pos; + aux (env, Pos.mark Com.CleanFinalizedErrors instr_pos :: res) il | Com.ExportErrors -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; + Err.instruction_forbidden_in_rules instr_pos; aux (env, Pos.mark Com.ExportErrors instr_pos :: res) il | Com.FinalizeErrors -> if env.proc_type = Rule then - Err.insruction_forbidden_in_rules instr_pos; - aux (env, Pos.mark Com.FinalizeErrors instr_pos :: res) il) + Err.instruction_forbidden_in_rules instr_pos; + aux (env, Pos.mark Com.FinalizeErrors instr_pos :: res) il + | Com.Stop scope -> + if env.proc_type = Rule then + Err.instruction_forbidden_in_rules instr_pos; + (match (scope, env.proc_type) with + | SKApplication, _ -> () + | SKTarget, Target _ -> () + | SKTarget, _ -> Err.instruction_forbidden_outside_target instr_pos + | SKFun, Func -> () + | SKFun, _ -> Err.instruction_forbidden_outside_function instr_pos + | SKId scope, _ -> ( + (* TODO: allow it in rules to exit *) + if env.proc_type = Rule then + Err.instruction_forbidden_in_rules instr_pos; + (match env.scopes with + | [] -> Err.stop_outside_scope ?scope instr_pos + | _ -> ()); + match scope with + | Some s when not (List.mem s env.scopes) -> + Err.stop_with_invalid_scope s env.scopes instr_pos + | _ -> ())); + aux (env, Pos.mark (Com.Stop scope) instr_pos :: res) il) in let env, res = aux (env, []) instrs in (env.prog, res) @@ -2049,9 +2204,9 @@ let rec inout_instrs (env : var_env) (tmps : Pos.t StrMap.t) StrMap.add vn def_list def_vars in aux (tmps, in_vars, out_vars, def_vars) il - | FieldAccess _ -> Err.insruction_forbidden_in_rules instr_pos) + | FieldAccess _ -> Err.instruction_forbidden_in_rules instr_pos) | Com.SingleFormula (EventFieldRef _) -> - Err.insruction_forbidden_in_rules instr_pos + Err.instruction_forbidden_in_rules instr_pos | Com.MultipleFormulaes _ -> assert false) | Com.IfThenElse (expr, i_then, i_else) -> let in_expr = inout_expression env expr in @@ -2068,6 +2223,25 @@ let rec inout_instrs (env : var_env) (tmps : Pos.t StrMap.t) merge_seq_defs def_vars (merge_par_defs def_then def_else) in aux (tmps, in_vars, out_vars, def_vars) il + | Com.Switch (e, l) -> + let in_expr = inout_expression env e in + (* Reversed order, but it does not matter *) + let in_l, out_l, def_l = + List.fold_left + (fun (il, ol, dl) (_, l) -> + let i, o, d = inout_instrs env tmps l in + (i :: il, o :: ol, d :: dl)) + ([], [], []) l + in + let in_vars = + StrMap.union_snd in_expr + @@ List.fold_left StrMap.union_snd in_vars in_l + and out_vars = List.fold_left StrMap.union_snd out_vars out_l + and def_vars = + merge_seq_defs def_vars + @@ List.fold_left merge_par_defs StrMap.empty def_l + in + aux (tmps, in_vars, out_vars, def_vars) il | Com.WhenDoElse (wdl, ed) -> let rec wde (in_vars, out_vars, def_vars) = function | (expr, dl, _pos) :: l -> @@ -2096,9 +2270,13 @@ let rec inout_instrs (env : var_env) (tmps : Pos.t StrMap.t) aux (tmps, in_vars, out_vars, def_vars) il | Com.ComputeDomain _ | Com.ComputeChaining _ | Com.ComputeVerifs _ | Com.VerifBlock _ | Com.ComputeTarget _ -> - Err.insruction_forbidden_in_rules instr_pos + Err.instruction_forbidden_in_rules instr_pos | Com.Print _ -> aux (tmps, in_vars, out_vars, def_vars) il - | Com.Iterate _ -> Err.insruction_forbidden_in_rules instr_pos + | Com.Iterate _ -> Err.instruction_forbidden_in_rules instr_pos + | Com.Stop SKFun -> aux (tmps, in_vars, out_vars, def_vars) il + | Com.Stop _ -> + Err.instruction_forbidden_in_rules instr_pos + (* TODO: allow in rules to exit *) | Com.Iterate_values (m_id, var_intervals, instrs) -> let var_name, var_pos = let var = IntMap.find (Pos.unmark m_id) env.prog.prog_dict in @@ -2128,11 +2306,12 @@ let rec inout_instrs (env : var_env) (tmps : Pos.t StrMap.t) in let def_vars = merge_seq_defs def_vars def_instrs in aux (tmps', in_vars, out_vars, def_vars) il - | Com.Restore _ -> Err.insruction_forbidden_in_rules instr_pos - | Com.ArrangeEvents _ -> Err.insruction_forbidden_in_rules instr_pos - | Com.RaiseError _ -> Err.insruction_forbidden_in_rules instr_pos - | Com.CleanErrors | Com.ExportErrors | Com.FinalizeErrors -> - Err.insruction_forbidden_in_rules instr_pos) + | Com.Restore _ -> Err.instruction_forbidden_in_rules instr_pos + | Com.ArrangeEvents _ -> Err.instruction_forbidden_in_rules instr_pos + | Com.RaiseError _ -> Err.instruction_forbidden_in_rules instr_pos + | Com.CleanErrors | Com.CleanFinalizedErrors | Com.ExportErrors + | Com.FinalizeErrors -> + Err.instruction_forbidden_in_rules instr_pos) in let tmps', in_vars, out_vars, def_vars = aux (tmps, StrMap.empty, StrMap.empty, StrMap.empty) instrs @@ -2276,7 +2455,7 @@ let check_target (proc_type : proc_type) (t : Mast.target) (prog : program) : (* Already checked during preprocessing *) t.target_apps in - let env = new_var_env ~vars:prog.prog_vars prog proc_type in + let env = new_var_env ~vars:prog.prog_varalias prog proc_type in let env, target_args, target_result, target_tmp_vars, target_prog = check_code env target_name t.target_tmp_vars t.target_args t.target_result t.target_prog @@ -2337,7 +2516,7 @@ let check_rule (r : Mast.rule) (prog : program) : program = in StrMap.fold fold r.rule_chainings (StrMap.empty, prog.prog_chainings) in - let env = new_var_env ~vars:prog.prog_vars prog Rule in + let env = new_var_env ~vars:prog.prog_varalias prog Rule in let env, _, _, rule_tmp_vars, rule_instrs = check_code env (Pos.without "") r.rule_tmp_vars [] None r.rule_formulaes in @@ -2747,7 +2926,7 @@ let check_verif (v : Mast.verification) (prog : program) : program = in (match verif_var with | Some (Pos.Mark (var_name, var_pos)) -> ( - match StrMap.find_opt var_name prog.prog_vars with + match StrMap.find_opt var_name prog.prog_varalias with | None -> Err.unknown_variable var_pos | Some _ -> ()) | None -> ()); @@ -2772,7 +2951,7 @@ let check_verif (v : Mast.verification) (prog : program) : program = (vdom_sts, var_sts) in let init = (Com.CatVar.Map.empty, StrMap.empty) in - let env = new_var_env ~vars:prog.prog_vars prog Verif in + let env = new_var_env ~vars:prog.prog_varalias prog Verif in fold_var_expr get_var fold_sp fold_var init verif_expr env in let verif_seq, prog = get_seq prog in @@ -2812,7 +2991,7 @@ let convert_verifs (prog : program) : program = let target_prog = let map_var m_v = let name = Com.get_normal_var (Pos.unmark m_v) in - let id = StrMap.find name prog.prog_vars in + let id = StrMap.find name prog.prog_varalias in Pos.same id m_v in List.map @@ -2866,24 +3045,39 @@ let eval_expr_verif (prog : program) (verif : verif) | Var _ -> Err.variable_forbidden_in_filter (Pos.get expr) | Attribut (Pos.Mark (VarAccess (_, m_v), _), m_attr) -> let var_name = Com.get_normal_var @@ Pos.unmark m_v in - let id = StrMap.find var_name prog.prog_vars in + let id = StrMap.find var_name prog.prog_varalias in let var = IntMap.find id prog.prog_dict in let attrs = Com.Var.attrs var in let m_val = StrMap.find (Pos.unmark m_attr) attrs in Some (float (Pos.unmark m_val)) | Size (Pos.Mark (VarAccess (_, m_v), _)) -> let var_name = Com.get_normal_var @@ Pos.unmark m_v in - let id = StrMap.find var_name prog.prog_vars in + let id = StrMap.find var_name prog.prog_varalias in let var = IntMap.find id prog.prog_dict in Some (float @@ Com.Var.size @@ var) - | IsVariable (Pos.Mark (VarAccess (_, m_v), _), m_name) -> ( + | Type (Pos.Mark (VarAccess (_, m_v), _), Pos.Mark (typ, _)) -> let var_name = Com.get_normal_var @@ Pos.unmark m_v in - let id = StrMap.find var_name prog.prog_vars in + let id = StrMap.find var_name prog.prog_varalias in let var = IntMap.find id prog.prog_dict in - if Pos.unmark m_name = Com.Var.name_str var then Some 1.0 + if Com.Var.is_tgv var then + Some (if Com.Var.typ var = Some typ then 1.0 else 0.0) + else Err.variable_forbidden_in_filter (Pos.get expr) + | SameVariable + (Pos.Mark (VarAccess (_, m_v0), _), Pos.Mark (VarAccess (_, m_v1), _)) + -> ( + let var_alias m_v = + let var_name = Com.get_normal_var @@ Pos.unmark m_v in + let id = StrMap.find var_name prog.prog_varalias in + let var = IntMap.find id prog.prog_dict in + (Com.Var.name_str var, Com.Var.alias var) + in + let n0, a0_opt = var_alias m_v0 in + let n1, a1_opt = var_alias m_v1 in + if n0 = n1 then Some 1.0 else - match Com.Var.alias var with - | Some m_alias when Pos.unmark m_alias = Pos.unmark m_name -> Some 1.0 + match (a0_opt, a1_opt) with + | Some m_a0, Some m_a1 when Pos.unmark m_a0 = Pos.unmark m_a1 -> + Some 1.0 | _ -> Some 0.0) | NbCategory cs -> let cats = mast_to_catvars cs prog.prog_var_cats in @@ -3011,7 +3205,8 @@ let eval_expr_verif (prog : program) (verif : verif) in Some (if res = positive then 1.0 else 0.0)) | NbAnomalies | NbDiscordances | NbInformatives | NbBloquantes - | FuncCallLoop _ | Loop _ | Attribut _ | Size _ | IsVariable _ -> + | FuncCallLoop _ | Loop _ | Attribut _ | Size _ | Type _ | SameVariable _ + | InDomain _ -> assert false in aux expr diff --git a/src/mlang/m_frontend/validator.mli b/src/mlang/m_frontend/validator.mli index f01a3b781..4e3218242 100644 --- a/src/mlang/m_frontend/validator.mli +++ b/src/mlang/m_frontend/validator.mli @@ -67,6 +67,7 @@ type program = { prog_dict : Com.Var.t IntMap.t; prog_vars : int StrMap.t; prog_alias : int StrMap.t; + prog_varalias : int StrMap.t; prog_var_spaces : int StrMap.t; prog_var_spaces_idx : Com.variable_space IntMap.t; prog_event_fields : Com.event_field StrMap.t; diff --git a/src/mlang/m_ir/com.ml b/src/mlang/m_ir/com.ml index 5af0bfd95..5e3db3e24 100644 --- a/src/mlang/m_ir/com.ml +++ b/src/mlang/m_ir/com.ml @@ -1,6 +1,12 @@ module CatVar = struct type t = Input of StrSet.t | Computed of { is_base : bool } + let all_inputs = Input (StrSet.one "*") + + let is_input = function Input _ -> true | _ -> false + + let is_computed = function Computed _ -> true | _ -> false + let pp fmt = function | Input id -> let pp fmt set = StrSet.iter (Format.fprintf fmt " %s") set in @@ -432,6 +438,8 @@ type variable_space = { type literal = Float of float | Undefined +type case = Default | Value of literal + (** Unary operators *) type unop = Not | Minus @@ -512,7 +520,9 @@ and 'v expression = | NbCategory of Pos.t CatVar.Map.t | Attribut of 'v m_access * string Pos.marked | Size of 'v m_access - | IsVariable of 'v m_access * string Pos.marked + | Type of 'v m_access * value_typ Pos.marked + | SameVariable of 'v m_access * 'v m_access + | InDomain of 'v m_access * Pos.t CatVar.Map.t | NbAnomalies | NbDiscordances | NbInformatives @@ -602,6 +612,14 @@ type 'v formula = | SingleFormula of 'v formula_decl | MultipleFormulaes of 'v formula_loop * 'v formula_decl +type stop_kind = + | SKApplication (* Leave the whole application *) + | SKTarget (* Leave the current target *) + | SKFun (* Leave the current function *) + | SKId of string option +(* Leave the iterator with the selected var + (or the current if [None]) *) + type ('v, 'e) instruction = | Affectation of 'v formula Pos.marked | IfThenElse of @@ -638,10 +656,13 @@ type ('v, 'e) instruction = * ('v * 'v m_expression) option * 'v m_expression option * ('v, 'e) m_instruction list + | Switch of ('v m_expression * (case list * ('v, 'e) m_instruction list) list) | RaiseError of 'e Pos.marked * string Pos.marked option | CleanErrors + | CleanFinalizedErrors | ExportErrors | FinalizeErrors + | Stop of stop_kind and ('v, 'e) m_instruction = ('v, 'e) instruction Pos.marked @@ -741,9 +762,14 @@ and expr_map_var f = function let m_access' = m_access_map_var f m_access in Attribut (m_access', attr) | Size m_access -> Size (m_access_map_var f m_access) - | IsVariable (m_access, name) -> + | Type (m_access, m_typ) -> Type (m_access_map_var f m_access, m_typ) + | SameVariable (m_access0, m_access1) -> + let m_access0' = m_access_map_var f m_access0 in + let m_access1' = m_access_map_var f m_access1 in + SameVariable (m_access0', m_access1') + | InDomain (m_access, cvm) -> let m_access' = m_access_map_var f m_access in - IsVariable (m_access', name) + InDomain (m_access', cvm) | NbAnomalies -> NbAnomalies | NbDiscordances -> NbDiscordances | NbInformatives -> NbInformatives @@ -783,6 +809,12 @@ and instr_map_var f g = function let m_il0' = List.map (m_instr_map_var f g) m_il0 in let m_il1' = List.map (m_instr_map_var f g) m_il1 in IfThenElse (m_e0', m_il0', m_il1') + | Switch (e, l) -> + let e' = m_expr_map_var f e in + let l' = + List.map (fun (c, l) -> (c, List.map (m_instr_map_var f g) l)) l + in + Switch (e', l') | WhenDoElse (m_eil, m_il) -> let map (m_e0, m_il0, pos) = let m_e0' = m_expr_map_var f m_e0 in @@ -872,8 +904,10 @@ and instr_map_var f g = function let m_err' = Pos.map g m_err in RaiseError (m_err', m_s_opt) | CleanErrors -> CleanErrors + | CleanFinalizedErrors -> CleanFinalizedErrors | ExportErrors -> ExportErrors | FinalizeErrors -> FinalizeErrors + | Stop s -> Stop s and m_instr_map_var f g m_i = Pos.map (instr_map_var f g) m_i @@ -949,7 +983,12 @@ and expr_fold_var f e acc = | NbCategory _ -> acc | Attribut (m_access, _) -> m_access_fold_var Info f m_access acc | Size m_access -> m_access_fold_var Info f m_access acc - | IsVariable (m_access, _) -> m_access_fold_var Info f m_access acc + | Type (m_access, _) -> m_access_fold_var Info f m_access acc + | SameVariable (m_access0, m_access1) -> + acc + |> m_access_fold_var Info f m_access0 + |> m_access_fold_var Info f m_access1 + | InDomain (m_access, _) -> m_access_fold_var Info f m_access acc | NbAnomalies -> acc | NbDiscordances -> acc | NbInformatives -> acc @@ -989,6 +1028,9 @@ and instr_fold_var f instr acc = acc |> m_expr_fold_var f m_e0 |> fold_list (m_instr_fold_var f) m_il0 |> fold_list (m_instr_fold_var f) m_il1 + | Switch (e, l) -> + acc |> m_expr_fold_var f e + |> fold_list (fun (_, l) -> fold_list (m_instr_fold_var f) l) l | WhenDoElse (m_eil, m_il) -> let fold (m_e0, m_il0, _) accu = accu |> m_expr_fold_var f m_e0 |> fold_list (m_instr_fold_var f) m_il0 @@ -1046,8 +1088,10 @@ and instr_fold_var f instr acc = |> fold_list (m_instr_fold_var f) m_il | RaiseError _ -> acc | CleanErrors -> acc + | CleanFinalizedErrors -> acc | ExportErrors -> acc | FinalizeErrors -> acc + | Stop _ -> acc and m_instr_fold_var f m_i acc = instr_fold_var f (Pos.unmark m_i) acc @@ -1069,6 +1113,10 @@ let format_literal fmt l = Format.pp_print_string fmt (match l with Float f -> string_of_float f | Undefined -> "indefini") +let format_case fmt = function + | Default -> Format.pp_print_string fmt "default" + | Value v -> format_literal fmt v + let format_atom form_var fmt vl = match vl with | AtomVar v -> form_var fmt v @@ -1229,10 +1277,20 @@ let rec format_expression form_var fmt = Format.fprintf fmt "taille(%a)" (format_access form_var form_expr) (Pos.unmark m_acc) - | IsVariable (m_acc, name) -> - Format.fprintf fmt "est_variable(%a, %s)" + | Type (m_acc, m_typ) -> + Format.fprintf fmt "type(%a, %a)" + (format_access form_var form_expr) + (Pos.unmark m_acc) format_value_typ (Pos.unmark m_typ) + | SameVariable (m_acc0, m_acc1) -> + Format.fprintf fmt "est_variable(%a, %a)" + (format_access form_var form_expr) + (Pos.unmark m_acc0) + (format_access form_var form_expr) + (Pos.unmark m_acc1) + | InDomain (m_acc, cvm) -> + Format.fprintf fmt "dans_domaine(%a, %a)" (format_access form_var form_expr) - (Pos.unmark m_acc) (Pos.unmark name) + (Pos.unmark m_acc) (CatVar.Map.pp_keys ()) cvm | NbAnomalies -> Format.fprintf fmt "nb_anomalies()" | NbDiscordances -> Format.fprintf fmt "nb_discordances()" | NbInformatives -> Format.fprintf fmt "nb_informatives()" @@ -1297,6 +1355,14 @@ let rec format_instruction form_var form_err = | IfThenElse (cond, t, f) -> Format.fprintf fmt "if(%a):@\n@[ %a@]else:@\n@[ %a@]@\n" form_expr (Pos.unmark cond) form_instrs t form_instrs f + | Switch (e, l) -> + Format.fprintf fmt "switch (%a) : (@," form_expr (Pos.unmark e); + List.iter + (fun (cl, l) -> + List.iter (Format.fprintf fmt "%a :@," format_case) cl; + Format.fprintf fmt "@[ %a@]" form_instrs l) + l; + Format.fprintf fmt "@]@," | WhenDoElse (wdl, ed) -> let pp_wd th fmt (expr, dl, _) = Format.fprintf fmt "@[%swhen (%a) do@\n%a@;@]" th form_expr @@ -1463,8 +1529,14 @@ let rec format_instruction form_var form_err = Format.fprintf fmt "leve_erreur %a %s\n" form_err (Pos.unmark err) (match var_opt with Some var -> " " ^ Pos.unmark var | None -> "") | CleanErrors -> Format.fprintf fmt "nettoie_erreurs\n" + | CleanFinalizedErrors -> Format.fprintf fmt "nettoie_erreurs_finalisees\n" | ExportErrors -> Format.fprintf fmt "exporte_erreurs\n" | FinalizeErrors -> Format.fprintf fmt "finalise_erreurs\n" + | Stop (SKId None) -> Format.fprintf fmt "stop\n" + | Stop (SKId (Some s)) -> Format.fprintf fmt "stop %s\n" s + | Stop SKApplication -> Format.fprintf fmt "stop application\n" + | Stop SKFun -> Format.fprintf fmt "stop fonction\n" + | Stop SKTarget -> Format.fprintf fmt "stop cible\n" and format_instructions form_var form_err fmt instrs = Pp.list "" (Pp.unmark (format_instruction form_var form_err)) fmt instrs diff --git a/src/mlang/m_ir/com.mli b/src/mlang/m_ir/com.mli index 4484cb76b..25ba1f587 100644 --- a/src/mlang/m_ir/com.mli +++ b/src/mlang/m_ir/com.mli @@ -1,6 +1,12 @@ module CatVar : sig type t = Input of StrSet.t | Computed of { is_base : bool } + val all_inputs : t + + val is_input : t -> bool + + val is_computed : t -> bool + val pp : Format.formatter -> t -> unit val compare : t -> t -> int @@ -212,6 +218,8 @@ type verif_domain = verif_domain_data domain type literal = Float of float | Undefined +type case = Default | Value of literal + (** Unary operators *) type unop = Not | Minus @@ -308,7 +316,9 @@ and 'v expression = | NbCategory of Pos.t CatVar.Map.t | Attribut of 'v m_access * string Pos.marked | Size of 'v m_access - | IsVariable of 'v m_access * string Pos.marked + | Type of 'v m_access * value_typ Pos.marked + | SameVariable of 'v m_access * 'v m_access + | InDomain of 'v m_access * Pos.t CatVar.Map.t | NbAnomalies | NbDiscordances | NbInformatives @@ -368,6 +378,14 @@ type 'v formula = | SingleFormula of 'v formula_decl | MultipleFormulaes of 'v formula_loop * 'v formula_decl +type stop_kind = + | SKApplication (* Leave the whole application *) + | SKTarget (* Leave the current target *) + | SKFun (* Leave the current function *) + | SKId of string option +(* Leave the iterator with the selected var + (or the current if [None]) *) + type ('v, 'e) instruction = | Affectation of 'v formula Pos.marked | IfThenElse of @@ -404,10 +422,13 @@ type ('v, 'e) instruction = * ('v * 'v m_expression) option * 'v m_expression option * ('v, 'e) m_instruction list + | Switch of ('v m_expression * (case list * ('v, 'e) m_instruction list) list) | RaiseError of 'e Pos.marked * string Pos.marked option | CleanErrors + | CleanFinalizedErrors | ExportErrors | FinalizeErrors + | Stop of stop_kind and ('v, 'e) m_instruction = ('v, 'e) instruction Pos.marked @@ -467,6 +488,8 @@ val format_value_typ : Pp.t -> value_typ -> unit val format_literal : Pp.t -> literal -> unit +val format_case : Pp.t -> case -> unit + val format_atom : (Pp.t -> 'v -> unit) -> Pp.t -> 'v atom -> unit val format_loop_variables : diff --git a/src/mlang/m_ir/dune b/src/mlang/m_ir/dune new file mode 100644 index 000000000..abe71cfaf --- /dev/null +++ b/src/mlang/m_ir/dune @@ -0,0 +1,6 @@ +(library + (public_name mlang.ir) + (name m_ir) + (flags + (:standard -open Utils)) + (libraries utils num gmp re)) diff --git a/src/mlang/m_ir/mir.ml b/src/mlang/m_ir/mir.ml index 8c8548ac1..d1c6c5049 100644 --- a/src/mlang/m_ir/mir.ml +++ b/src/mlang/m_ir/mir.ml @@ -113,16 +113,16 @@ let find_var_by_name (p : program) (name : string Pos.marked) : Com.Var.t = with Not_found -> Errors.raise_spanned_error "unknown variable" (Pos.get name)) -let rec expand_functions_expr (e : 'var Com.expression Pos.marked) : - 'var Com.expression Pos.marked = +let rec expand_functions_expr (p : program) (e : 'var Com.expression Pos.marked) + : 'var Com.expression Pos.marked = let open Com in match Pos.unmark e with | TestInSet (positive, e0, values) -> - let new_e0 = expand_functions_expr e0 in + let new_e0 = expand_functions_expr p e0 in let new_values = let map = function | Com.VarValue m_a -> - let a' = expand_functions_access (Pos.unmark m_a) in + let a' = expand_functions_access p (Pos.unmark m_a) in Com.VarValue (Pos.same a' m_a) | value -> value in @@ -130,23 +130,23 @@ let rec expand_functions_expr (e : 'var Com.expression Pos.marked) : in Pos.same (TestInSet (positive, new_e0, new_values)) e | Comparison (op, e1, e2) -> - let new_e1 = expand_functions_expr e1 in - let new_e2 = expand_functions_expr e2 in + let new_e1 = expand_functions_expr p e1 in + let new_e2 = expand_functions_expr p e2 in Pos.same (Comparison (op, new_e1, new_e2)) e | Binop (op, e1, e2) -> - let new_e1 = expand_functions_expr e1 in - let new_e2 = expand_functions_expr e2 in + let new_e1 = expand_functions_expr p e1 in + let new_e2 = expand_functions_expr p e2 in Pos.same (Binop (op, new_e1, new_e2)) e | Unop (op, e1) -> - let new_e1 = expand_functions_expr e1 in + let new_e1 = expand_functions_expr p e1 in Pos.same (Unop (op, new_e1)) e | Conditional (e1, e2, e3) -> - let new_e1 = expand_functions_expr e1 in - let new_e2 = expand_functions_expr e2 in - let new_e3 = Option.map expand_functions_expr e3 in + let new_e1 = expand_functions_expr p e1 in + let new_e2 = expand_functions_expr p e2 in + let new_e3 = Option.map (expand_functions_expr p) e3 in Pos.same (Conditional (new_e1, new_e2, new_e3)) e | Var access -> - let e' = Var (expand_functions_access access) in + let e' = Var (expand_functions_access p access) in Pos.same e' e | Literal _ -> e | FuncCall (Pos.Mark (SumFunc, _), args) -> @@ -154,13 +154,13 @@ let rec expand_functions_expr (e : 'var Com.expression Pos.marked) : List.fold_left (fun acc_opt arg -> match acc_opt with - | None -> Some (Pos.unmark (expand_functions_expr arg)) + | None -> Some (Pos.unmark (expand_functions_expr p arg)) | Some acc -> Some (Binop ( Pos.same Com.Add e, Pos.same acc e, - expand_functions_expr arg ))) + expand_functions_expr p arg ))) None args in let expr = @@ -171,55 +171,80 @@ let rec expand_functions_expr (e : 'var Com.expression Pos.marked) : Pos.same (Comparison ( Pos.same Com.Gt e, - expand_functions_expr arg, + expand_functions_expr p arg, Pos.same (Literal (Float 0.0)) e )) e | FuncCall (Pos.Mark (GtezFunc, _), [ arg ]) -> Pos.same (Comparison ( Pos.same Com.Gte e, - expand_functions_expr arg, + expand_functions_expr p arg, Pos.same (Literal (Float 0.0)) e )) e | FuncCall ((Pos.Mark ((MinFunc | MaxFunc), _) as fn), [ arg1; arg2 ]) -> - let earg1 = expand_functions_expr arg1 in - let earg2 = expand_functions_expr arg2 in + let earg1 = expand_functions_expr p arg1 in + let earg2 = expand_functions_expr p arg2 in Pos.same (FuncCall (fn, [ earg1; earg2 ])) e | FuncCall ((Pos.Mark (AbsFunc, _) as fn), [ arg ]) -> - Pos.same (FuncCall (fn, [ expand_functions_expr arg ])) e + Pos.same (FuncCall (fn, [ expand_functions_expr p arg ])) e | FuncCall (Pos.Mark (NullFunc, _), [ arg ]) -> Pos.same (Comparison ( Pos.same Com.Eq e, - expand_functions_expr arg, + expand_functions_expr p arg, Pos.same (Literal (Float 0.0)) e )) e | FuncCall (fn, args) -> - Pos.same (FuncCall (fn, List.map expand_functions_expr args)) e + Pos.same (FuncCall (fn, List.map (expand_functions_expr p) args)) e | Attribut (m_a, attr) -> - let a' = expand_functions_access (Pos.unmark m_a) in + let a' = expand_functions_access p (Pos.unmark m_a) in let e' = Attribut (Pos.same a' m_a, attr) in Pos.same e' e | Size m_a -> - let a' = expand_functions_access (Pos.unmark m_a) in + let a' = expand_functions_access p (Pos.unmark m_a) in let e' = Size (Pos.same a' m_a) in Pos.same e' e - | IsVariable (m_a, name) -> - let a' = expand_functions_access (Pos.unmark m_a) in - let e' = IsVariable (Pos.same a' m_a, name) in + | Type (m_a, m_typ) -> + let a' = expand_functions_access p (Pos.unmark m_a) in + let e' = Type (Pos.same a' m_a, m_typ) in Pos.same e' e + | SameVariable (m_a0, m_a1) -> + let a0' = expand_functions_access p (Pos.unmark m_a0) in + let a1' = expand_functions_access p (Pos.unmark m_a1) in + let e' = SameVariable (Pos.same a0' m_a0, Pos.same a1' m_a1) in + Pos.same e' e + | InDomain (m_a, cvm) -> + let a' = expand_functions_access p (Pos.unmark m_a) in + let rec fold cv pos e_opt = + if Com.CatVar.compare cv Com.CatVar.all_inputs = 0 then + let cv_input = + p.program_var_categories + |> Com.CatVar.Map.filter (fun k _ -> Com.CatVar.is_input k) + |> Com.CatVar.Map.map (fun _ -> Pos.none) + in + Com.CatVar.Map.fold fold cv_input e_opt + else + let e'' = InDomain (Pos.same a' m_a, Com.CatVar.Map.one cv pos) in + match e_opt with + | None -> Some (Pos.same e'' e) + | Some m_e' -> + Some + (Pos.same (Binop (Pos.same Com.Or e, m_e', Pos.same e'' e)) e) + in + Option.get @@ Com.CatVar.Map.fold fold cvm None | NbAnomalies | NbDiscordances | NbInformatives | NbBloquantes | FuncCallLoop _ | Loop _ | NbCategory _ -> e -and expand_functions_access (access : 'var Com.access) : 'var Com.access = +and expand_functions_access (p : program) (access : 'var Com.access) : + 'var Com.access = match access with | VarAccess _ -> access | TabAccess (m_sp_opt, m_v, i) -> - let i' = expand_functions_expr i in + let i' = expand_functions_expr p i in TabAccess (m_sp_opt, m_v, i') | FieldAccess (m_sp_opt, v_i, f, i_f) -> - let m_i = expand_functions_expr v_i in + let m_i = expand_functions_expr p v_i in FieldAccess (m_sp_opt, m_i, f, i_f) let expand_functions (p : program) : program = @@ -228,27 +253,27 @@ let expand_functions (p : program) : program = let rec map_instr m_instr = match Pos.unmark m_instr with | Affectation (Pos.Mark (SingleFormula (VarDecl (m_a, v_expr)), pos)) -> - let m_expr = expand_functions_expr v_expr in + let m_expr = expand_functions_expr p v_expr in let m_a' = - let a' = expand_functions_access (Pos.unmark m_a) in + let a' = expand_functions_access p (Pos.unmark m_a) in Pos.same a' m_a in let form = SingleFormula (VarDecl (m_a', m_expr)) in Pos.same (Affectation (Pos.mark form pos)) m_instr | Affectation (Pos.Mark (SingleFormula (EventFieldRef (v_idx, f, i, v_id)), pos)) -> - let m_idx = expand_functions_expr v_idx in + let m_idx = expand_functions_expr p v_idx in let form = SingleFormula (EventFieldRef (m_idx, f, i, v_id)) in Pos.same (Affectation (Pos.mark form pos)) m_instr | Affectation (Pos.Mark (MultipleFormulaes _, _)) -> assert false | IfThenElse (i, t, e) -> - let i' = expand_functions_expr i in + let i' = expand_functions_expr p i in let t' = List.map map_instr t in let e' = List.map map_instr e in Pos.same (IfThenElse (i', t', e')) m_instr | WhenDoElse (wdl, ed) -> let map_wdl (expr, dl, pos) = - let expr' = expand_functions_expr expr in + let expr' = expand_functions_expr p expr in let dl' = List.map map_instr dl in (expr', dl', pos) in @@ -265,14 +290,14 @@ let expand_functions (p : program) : program = (fun m_arg -> match Pos.unmark m_arg with | Com.PrintAccess (info, m_a) -> - let a' = expand_functions_access (Pos.unmark m_a) in + let a' = expand_functions_access p (Pos.unmark m_a) in let m_a' = Pos.same a' m_a in Pos.same (Com.PrintAccess (info, m_a')) m_arg | Com.PrintIndent e -> - let e' = expand_functions_expr e in + let e' = expand_functions_expr p e in Pos.same (Com.PrintIndent e') m_arg | Com.PrintExpr (e, mi, ma) -> - let e' = expand_functions_expr e in + let e' = expand_functions_expr p e in Pos.same (Com.PrintExpr (e', mi, ma)) m_arg | Com.PrintString _ -> m_arg) pr_args @@ -282,7 +307,7 @@ let expand_functions (p : program) : program = let var_params' = List.map (fun (cats, e, m_sp_opt) -> - let e' = expand_functions_expr e in + let e' = expand_functions_expr p e in (cats, e', m_sp_opt)) var_params in @@ -292,9 +317,9 @@ let expand_functions (p : program) : program = let var_intervals' = List.map (fun (e0, e1, step) -> - let e0' = expand_functions_expr e0 in - let e1' = expand_functions_expr e1 in - let step' = expand_functions_expr step in + let e0' = expand_functions_expr p e0 in + let e1' = expand_functions_expr p e1 in + let step' = expand_functions_expr p step in (e0', e1', step')) var_intervals in @@ -302,12 +327,12 @@ let expand_functions (p : program) : program = Pos.same (Iterate_values (v_id, var_intervals', instrs')) m_instr | Restore (vars, var_params, evts, evtfs, instrs) -> let var_params' = - let map (v, cs, e, s) = (v, cs, expand_functions_expr e, s) in + let map (v, cs, e, s) = (v, cs, expand_functions_expr p e, s) in List.map map var_params in - let evts' = List.map expand_functions_expr evts in + let evts' = List.map (expand_functions_expr p) evts in let evtfs' = - List.map (fun (v, e) -> (v, expand_functions_expr e)) evtfs + List.map (fun (v, e) -> (v, expand_functions_expr p e)) evtfs in let instrs' = List.map map_instr instrs in let instr' = Restore (vars, var_params', evts', evtfs', instrs') in @@ -316,21 +341,27 @@ let expand_functions (p : program) : program = let sort' = match sort with | Some (var0, var1, expr) -> - let expr' = expand_functions_expr expr in + let expr' = expand_functions_expr p expr in Some (var0, var1, expr') | None -> None in let filter' = match filter with | Some (var, expr) -> - let expr' = expand_functions_expr expr in + let expr' = expand_functions_expr p expr in Some (var, expr') | None -> None in - let add' = Option.map expand_functions_expr add in + let add' = Option.map (expand_functions_expr p) add in let instrs' = List.map map_instr instrs in Pos.same (ArrangeEvents (sort', filter', add', instrs')) m_instr - | RaiseError _ | CleanErrors | ExportErrors | FinalizeErrors -> m_instr + | Switch (e, l) -> + let e' = expand_functions_expr p e in + let l' = List.map (fun (c, l) -> (c, List.map map_instr l)) l in + Pos.same (Switch (e', l')) m_instr + | RaiseError _ | CleanErrors | CleanFinalizedErrors | ExportErrors + | FinalizeErrors | Stop _ -> + m_instr | ComputeDomain _ | ComputeChaining _ | ComputeVerifs _ -> assert false in StrMap.map diff --git a/src/mlang/m_ir/mir_interpreter.ml b/src/mlang/m_ir/mir_interpreter.ml index e2c1b01bc..1b4041dc2 100644 --- a/src/mlang/m_ir/mir_interpreter.ml +++ b/src/mlang/m_ir/mir_interpreter.ml @@ -14,6 +14,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *) +exception Stop_instruction of Com.stop_kind + let exit_on_rte = ref true let repl_debug = ref false @@ -335,7 +337,7 @@ struct let bool_of_real (f : N.t) : bool = not N.(f =. zero ()) let compare_numbers op i1 i2 = - let epsilon = N.of_float !Cli.comparison_error_margin in + let epsilon = N.of_float !Config.comparison_error_margin in let open Com in match op with | Gt -> N.(i1 >. i2 +. epsilon) @@ -345,9 +347,12 @@ struct | Eq -> N.(N.abs (i1 -. i2) <. epsilon) | Neq -> N.(N.abs (i1 -. i2) >=. epsilon) - let get_var_space (ctx : ctx) = - let i_sp = ctx.ctx_var_space in - IntMap.find i_sp ctx.ctx_prog.program_var_spaces_idx + let get_var_space (ctx : ctx) (vsd_opt : Com.variable_space option) = + match vsd_opt with + | None -> + let i_sp = ctx.ctx_var_space in + IntMap.find i_sp ctx.ctx_prog.program_var_spaces_idx + | Some vsd -> vsd (* let get_var_space_opt (ctx : ctx) = function @@ -359,21 +364,23 @@ struct | Some vsd -> vsd *) let get_var_space_from (ctx : ctx) = function - | None -> get_var_space ctx - | Some (_, i_sp) -> IntMap.find i_sp ctx.ctx_prog.program_var_spaces_idx + | None -> None + | Some (_, i_sp) -> + Some (IntMap.find i_sp ctx.ctx_prog.program_var_spaces_idx) - let get_var (ctx : ctx) (vsd : Com.variable_space) (var : Com.Var.t) : - Com.variable_space * Com.Var.t * int = + let get_var (ctx : ctx) (vsd_opt : Com.variable_space option) + (var : Com.Var.t) : Com.variable_space * Com.Var.t * int = match var.scope with - | Com.Var.Tgv _ -> (vsd, var, 0) - | Com.Var.Temp _ -> (get_var_space ctx, var, ctx.ctx_tmps_org) + | Com.Var.Tgv _ -> (get_var_space ctx vsd_opt, var, 0) + | Com.Var.Temp _ -> (get_var_space ctx None, var, ctx.ctx_tmps_org) | Com.Var.Ref -> let rv = ctx.ctx_ref.(ctx.ctx_ref_org + Com.Var.loc_idx var) in - (rv.var_space, rv.ref_var, rv.org) + let vsd = match vsd_opt with None -> rv.var_space | Some vsd -> vsd in + (vsd, rv.ref_var, rv.org) - let get_var_tab (ctx : ctx) (vsd : Com.variable_space) (var : Com.Var.t) - (idx : int) : Com.Var.t = - let _, v, _ = get_var ctx vsd var in + let get_var_tab (ctx : ctx) (vsd_opt : Com.variable_space option) + (var : Com.Var.t) (idx : int) : Com.Var.t = + let _, v, _ = get_var ctx vsd_opt var in match Com.Var.get_table v with | Some _ -> ctx.ctx_tab_map.(Com.Var.loc_tab_idx v + 1 + idx) | None -> assert false @@ -385,15 +392,21 @@ struct | Com.Var.Tgv _ -> ( let var_space = ctx.ctx_var_spaces.(vsd.vs_id) in match Com.Var.cat_var_loc var with - | LocInput -> var_space.input.(vi) - | LocComputed -> var_space.computed.(vi) - | LocBase -> var_space.base.(vi)) + | LocInput -> + if Array.length var_space.input > 0 then var_space.input.(vi) + else Undefined + | LocComputed -> + if Array.length var_space.computed > 0 then var_space.computed.(vi) + else Undefined + | LocBase -> + if Array.length var_space.base > 0 then var_space.base.(vi) + else Undefined) | Com.Var.Temp _ -> ctx.ctx_tmps.(vi).value | Com.Var.Ref -> assert false - let get_var_value (ctx : ctx) (vsd : Com.variable_space) (var : Com.Var.t) : - value = - let vsd, var, vorg = get_var ctx vsd var in + let get_var_value (ctx : ctx) (vsd_opt : Com.variable_space option) + (var : Com.Var.t) : value = + let vsd, var, vorg = get_var ctx vsd_opt var in let var = if Com.Var.is_table var then ctx.ctx_tab_map.(Com.Var.loc_tab_idx var + 2) else var @@ -412,16 +425,21 @@ struct exception BlockingError + type zone_mem = + | ZoneVar of Com.variable_space * Com.Var.t + | ZoneField of int * int + | ZoneNil + let rec get_access_value ctx access = match access with | Com.VarAccess (m_sp_opt, v) -> - let vsd = get_var_space_from ctx m_sp_opt in - get_var_value ctx vsd v + let vsd_opt = get_var_space_from ctx m_sp_opt in + get_var_value ctx vsd_opt v | Com.TabAccess (m_sp_opt, m_v, m_idx) -> ( match evaluate_expr ctx m_idx with | Number z -> - let vsd = get_var_space_from ctx m_sp_opt in - let vsd, v, vorg = get_var ctx vsd m_v in + let vsd_opt = get_var_space_from ctx m_sp_opt in + let vsd, v, vorg = get_var ctx vsd_opt m_v in let i = Int64.to_int @@ N.to_int z in let sz = Com.Var.size v in if i < 0 then Number (N.zero ()) @@ -443,41 +461,41 @@ struct match events.(i).(j) with | Com.Numeric n -> n | Com.RefVar v -> - let vsd = get_var_space_from ctx m_sp_opt in - get_var_value ctx vsd v + let vsd_opt = get_var_space_from ctx m_sp_opt in + get_var_value ctx vsd_opt v else Undefined | _ -> Undefined) and get_access_var ctx access = match access with | Com.VarAccess (m_sp_opt, v) -> - let vsd = get_var_space_from ctx m_sp_opt in - let vsd, v, _ = get_var ctx vsd v in - Some (vsd, v) + let vsd_opt = get_var_space_from ctx m_sp_opt in + let vsd, v, _ = get_var ctx vsd_opt v in + ZoneVar (vsd, v) | Com.TabAccess (m_sp_opt, m_v, m_i) -> ( match evaluate_expr ctx m_i with | Number z -> - let vsd = get_var_space_from ctx m_sp_opt in - let vsd, v, _ = get_var ctx vsd m_v in + let vsd_opt = get_var_space_from ctx m_sp_opt in + let vsd, v, _ = get_var ctx vsd_opt m_v in let i = Int64.to_int @@ N.to_int z in if 0 <= i && i < Com.Var.size v then if Com.Var.is_table v then - Some (vsd, ctx.ctx_tab_map.(Com.Var.loc_tab_idx v + 1 + i)) - else Some (vsd, v) - else None - | Undefined -> None) + ZoneVar (vsd, ctx.ctx_tab_map.(Com.Var.loc_tab_idx v + 1 + i)) + else ZoneVar (vsd, v) + else ZoneNil + | Undefined -> ZoneNil) | Com.FieldAccess (m_sp_opt, m_e, _, j) -> ( match evaluate_expr ctx m_e with | Number z -> - let vsd = get_var_space_from ctx m_sp_opt in + let vsd_opt = get_var_space_from ctx m_sp_opt in let i = Int64.to_int @@ N.to_int z in let events = List.hd ctx.ctx_events in if 0 <= i && i < Array.length events then match events.(i).(j) with - | Com.RefVar v -> Some (vsd, v) - | Com.Numeric _ -> None - else None - | _ -> None) + | Com.RefVar v -> ZoneVar (get_var_space ctx vsd_opt, v) + | Com.Numeric _ -> ZoneField (i, j) + else ZoneNil + | _ -> ZoneNil) and set_var_value_org (ctx : ctx) (vsd : Com.variable_space) (var : Com.Var.t) (org : int) (value : value) : unit = @@ -486,15 +504,21 @@ struct | Com.Var.Tgv _ -> ( let var_space = ctx.ctx_var_spaces.(vsd.vs_id) in match Com.Var.cat_var_loc var with - | LocInput -> var_space.input.(vi) <- value - | LocComputed -> var_space.computed.(vi) <- value - | LocBase -> var_space.base.(vi) <- value) + | LocInput -> + if Array.length var_space.input > 0 then + var_space.input.(vi) <- value + | LocComputed -> + if Array.length var_space.computed > 0 then + var_space.computed.(vi) <- value + | LocBase -> + if Array.length var_space.base > 0 then var_space.base.(vi) <- value + ) | Com.Var.Temp _ -> ctx.ctx_tmps.(vi).value <- value | Com.Var.Ref -> assert false - and set_var_value (ctx : ctx) (vsd : Com.variable_space) (var : Com.Var.t) - (value : value) : unit = - let vsd, v, vorg = get_var ctx vsd var in + and set_var_value (ctx : ctx) (vsd_opt : Com.variable_space option) + (var : Com.Var.t) (value : value) : unit = + let vsd, v, vorg = get_var ctx vsd_opt var in if Com.Var.is_table v then for i = 0 to Com.Var.size v - 1 do let v' = ctx.ctx_tab_map.(Com.Var.loc_tab_idx v + 1 + i) in @@ -504,8 +528,13 @@ struct and set_access ctx access vexpr = match get_access_var ctx access with - | Some (vsd, v) -> set_var_value ctx vsd v @@ evaluate_expr ctx vexpr - | None -> () + | ZoneVar (vsd, v) -> + set_var_value ctx (Some vsd) v @@ evaluate_expr ctx vexpr + | ZoneField (i, j) -> + let events = List.hd ctx.ctx_events in + let value = evaluate_expr ctx vexpr in + events.(i).(j) <- Com.Numeric value + | ZoneNil -> () and evaluate_expr (ctx : ctx) (e : Mir.expression Pos.marked) : value = let comparison op new_e1 new_e2 = @@ -641,11 +670,11 @@ struct let var_arg2_opt = match Pos.unmark arg2 with | Var access -> get_access_var ctx access - | _ -> None + | _ -> ZoneNil in match var_arg2_opt with - | None -> Undefined - | Some (vsd, var_arg2) -> ( + | ZoneField _ | ZoneNil -> Undefined + | ZoneVar (vsd, var_arg2) -> ( let cast_to_int (v : value) : Int64.t option = match v with | Number f -> Some (N.to_int @@ roundf f) @@ -687,29 +716,59 @@ struct | FuncCall (_, _) -> assert false | Attribut (m_acc, a) -> ( match get_access_var ctx (Pos.unmark m_acc) with - | Some (vsd, v) -> ( - let _, v', _ = get_var ctx vsd v in + | ZoneVar (vsd, v) -> ( + let _, v', _ = get_var ctx (Some vsd) v in match StrMap.find_opt (Pos.unmark a) (Com.Var.attrs v') with | Some l -> Number (N.of_float (float (Pos.unmark l))) | None -> Undefined) - | None -> Undefined) + | ZoneField _ | ZoneNil -> Undefined) | Size m_acc -> ( match get_access_var ctx (Pos.unmark m_acc) with - | Some (vsd, v) -> - let _, v', _ = get_var ctx vsd v in + | ZoneVar (vsd, v) -> + let _, v', _ = get_var ctx (Some vsd) v in Number (N.of_float @@ float @@ Com.Var.size v') - | None -> Undefined) - | IsVariable (m_acc, m_name) -> ( + | ZoneField _ -> Number (N.one ()) + | ZoneNil -> Undefined) + | Type (m_acc, m_typ) -> ( match get_access_var ctx (Pos.unmark m_acc) with - | Some (vsd, v) -> ( - let _, v', _ = get_var ctx vsd v in - let name = Pos.unmark m_name in - if Com.Var.name_str v' = name then Number (N.one ()) - else - match Com.Var.alias v' with - | Some m_a when Pos.unmark m_a = name -> Number (N.one ()) - | _ -> Number (N.zero ())) - | None -> Number (N.zero ())) + | ZoneVar (vsd, v) -> + let _, v', _ = get_var ctx (Some vsd) v in + if Com.Var.is_tgv v' && Com.Var.typ v' = Some (Pos.unmark m_typ) + then Number (N.one ()) + else Number (N.zero ()) + | ZoneField _ -> Undefined + | ZoneNil -> Undefined) + | SameVariable (m_acc0, m_acc1) -> ( + match get_access_var ctx (Pos.unmark m_acc0) with + | ZoneVar (vsd0, v0) -> ( + let _, v0', _ = get_var ctx (Some vsd0) v0 in + match get_access_var ctx (Pos.unmark m_acc1) with + | ZoneVar (vsd1, v1) -> ( + let _, v1', _ = get_var ctx (Some vsd1) v1 in + if Com.Var.name_str v0' = Com.Var.name_str v1' then + Number (N.one ()) + else + match (Com.Var.alias v0', Com.Var.alias v1') with + | Some m_a0, Some m_a1 + when Pos.unmark m_a0 = Pos.unmark m_a1 -> + Number (N.one ()) + | _ -> Number (N.zero ())) + | ZoneField _ | ZoneNil -> Number (N.zero ())) + | ZoneField (i0, j0) -> ( + match get_access_var ctx (Pos.unmark m_acc1) with + | ZoneField (i1, j1) -> + if i0 = j0 && i1 = j1 then Number (N.one ()) + else Number (N.zero ()) + | ZoneVar _ | ZoneNil -> Number (N.zero ())) + | ZoneNil -> Number (N.zero ())) + | InDomain (m_acc, cvm) -> ( + match get_access_var ctx (Pos.unmark m_acc) with + | ZoneVar (vsd, v) -> + let _, v', _ = get_var ctx (Some vsd) v in + if Com.Var.is_tgv v' && Com.CatVar.Map.mem (Com.Var.cat v') cvm + then Number (N.one ()) + else Number (N.zero ()) + | ZoneField _ | ZoneNil -> Number (N.zero ())) | NbAnomalies -> Number (N.of_float (float ctx.ctx_nb_anos)) | NbDiscordances -> Number (N.of_float (float ctx.ctx_nb_discos)) | NbInformatives -> Number (N.of_float (float ctx.ctx_nb_infos)) @@ -763,6 +822,25 @@ struct | Number z when N.(z =. zero ()) -> evaluate_stmts canBlock ctx f | Number _ -> evaluate_stmts canBlock ctx t | Undefined -> ()) + | Com.Switch (c, l) -> ( + let v = evaluate_expr ctx c in + let exception INTERNAL_STOP_SWITCH in + let then_ () = raise INTERNAL_STOP_SWITCH in + try + List.iter + (fun (cases, stmts) -> + List.iter + (fun case -> + match (case, v) with + | Com.Default, _ | Value Undefined, Undefined -> + evaluate_stmts ~then_ canBlock ctx stmts + | Value (Float f), Number n + when compare_numbers Eq n (N.of_float f) -> + evaluate_stmts ~then_ canBlock ctx stmts + | _ -> ()) + cases) + l + with INTERNAL_STOP_SWITCH -> ()) | Com.WhenDoElse (wdl, ed) -> let rec aux = function | (expr, dl, _) :: l -> ( @@ -779,7 +857,8 @@ struct | Com.VerifBlock stmts -> evaluate_stmts true ctx stmts | Com.ComputeTarget (Pos.Mark (tn, _), args, m_sp_opt) -> let tf = StrMap.find tn ctx.ctx_prog.program_targets in - let vsd = get_var_space_from ctx m_sp_opt in + let vsd_opt = get_var_space_from ctx m_sp_opt in + let vsd = get_var_space ctx vsd_opt in let vs_id_sav = ctx.ctx_var_space in ctx.ctx_var_space <- vsd.vs_id; evaluate_target canBlock ctx tf args; @@ -830,7 +909,7 @@ struct if not vsd.vs_by_default then ( pr_raw (Pos.unmark vsd.vs_name); pr_raw "."); - let _, v, _ = get_var ctx vsd var in + let _, v, _ = get_var ctx (Some vsd) var in match info with | Com.Name -> pr_raw (Com.Var.name_str v) | Com.Alias -> pr_raw (Com.Var.alias_str v) @@ -843,10 +922,10 @@ struct pr_flush () | PrintAccess (info, m_a) -> ( match get_access_var ctx @@ Pos.unmark m_a with - | Some (vsd, var) -> + | ZoneVar (vsd, var) -> pr_info info vsd var; pr_flush () - | None -> ()) + | ZoneField _ | ZoneNil -> ()) | PrintIndent e -> ( match evaluate_expr ctx e with | Undefined -> () @@ -858,80 +937,90 @@ struct pr_flush ()) args; pr_flush () - | Com.Iterate ((var : Com.Var.t), al, var_params, stmts) -> - List.iter - (fun m_a -> - match get_access_var ctx @@ Pos.unmark m_a with - | Some (vsd, v) -> - let vsd, v, vorg = get_var ctx vsd v in - set_var_ref ctx var vsd v vorg; - evaluate_stmts canBlock ctx stmts - | None -> ()) - al; - List.iter - (fun (vcs, expr, m_sp_opt) -> - let eval vc _ = - StrMap.iter - (fun _ v -> - if - Com.CatVar.compare (Com.Var.cat v) vc = 0 - && not (Com.Var.is_table v) - then ( - let vsd = get_var_space_from ctx m_sp_opt in - let vsd, v, org = get_var ctx vsd v in - set_var_ref ctx var vsd v org; - match evaluate_expr ctx expr with - | Number z when N.(z =. one ()) -> - evaluate_stmts canBlock ctx stmts - | _ -> ())) - ctx.ctx_prog.program_vars - in - Com.CatVar.Map.iter eval vcs) - var_params - | Com.Iterate_values ((var : Com.Var.t), var_intervals, stmts) -> - List.iter - (fun (e0, e1, step) -> - match evaluate_expr ctx e0 with - | Number z0 -> ( - match evaluate_expr ctx e1 with - | Number z1 -> ( - match evaluate_expr ctx step with - | Number zStep when not N.(is_zero zStep) -> - let cmp = - if N.(zStep > zero ()) then N.( <=. ) else N.( >=. ) - in - let rec loop i = - if cmp i z1 then ( - let vsd = ctx.ctx_prog.program_var_space_def in - set_var_value ctx vsd var (Number i); - evaluate_stmts canBlock ctx stmts; - loop N.(i +. zStep)) - in - loop z0 - | _ -> ()) - | Undefined -> ()) - | Undefined -> ()) - var_intervals + | Com.Iterate ((var : Com.Var.t), al, var_params, stmts) -> ( + try + List.iter + (fun m_a -> + match get_access_var ctx @@ Pos.unmark m_a with + | ZoneVar (vsd, v) -> + let vsd, v, vorg = get_var ctx (Some vsd) v in + set_var_ref ctx var vsd v vorg; + evaluate_stmts canBlock ctx stmts + | ZoneField _ | ZoneNil -> ()) + al; + List.iter + (fun (vcs, expr, m_sp_opt) -> + let eval vc _ = + StrMap.iter + (fun _ v -> + if + Com.CatVar.compare (Com.Var.cat v) vc = 0 + && not (Com.Var.is_table v) + then ( + let vsd = get_var_space_from ctx m_sp_opt in + let vsd, v, org = get_var ctx vsd v in + set_var_ref ctx var vsd v org; + match evaluate_expr ctx expr with + | Number z when N.(z =. one ()) -> + evaluate_stmts canBlock ctx stmts + | _ -> ())) + ctx.ctx_prog.program_vars + in + Com.CatVar.Map.iter eval vcs) + var_params + with + | Stop_instruction (SKId None) -> () + | Stop_instruction (SKId (Some scope)) as exn -> + if scope = Pos.unmark var.name then () else raise exn) + | Com.Iterate_values ((var : Com.Var.t), var_intervals, stmts) -> ( + try + List.iter + (fun (e0, e1, step) -> + match evaluate_expr ctx e0 with + | Number z0 -> ( + match evaluate_expr ctx e1 with + | Number z1 -> ( + match evaluate_expr ctx step with + | Number zStep when not N.(is_zero zStep) -> + let cmp = + if N.(zStep > zero ()) then N.( <=. ) else N.( >=. ) + in + let rec loop i = + if cmp i z1 then ( + let vsd = ctx.ctx_prog.program_var_space_def in + set_var_value ctx (Some vsd) var (Number i); + evaluate_stmts canBlock ctx stmts; + loop N.(i +. zStep)) + in + loop z0 + | _ -> ()) + | Undefined -> ()) + | Undefined -> ()) + var_intervals + with + | Stop_instruction (SKId None) -> () + | Stop_instruction (SKId (Some scope)) as exn -> + if scope = Pos.unmark var.name then () else raise exn) + | Com.Stop scope -> raise (Stop_instruction scope) | Com.Restore (al, var_params, evts, evtfs, stmts) -> - let vsd_def = get_var_space ctx in let backup backup_vars access = match get_access_var ctx access with - | Some (vsd, var) -> - let vsd, var, vorg = get_var ctx vsd var in + | ZoneVar (vsd, var) -> + let vsd, var, vorg = get_var ctx (Some vsd) var in if Com.Var.is_table var then let sz = Com.Var.size var in let rec loop backup_vars i = if i = sz then backup_vars else - let v = get_var_tab ctx vsd var i in + let v = get_var_tab ctx (Some vsd) var i in let value = get_var_value_org ctx vsd v vorg in loop ((vsd, v, vorg, value) :: backup_vars) (i + 1) in loop backup_vars 0 else - let value = get_var_value ctx vsd var in + let value = get_var_value ctx (Some vsd) var in (vsd, var, vorg, value) :: backup_vars - | None -> backup_vars + | ZoneField _ | ZoneNil -> backup_vars in let backup_vars = List.fold_left backup [] (List.map Pos.unmark al) in let backup_vars = @@ -978,7 +1067,7 @@ struct let rec aux backup_evts i = if i < Array.length events0 then ( let vi = N.of_int @@ Int64.of_int i in - set_var_value ctx vsd_def var (Number vi); + set_var_value ctx None var (Number vi); match evaluate_expr ctx expr with | Number z when N.(z =. one ()) -> let evt = events0.(i) in @@ -990,12 +1079,15 @@ struct aux backup_evts 0) backup_evts evtfs in - evaluate_stmts canBlock ctx stmts; - List.iter - (fun (vsd, v, vorg, value) -> set_var_value_org ctx vsd v vorg value) - backup_vars; - let events0 = List.hd ctx.ctx_events in - List.iter (fun (i, evt) -> events0.(i) <- evt) backup_evts + let then_ () = + List.iter + (fun (vsd, v, vorg, value) -> + set_var_value_org ctx vsd v vorg value) + backup_vars; + let events0 = List.hd ctx.ctx_events in + List.iter (fun (i, evt) -> events0.(i) <- evt) backup_evts + in + evaluate_stmts ~then_ canBlock ctx stmts | Com.ArrangeEvents (sort, filter, add, stmts) -> let event_list, nbAdd = match add with @@ -1042,9 +1134,8 @@ struct let rec aux res i = if i >= Array.length events0 then Array.of_list (List.rev res) else - let vsd_def = ctx.ctx_prog.program_var_space_def in let vi = Number (N.of_int @@ Int64.of_int i) in - set_var_value ctx vsd_def var vi; + set_var_value ctx None var vi; let res' = match evaluate_expr ctx expr with | Number z when N.(z =. one ()) -> events0.(i) :: res @@ -1066,11 +1157,10 @@ struct (match sort with | Some (var0, var1, expr) -> let sort_fun i _ j _ = - let vsd_def = ctx.ctx_prog.program_var_space_def in let vi = Number (N.of_int @@ Int64.of_int i) in - set_var_value ctx vsd_def var0 vi; + set_var_value ctx None var0 vi; let vj = Number (N.of_int @@ Int64.of_int j) in - set_var_value ctx vsd_def var1 vj; + set_var_value ctx None var1 vj; match evaluate_expr ctx expr with | Number z when N.(z =. zero ()) -> false | Number _ -> true @@ -1078,8 +1168,8 @@ struct in Sorting.mergeSort sort_fun nbAdd (Array.length events) events | None -> ()); - evaluate_stmts canBlock ctx stmts; - ctx.ctx_events <- List.tl ctx.ctx_events + let then_ () = ctx.ctx_events <- List.tl ctx.ctx_events in + evaluate_stmts ~then_ canBlock ctx stmts | Com.RaiseError (m_err, var_opt) -> let err = Pos.unmark m_err in (match err.typ with @@ -1101,6 +1191,7 @@ struct ctx.ctx_nb_discos <- 0; ctx.ctx_nb_infos <- 0; ctx.ctx_nb_bloquantes <- 0 + | Com.CleanFinalizedErrors -> ctx.ctx_finalized_anos <- [] | Com.FinalizeErrors -> let not_in_old_anos (err, _) = let name = Pos.unmark err.Com.Error.name in @@ -1124,10 +1215,16 @@ struct | Com.ComputeDomain _ | Com.ComputeChaining _ | Com.ComputeVerifs _ -> assert false - and evaluate_stmts canBlock (ctx : ctx) (stmts : Mir.m_instruction list) : - unit = - try List.iter (evaluate_stmt canBlock ctx) stmts - with BlockingError as b_err -> if canBlock then raise b_err + and evaluate_stmts ?(then_ = ignore) canBlock (ctx : ctx) + (stmts : Mir.m_instruction list) : unit = + let () = + try List.iter (evaluate_stmt canBlock ctx) stmts with + | BlockingError as b_err -> if canBlock then raise b_err + | Stop_instruction _ as exn -> + then_ (); + raise exn + in + then_ () and evaluate_function (ctx : ctx) (target : Mir.target) (args : Mir.m_expression list) : value = @@ -1145,7 +1242,7 @@ struct set_args 0 target.target_args args; ctx.ctx_tmps.(ctx.ctx_tmps_org).var <- Option.get target.target_result; ctx.ctx_tmps.(ctx.ctx_tmps_org).value <- Undefined; - evaluate_target_aux false ctx target; + evaluate_target_aux ~is_fun:true false ctx target; ctx.ctx_tmps.(ctx.ctx_tmps_org).value and evaluate_target (canBlock : bool) (ctx : ctx) (target : Mir.target) @@ -1155,20 +1252,20 @@ struct | v :: vl', m_a :: al' -> ( ctx.ctx_ref.(ctx.ctx_ref_org + n).var <- v; match get_access_var ctx (Pos.unmark m_a) with - | Some (vsd, ref_var) -> - let vsd, ref_var, org = get_var ctx vsd ref_var in + | ZoneVar (vsd, ref_var) -> + let vsd, ref_var, org = get_var ctx (Some vsd) ref_var in ctx.ctx_ref.(ctx.ctx_ref_org + n).var_space <- vsd; ctx.ctx_ref.(ctx.ctx_ref_org + n).ref_var <- ref_var; ctx.ctx_ref.(ctx.ctx_ref_org + n).org <- org; set_args (n + 1) vl' al' - | None -> ()) - | [], [] -> evaluate_target_aux canBlock ctx target + | ZoneField _ | ZoneNil -> ()) + | [], [] -> evaluate_target_aux ~is_fun:false canBlock ctx target | _ -> assert false in set_args 0 target.target_args args - and evaluate_target_aux (canBlock : bool) (ctx : ctx) (target : Mir.target) : - unit = + and evaluate_target_aux ~(is_fun : bool) (canBlock : bool) (ctx : ctx) + (target : Mir.target) : unit = let sav_target = ctx.ctx_target in ctx.ctx_target <- target; ctx.ctx_tmps_org <- ctx.ctx_tmps_org + target.target_sz_tmps; @@ -1179,9 +1276,15 @@ struct ctx.ctx_tmps.(i).value <- Undefined) target.target_tmp_vars; ctx.ctx_ref_org <- ctx.ctx_ref_org + target.target_nb_refs; - evaluate_stmts canBlock ctx target.target_prog; - ctx.ctx_ref_org <- ctx.ctx_ref_org - target.target_nb_refs; - ctx.ctx_tmps_org <- ctx.ctx_tmps_org - target.target_sz_tmps; + let then_ () = + ctx.ctx_ref_org <- ctx.ctx_ref_org - target.target_nb_refs; + ctx.ctx_tmps_org <- ctx.ctx_tmps_org - target.target_sz_tmps + in + let () = + try evaluate_stmts ~then_ canBlock ctx target.target_prog with + | Stop_instruction SKTarget when not is_fun -> () + | Stop_instruction SKFun when is_fun -> () + in ctx.ctx_target <- sav_target let evaluate_program (ctx : ctx) : unit = @@ -1198,9 +1301,13 @@ struct ctx.ctx_target <- main_target; evaluate_target false ctx main_target []; evaluate_stmt false ctx (Pos.without Com.ExportErrors) - with RuntimeError (e, ctx) -> - if !exit_on_rte then raise_runtime_as_structured e - else raise (RuntimeError (e, ctx)) + with + | RuntimeError (e, ctx) -> + if !exit_on_rte then raise_runtime_as_structured e + else raise (RuntimeError (e, ctx)) + | Stop_instruction SKApplication -> + (* The only stop never caught by anything else *) () + | Stop_instruction SKTarget -> (* May not be caught by anything else *) () end module BigIntPrecision = struct @@ -1259,7 +1366,8 @@ module RatMfInterp = (Mir_number.RationalNumber) (Mir_roundops.MainframeRoundOps (MainframeLongSize)) -let get_interp (sort : Cli.value_sort) (roundops : Cli.round_ops) : (module S) = +let get_interp (sort : Config.value_sort) (roundops : Config.round_ops) : + (module S) = match (sort, roundops) with | RegularFloat, RODefault -> (module FloatDefInterp) | RegularFloat, ROMulti -> (module FloatMultInterp) @@ -1277,7 +1385,8 @@ let get_interp (sort : Cli.value_sort) (roundops : Cli.round_ops) : (module S) = | Rational, ROMulti -> (module RatMultInterp) | Rational, ROMainframe _ -> (module RatMfInterp) -let prepare_interp (sort : Cli.value_sort) (roundops : Cli.round_ops) : unit = +let prepare_interp (sort : Config.value_sort) (roundops : Config.round_ops) : + unit = begin match sort with | MPFR prec -> Mpfr.set_default_prec prec @@ -1298,7 +1407,7 @@ let prepare_interp (sort : Cli.value_sort) (roundops : Cli.round_ops) : unit = let evaluate_program (p : Mir.program) (inputs : Com.literal Com.Var.Map.t) (events : (Com.literal, Com.Var.t) Com.event_value StrMap.t list) - (sort : Cli.value_sort) (roundops : Cli.round_ops) : + (sort : Config.value_sort) (roundops : Config.round_ops) : Com.literal Com.Var.Map.t * Com.Error.Set.t = prepare_interp sort roundops; let module Interp = (val get_interp sort roundops : S) in @@ -1333,6 +1442,7 @@ let evaluate_program (p : Mir.program) (inputs : Com.literal Com.Var.Map.t) (varMap, anoSet) let evaluate_expr (p : Mir.program) (e : Mir.expression Pos.marked) - (sort : Cli.value_sort) (roundops : Cli.round_ops) : Com.literal = + (sort : Config.value_sort) (roundops : Config.round_ops) : Com.literal = let module Interp = (val get_interp sort roundops : S) in - Interp.value_to_literal (Interp.evaluate_expr (Interp.empty_ctx p) e) + try Interp.value_to_literal (Interp.evaluate_expr (Interp.empty_ctx p) e) + with Stop_instruction _ -> Undefined diff --git a/src/mlang/m_ir/mir_interpreter.mli b/src/mlang/m_ir/mir_interpreter.mli index c9225427f..36c7e3c79 100644 --- a/src/mlang/m_ir/mir_interpreter.mli +++ b/src/mlang/m_ir/mir_interpreter.mli @@ -172,21 +172,21 @@ module RatMfInterp : S with type custom_float = Mir_number.RationalNumber.t (** {1 Generic interpretation API}*) -val get_interp : Cli.value_sort -> Cli.round_ops -> (module S) +val get_interp : Config.value_sort -> Config.round_ops -> (module S) val evaluate_program : Mir.program -> Com.literal Com.Var.Map.t -> (Com.literal, Com.Var.t) Com.event_value StrMap.t list -> - Cli.value_sort -> - Cli.round_ops -> + Config.value_sort -> + Config.round_ops -> Com.literal Com.Var.Map.t * Com.Error.Set.t (** Main interpreter function *) val evaluate_expr : Mir.program -> Mir.expression Pos.marked -> - Cli.value_sort -> - Cli.round_ops -> + Config.value_sort -> + Config.round_ops -> Com.literal (** Interprets only an expression *) diff --git a/src/mlang/m_ir/mir_roundops.ml b/src/mlang/m_ir/mir_roundops.ml index f39fad3ca..f6577e50e 100644 --- a/src/mlang/m_ir/mir_roundops.ml +++ b/src/mlang/m_ir/mir_roundops.ml @@ -29,7 +29,7 @@ module DefaultRoundOps (N : Mir_number.NumberInterface) : RoundOpsInterface with type t = N.t = struct type t = N.t - let epsilon = !Cli.comparison_error_margin + let epsilon = !Config.comparison_error_margin let truncatef (x : N.t) : N.t = N.floor N.(x +. N.of_float epsilon) @@ -45,7 +45,7 @@ module MultiRoundOps (N : Mir_number.NumberInterface) : RoundOpsInterface with type t = N.t = struct type t = N.t - let epsilon = !Cli.comparison_error_margin + let epsilon = !Config.comparison_error_margin let truncatef (x : N.t) : N.t = N.floor N.(x +. N.of_float epsilon) @@ -60,7 +60,7 @@ end) (N : Mir_number.NumberInterface) : RoundOpsInterface with type t = N.t = struct type t = N.t - let epsilon = !Cli.comparison_error_margin + let epsilon = !Config.comparison_error_margin let floor_g (x : N.t) : N.t = if N.abs x <= N.of_int !L.max_long then N.floor x else x diff --git a/src/mlang/m_ir/mir_roundops.mli b/src/mlang/m_ir/mir_roundops.mli index 304131bc8..b2c869788 100644 --- a/src/mlang/m_ir/mir_roundops.mli +++ b/src/mlang/m_ir/mir_roundops.mli @@ -32,7 +32,8 @@ module DefaultRoundOps : RoundOpsFunctor (** Default rounding operations: those used in the PC/single-thread context *) module MultiRoundOps : RoundOpsFunctor -(** Multithread rounding operations: those used in the PC/multi-thread context *) +(** Multithread rounding operations: those used in the PC/multi-thread context +*) (** Mainframe rounding operations: those used in the mainframe context. As the behavior depends on the sie of the `long` type, this size must be given as diff --git a/src/mlang/test_framework/dune b/src/mlang/test_framework/dune index 75fc3891a..ba5d23f0a 100644 --- a/src/mlang/test_framework/dune +++ b/src/mlang/test_framework/dune @@ -4,6 +4,13 @@ (modules irj_parser) (flags --dump --explain --table)) +(library + (name irj_utils) + (public_name mlang.irj_utils) + (flags + (:standard -open Utils -open M_ir)) + (libraries m_frontend m_ir utils menhirLib parmap str)) + ;; This section deals with the .messages file. ;; The following rule generates "parserMessages.ml" based on the source file diff --git a/src/mlang/test_framework/test_interpreter.ml b/src/mlang/test_framework/test_interpreter.ml index dd49135ca..900076b0b 100644 --- a/src/mlang/test_framework/test_interpreter.ml +++ b/src/mlang/test_framework/test_interpreter.ml @@ -36,7 +36,7 @@ let to_MIR_function_and_inputs (program : Mir.program) (t : Irj_ast.irj_file) : let map_init = try let ancsded = find_var_of_name program (Pos.without "V_ANCSDED") in - let ancsded_val = Com.Float (float_of_int (!Cli.income_year + 1)) in + let ancsded_val = Com.Float (float_of_int (!Config.income_year + 1)) in Com.Var.Map.one ancsded ancsded_val with _ -> Com.Var.Map.empty in @@ -136,27 +136,32 @@ let to_MIR_function_and_inputs (program : Mir.program) (t : Irj_ast.irj_file) : exception InterpError of int let check_test (program : Mir.program) (test_name : string) - (value_sort : Cli.value_sort) (round_ops : Cli.round_ops) : unit = + (value_sort : Config.value_sort) (round_ops : Config.round_ops) + (ign_vars : StrSet.t) : unit = let check_vars exp vars = let test_error_margin = 0.01 in let fold vname f nb = - let f' = - let var = - match StrMap.find_opt vname program.program_vars with - | Some var -> var - | None -> - Cli.error_print "Variable inconnue: %s" vname; - raise - (Errors.StructuredError ("Fichier de test incorrect", [], None)) + if StrSet.mem vname ign_vars then ( + Cli.warning_print "OK | %s ignored" vname; + nb) + else + let f' = + let var = + match StrMap.find_opt vname program.program_vars with + | Some var -> var + | None -> + Cli.error_print "Variable inconnue: %s" vname; + raise + (Errors.StructuredError ("Fichier de test incorrect", [], None)) + in + match Com.Var.Map.find_opt var vars with + | Some (Com.Float f') -> f' + | _ -> 0.0 in - match Com.Var.Map.find_opt var vars with - | Some (Com.Float f') -> f' - | _ -> 0.0 - in - if abs_float (f -. f') > test_error_margin then ( - Cli.error_print "KO | %s expected: %f - evaluated: %f" vname f f'; - nb + 1) - else nb + if abs_float (f -. f') > test_error_margin then ( + Cli.error_print "KO | %s expected: %f - evaluated: %f" vname f f'; + nb + 1) + else nb in StrMap.fold fold exp 0 in @@ -171,10 +176,10 @@ let check_test (program : Mir.program) (test_name : string) StrSet.iter (Cli.error_print "KO | unexpected error: %s") unexAnos; StrSet.cardinal missAnos + StrSet.cardinal unexAnos in - let dbg_warning = !Cli.warning_flag in - let dbg_time = !Cli.display_time in - Cli.warning_flag := false; - Cli.display_time := false; + let dbg_warning = !Config.warning_flag in + let dbg_time = !Config.display_time in + Config.warning_flag := false; + Config.display_time := false; Cli.debug_print "Parsing %s..." test_name; let t = Irj_file.parse_file test_name in Cli.debug_print "Running test %s..." t.nom; @@ -201,39 +206,49 @@ let check_test (program : Mir.program) (test_name : string) raise (InterpError nbErrs)) in check insts; - Cli.warning_flag := dbg_warning; - Cli.display_time := dbg_time + Config.warning_flag := dbg_warning; + Config.display_time := dbg_time + +let ignored_vars_set (p : Mir.program) (sl : string list) = + let str_list = [ "^\\("; String.concat "\\|" sl; "\\)$" ] in + let regexp = Str.regexp @@ String.concat "" str_list in + let fold vn _ set = + if Str.string_match regexp vn 0 then StrSet.add vn set else set + in + StrSet.empty + |> StrMap.fold fold p.program_vars + |> StrMap.fold fold p.program_alias + +let ignored_vars_list = + [ "NBPT"; "RETX"; "NATMAJ."; "NATMAJ..."; "NATMAJ...."; "TL_.*" ] type process_acc = string list * int StrMap.t let check_all_tests (p : Mir.program) (test_dir : string) - (value_sort : Cli.value_sort) (round_ops : Cli.round_ops) + (value_sort : Config.value_sort) (round_ops : Config.round_ops) (filter_function : string -> bool) = - let arr = Sys.readdir test_dir in let arr = - Array.of_list - @@ List.filter filter_function - @@ List.filter - (fun x -> not @@ Sys.is_directory (test_dir ^ "/" ^ x)) - (Array.to_list arr) + test_dir |> Sys.readdir |> Array.to_list + |> List.filter (fun x -> not @@ Sys.is_directory (test_dir ^ "/" ^ x)) + |> List.filter filter_function + |> List.sort String.compare |> Array.of_list in + let ign_vars = ignored_vars_set p ignored_vars_list in Mir_interpreter.exit_on_rte := false; - (* sort by increasing size, hoping that small files = simple tests *) - Array.sort compare arr; - let dbg_warning = !Cli.warning_flag in - let dbg_time = !Cli.display_time in - Cli.warning_flag := false; - Cli.display_time := false; - (* let _, finish = Cli.create_progress_bar "Testing files" in*) + let dbg_warning = !Config.warning_flag in + let dbg_time = !Config.display_time in + Config.warning_flag := false; + Config.display_time := false; + (* let _, finish = Config.create_progress_bar "Testing files" in*) let process (name : string) ((successes, failures) : process_acc) : process_acc = let module Interp = (val Mir_interpreter.get_interp value_sort round_ops : Mir_interpreter.S) in try - Cli.debug_flag := false; - check_test p (test_dir ^ name) value_sort round_ops; - Cli.debug_flag := true; + Config.debug_flag := false; + check_test p (test_dir ^ name) value_sort round_ops ign_vars; + Config.debug_flag := true; Cli.result_print "%s" name; (name :: successes, failures) with @@ -267,10 +282,9 @@ let check_all_tests (p : Mir.program) (test_dir : string) *) in (* finish "done!"; *) - Cli.warning_flag := dbg_warning; - Cli.display_time := dbg_time; + Config.warning_flag := dbg_warning; + Config.display_time := dbg_time; Cli.result_print "Test results: %d successes" (List.length s); - if StrMap.cardinal f = 0 then Cli.result_print "No failures!" else ( Cli.warning_print "Failures:"; @@ -279,22 +293,23 @@ let check_all_tests (p : Mir.program) (test_dir : string) f) let check_one_test (p : Mir.program) (name : string) - (value_sort : Cli.value_sort) (round_ops : Cli.round_ops) = + (value_sort : Config.value_sort) (round_ops : Config.round_ops) = + let ign_vars = ignored_vars_set p ignored_vars_list in Mir_interpreter.exit_on_rte := false; (* sort by increasing size, hoping that small files = simple tests *) - let dbg_warning = !Cli.warning_flag in - let dbg_time = !Cli.display_time in - Cli.warning_flag := false; - Cli.display_time := false; - (* let _, finish = Cli.create_progress_bar "Testing files" in*) + let dbg_warning = !Config.warning_flag in + let dbg_time = !Config.display_time in + Config.warning_flag := false; + Config.display_time := false; + (* let _, finish = Config.create_progress_bar "Testing files" in*) let is_ok = let module Interp = (val Mir_interpreter.get_interp value_sort round_ops : Mir_interpreter.S) in try - Cli.debug_flag := false; - check_test p name value_sort round_ops; - Cli.debug_flag := true; + Config.debug_flag := false; + check_test p name value_sort round_ops ign_vars; + Config.debug_flag := true; Cli.result_print "%s" name; None with @@ -320,8 +335,8 @@ let check_one_test (p : Mir.program) (name : string) raise e in (* finish "done!"; *) - Cli.warning_flag := dbg_warning; - Cli.display_time := dbg_time; + Config.warning_flag := dbg_warning; + Config.display_time := dbg_time; match is_ok with | None -> Cli.result_print "No failure!" | Some 0 -> Cli.error_print "Unexpected failure" diff --git a/src/mlang/test_framework/test_interpreter.mli b/src/mlang/test_framework/test_interpreter.mli index 5fe88b654..38f47da64 100644 --- a/src/mlang/test_framework/test_interpreter.mli +++ b/src/mlang/test_framework/test_interpreter.mli @@ -12,17 +12,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *) - val check_all_tests : Mir.program -> string -> - Cli.value_sort -> - Cli.round_ops -> + Config.value_sort -> + Config.round_ops -> (string -> bool) -> unit -(** [check_all_tests p folder vs ro filter] - Executes [p] with all tests in [folder] whose name satisfy [filter]. *) +(** [check_all_tests p folder vs ro filter] Executes [p] with all tests in + [folder] whose name satisfy [filter]. *) val check_one_test : - Mir.program -> string -> Cli.value_sort -> Cli.round_ops -> unit + Mir.program -> string -> Config.value_sort -> Config.round_ops -> unit (** Same as [check_all_tests], but for one test. *) diff --git a/src/mlang/utils/cli.ml b/src/mlang/utils/cli.ml index e84b321b0..d181e6d8c 100644 --- a/src/mlang/utils/cli.ml +++ b/src/mlang/utils/cli.ml @@ -23,15 +23,18 @@ (** The command line interface is declared using {!module Cmdliner} *) open Cmdliner +open Config +module Cmdliner = Cmdliner +module Term = Cmdliner.Term +module ANSITerminal = ANSITerminal let files = Arg.( - non_empty & pos_all file [] + value & pos_all file [] & info [] ~docv:"FILES" ~doc:"M files to be compiled") let applications = - Arg.( - non_empty & opt (list string) [] & info [ "A" ] ~doc:"Application name(s)") + Arg.(value & opt (list string) [] & info [ "A" ] ~doc:"Application name(s)") let without_dgfip_m = Arg.( @@ -54,15 +57,6 @@ let display_time = & info [ "display_time"; "t" ] ~doc:"Displays timing information (use with --debug)") -let dep_graph_file = - let doc = - "Name of the file where the variable dependency graph should be output \ - (use with --debug)" - in - Arg.( - value & opt file "dep_graph.dot" - & info [ "dep_graph_file"; "g" ] ~docv:"DEP_GRAPH" ~doc) - let no_print_cycles = let doc = "If set, disable the eventual circular dependencies repport" in Arg.(value & flag & info [ "no_print_cycles"; "c" ] ~doc) @@ -82,7 +76,7 @@ let backend = let mpp_function = Arg.( - required + value & opt (some string) None & info [ "mpp_function" ] ~docv:"MPP_FUNCTION" ~doc:"M++ file main function") @@ -160,7 +154,7 @@ let comparison_error_margin_cli = let income_year_cli = Arg.( value - & opt (some int) None + & opt int (1900 + (Unix.localtime (Unix.time ())).Unix.tm_year - 1) & info [ "income-year" ] ~docv:"INCOME_YEAR" ~doc:"Set the year of the income.") @@ -185,10 +179,10 @@ let dgfip_options = let mlang_t f = Term.( const f $ files $ applications $ without_dgfip_m $ debug $ var_info_debug - $ display_time $ dep_graph_file $ no_print_cycles $ backend $ output - $ run_all_tests $ dgfip_test_filter $ run_test $ mpp_function - $ optimize_unsafe_float $ precision $ roundops $ comparison_error_margin_cli - $ income_year_cli $ m_clean_calls $ dgfip_options) + $ display_time $ no_print_cycles $ backend $ output $ run_all_tests + $ dgfip_test_filter $ run_test $ mpp_function $ optimize_unsafe_float + $ precision $ roundops $ comparison_error_margin_cli $ income_year_cli + $ m_clean_calls $ dgfip_options) let info = let doc = @@ -232,115 +226,6 @@ let info = | Some v -> Build_info.V1.Version.to_string v) ~doc ~exits ~man -type value_sort = - | RegularFloat - | MPFR of int (* bitsize of the floats *) - | BigInt of int (* precision of the fixed point *) - | Interval - | Rational - -type round_ops = RODefault | ROMulti | ROMainframe of int -(* size of type long, either 32 or 64 *) - -type backend = Dgfip_c | UnknownBackend - -type execution_mode = - | SingleTest of string - | MultipleTests of string - | Extraction - -type files = NonEmpty of string list - -let get_files = function NonEmpty l -> l - -(* This feels weird to put here, but by construction it should not happen.*) -let source_files : files ref = ref (NonEmpty []) - -let application_names : string list ref = ref [] - -let without_dgfip_m = ref false - -let dep_graph_file : string ref = ref "dep_graph.dot" - -let verify_flag = ref false - -let debug_flag = ref false - -let var_info_flag = ref false - -let var_info_debug = ref [] - -let warning_flag = ref true - -let no_print_cycles_flag = ref false - -let display_time = ref false - -let output_file = ref "" - -let optimize_unsafe_float = ref false - -let m_clean_calls = ref false - -let value_sort = ref RegularFloat - -let round_ops = ref RODefault - -let backend = ref UnknownBackend - -let dgfip_test_filter = ref false - -let mpp_function = ref "" - -let dgfip_flags = ref Dgfip_options.default_flags - -let execution_mode = ref Extraction - -(* Default value for the epsilon slack when comparing things in the - interpreter *) -let comparison_error_margin = ref 0.000001 - -let income_year = ref 0 - -let set_all_arg_refs (files_ : files) applications_ (without_dgfip_m_ : bool) - (debug_ : bool) (var_info_debug_ : string list) (display_time_ : bool) - (dep_graph_file_ : string) (no_print_cycles_ : bool) - (output_file_ : string option) (optimize_unsafe_float_ : bool) - (m_clean_calls_ : bool) (comparison_error_margin_ : float option) - (income_year_ : int option) (value_sort_ : value_sort) - (round_ops_ : round_ops) (backend_ : backend) (dgfip_test_filter_ : bool) - (mpp_function_ : string) (dgfip_flags_ : Dgfip_options.flags) - (execution_mode_ : execution_mode) = - source_files := files_; - application_names := applications_; - without_dgfip_m := without_dgfip_m_; - debug_flag := debug_; - var_info_debug := var_info_debug_; - var_info_flag := !var_info_debug <> []; - display_time := display_time_; - dep_graph_file := dep_graph_file_; - no_print_cycles_flag := no_print_cycles_; - optimize_unsafe_float := optimize_unsafe_float_; - m_clean_calls := m_clean_calls_; - execution_mode := execution_mode_; - (income_year := - match income_year_ with - | Some y -> y - | None -> 1900 + (Unix.localtime (Unix.time ())).Unix.tm_year - 1); - value_sort := value_sort_; - round_ops := round_ops_; - backend := backend_; - dgfip_test_filter := dgfip_test_filter_; - mpp_function := mpp_function_; - dgfip_flags := dgfip_flags_; - match output_file_ with - | None -> () - | Some o -> ( - output_file := o; - match comparison_error_margin_ with - | None -> () - | Some m -> comparison_error_margin := m) - (**{1 Terminal formatting}*) let concat_with_line_depending_prefix_and_suffix (prefix : int -> string) @@ -367,7 +252,7 @@ let add_prefix_to_each_line (s : string) (prefix : int -> string) = (**{2 Markers}*) -(** Prints [\[INFO\]] in blue on the terminal standard output *) +(** Prints [[INFO]] in blue on the terminal standard output *) let var_info_marker () = ANSITerminal.printf [ ANSITerminal.Bold; ANSITerminal.blue ] "[VAR INFO] " @@ -390,28 +275,28 @@ let format_with_style (styles : ANSITerminal.style list) if true (* can depend on a stylr flag *) then ANSITerminal.sprintf styles str else Printf.sprintf str -(** Prints [\[DEBUG\]] in purple on the terminal standard output as well as - timing since last debug *) +(** Prints [[DEBUG]] in purple on the terminal standard output as well as timing + since last debug *) let debug_marker (f_time : bool) = if f_time then time_marker (); ANSITerminal.printf [ ANSITerminal.Bold; ANSITerminal.magenta ] "[DEBUG] " -(** Prints [\[ERROR\]] in red on the terminal error output *) +(** Prints [[ERROR]] in red on the terminal error output *) let error_marker () = ANSITerminal.eprintf [ ANSITerminal.Bold; ANSITerminal.red ] "[ERROR] " -(** Prints [\[WARNING\]] in yellow on the terminal standard output *) +(** Prints [[WARNING]] in yellow on the terminal standard output *) let warning_marker () = ANSITerminal.printf [ ANSITerminal.Bold; ANSITerminal.yellow ] "[WARNING] " -(** Prints [\[RESULT\]] in green on the terminal standard output *) +(** Prints [[RESULT]] in green on the terminal standard output *) let result_marker () = ANSITerminal.printf [ ANSITerminal.Bold; ANSITerminal.green ] "[RESULT] " let clocks = Array.of_list [ "🕛"; "🕐"; "🕑"; "🕒"; "🕓"; "🕔"; "🕕"; "🕖"; "🕗"; "🕘"; "🕙"; "🕚" ] -(** Prints [\[🕛\]] in blue on the terminal standard output *) +(** Prints [[🕛]] in blue on the terminal standard output *) let clock_marker i = let new_time = Unix.gettimeofday () in let initial_time = !initial_time in @@ -431,13 +316,13 @@ let debug_print ?(endline = "\n") kont = (fun str -> Format.printf "%a%s%s@?" (fun _ -> debug_marker) - !display_time str endline) + !Config.display_time str endline) kont else Format.ifprintf Format.std_formatter kont let var_info_print kont = ANSITerminal.erase ANSITerminal.Eol; - if !var_info_flag then + if !Config.var_info_flag then Format.kasprintf (fun str -> Format.printf "%a%s@." (fun _ -> var_info_marker) () str) kont diff --git a/src/mlang/utils/cli.mli b/src/mlang/utils/cli.mli index 2ca786c71..d7d252271 100644 --- a/src/mlang/utils/cli.mli +++ b/src/mlang/utils/cli.mli @@ -25,19 +25,18 @@ val mlang_t : bool -> string list -> bool -> - string -> bool -> string option -> string option -> string option -> bool -> string option -> - string -> + string option -> bool -> string option -> string option -> float option -> - int option -> + int -> bool -> string list option -> 'a) -> @@ -47,122 +46,6 @@ val mlang_t : val info : Cmdliner.Cmd.info (** Command-line man page for --help *) -(**{2 Flags and parameters}*) - -(** According on the [value_sort], a specific interpreter will be called with - the right kind of floating-point value *) -type value_sort = - | RegularFloat - | MPFR of int (** bitsize of the floats *) - | BigInt of int (** precision of the fixed point *) - | Interval - | Rational - -(** Rounding operations to use in the interpreter. They correspond to the - rounding operations used by the DGFiP calculator in different execution - contexts. - - - RODefault: rounding operations used in the PC/single-thread context - - ROMulti: rouding operations used in the PC/multi-thread context - - ROMainframe rounding operations used in the mainframe context *) -type round_ops = - | RODefault - | ROMulti - | ROMainframe of int (** size of type long, either 32 or 64 *) - -type backend = Dgfip_c | UnknownBackend - -type execution_mode = - | SingleTest of string - | MultipleTests of string - | Extraction - -type files = NonEmpty of string list - -val get_files : files -> string list - -val source_files : files ref -(** M source files to be compiled *) - -val application_names : string list ref - -val dep_graph_file : string ref -(** Prefix for debug graph output files *) - -val without_dgfip_m : bool ref - -val verify_flag : bool ref -(** Use Z3 to check if verif rules hold all the time *) - -val debug_flag : bool ref -(** Prints debug information *) - -val var_info_flag : bool ref -(** Print infomation about variables declared, defined ou used incorrectly *) - -val var_info_debug : string list ref -(** Prints even more information but only about some variables members of a list -*) - -val warning_flag : bool ref -(** Print warning info *) - -val no_print_cycles_flag : bool ref -(** Dump circular definitions of variables *) - -val display_time : bool ref -(** Displays timing information *) - -val output_file : string ref -(** Output file *) - -val optimize_unsafe_float : bool ref -(** Activate unsafe floating point optimizations *) - -val m_clean_calls : bool ref -(** Clean regular variables between M calls *) - -val comparison_error_margin : float ref - -val income_year : int ref - -val value_sort : value_sort ref - -val round_ops : round_ops ref - -val backend : backend ref - -val dgfip_test_filter : bool ref - -val mpp_function : string ref - -val dgfip_flags : Dgfip_options.flags ref - -val execution_mode : execution_mode ref - -val set_all_arg_refs : - (* files *) files -> - (* applications *) string list -> - (* without_dgfip_m *) bool -> - (* debug *) bool -> - (* var_info_debug *) string list -> - (* display_time *) bool -> - (* dbg_graph_file *) string -> - (* prints_cycles *) bool -> - (* output_file *) string option -> - (* optimize_unsafe_float *) bool -> - (* m_clean_call *) bool -> - (* comparison_error_margin*) float option -> - (* income_year *) int option -> - value_sort -> - round_ops -> - backend -> - (* dgfip_test_filter *) bool -> - (* mpp_function *) string -> - (* dgfip_flags *) Dgfip_options.flags -> - (* execution_mode *) execution_mode -> - unit - val add_prefix_to_each_line : string -> (int -> string) -> string (** [add_prefix_to_each_line msg prefix] will print msg but each line with line number [i] starts with the string [prefix i]*) diff --git a/src/mlang/utils/config.ml b/src/mlang/utils/config.ml new file mode 100644 index 000000000..10b9e38e3 --- /dev/null +++ b/src/mlang/utils/config.ml @@ -0,0 +1,213 @@ +type value_sort = + | RegularFloat + | MPFR of int (* bitsize of the floats *) + | BigInt of int (* precision of the fixed point *) + | Interval + | Rational + +type round_ops = RODefault | ROMulti | ROMainframe of int +(* size of type long, either 32 or 64 *) + +type backend = Dgfip_c | UnknownBackend + +type execution_mode = + | SingleTest of string + | MultipleTests of string + | Extraction + +type files = NonEmpty of string list + +(* Flags inherited from the old compiler *) + +let get_files = function NonEmpty l -> l + +(* This feels weird to put here, but by construction it should not happen.*) +let source_files : files ref = ref (NonEmpty []) + +let application_names : string list ref = ref [] + +let without_dgfip_m = ref false + +let verify_flag = ref false + +let debug_flag = ref false + +let var_info_flag = ref false + +let var_info_debug = ref [] + +let warning_flag = ref true + +let no_print_cycles_flag = ref false + +let display_time = ref false + +let output_file = ref "" + +let optimize_unsafe_float = ref false + +let m_clean_calls = ref false + +let value_sort = ref RegularFloat + +let round_ops = ref RODefault + +let backend = ref UnknownBackend + +let dgfip_test_filter = ref false + +let mpp_function = ref "" + +let dgfip_flags = ref Dgfip_options.default_flags + +let execution_mode = ref Extraction + +(* Default value for the epsilon slack when comparing things in the + interpreter *) +let comparison_error_margin = ref 0.000001 + +let income_year = ref 0 + +let set_all_arg_refs (files_ : files) applications_ (without_dgfip_m_ : bool) + (debug_ : bool) (var_info_debug_ : string list) (display_time_ : bool) + (no_print_cycles_ : bool) (output_file_ : string option) + (optimize_unsafe_float_ : bool) (m_clean_calls_ : bool) + (comparison_error_margin_ : float option) (income_year_ : int) + (value_sort_ : value_sort) (round_ops_ : round_ops) (backend_ : backend) + (dgfip_test_filter_ : bool) (mpp_function_ : string) + (dgfip_flags_ : Dgfip_options.flags) (execution_mode_ : execution_mode) = + source_files := files_; + application_names := applications_; + without_dgfip_m := without_dgfip_m_; + debug_flag := debug_; + var_info_debug := var_info_debug_; + var_info_flag := !var_info_debug <> []; + display_time := display_time_; + no_print_cycles_flag := no_print_cycles_; + optimize_unsafe_float := optimize_unsafe_float_; + m_clean_calls := m_clean_calls_; + execution_mode := execution_mode_; + income_year := income_year_; + value_sort := value_sort_; + round_ops := round_ops_; + backend := backend_; + dgfip_test_filter := dgfip_test_filter_; + mpp_function := mpp_function_; + dgfip_flags := dgfip_flags_; + match output_file_ with + | None -> () + | Some o -> ( + output_file := o; + match comparison_error_margin_ with + | None -> () + | Some m -> comparison_error_margin := m) + +let process_dgfip_options (backend : backend) ~(application_names : string list) + (dgfip_options : string list option) = + (* Parsing dgfip options even if we don't need them, because we may be in the case + --dgfip_options=--help. *) + let opts = + Option.map + (Dgfip_options.process_dgfip_options ~application_names) + dgfip_options + in + match (backend, opts) with + | Dgfip_c, None -> + `Error "When using the DGFiP backend, DGFiP options MUST be provided." + | Dgfip_c, Some (Ok (`Ok v)) -> `Dgfip_options v + | UnknownBackend, None -> `Dgfip_options Dgfip_options.default_flags + | UnknownBackend, Some (Ok (`Ok _)) -> + (* warning_print "Backend unknown, discarding dgfip_options."; *) + `Dgfip_options Dgfip_options.default_flags + | _, Some (Ok `Help) | _, Some (Ok `Version) -> `Dgfip_options_version + | _, Some (Error `Term) -> `Error "Invalid term in --dgfip_options" + | _, Some (Error `Parse) -> `Error "Failed parsing of --dgfip_options" + | _, Some (Error `Exn) -> + `Error "Uncaught exception while reading --dgfip_options" + +let set_opts ~(files : string list) ~(application_names : string list) + ~(without_dgfip_m : bool) ~(debug : bool) ~(var_info_debug : string list) + ~(display_time : bool) ~(print_cycles : bool) ~(backend : string option) + ~(output : string option) ~(run_tests : string option) + ~(dgfip_test_filter : bool) ~(run_test : string option) + ~(mpp_function : string option) ~(optimize_unsafe_float : bool) + ~(precision : string option) ~(roundops : string option) + ~(comparison_error_margin : float option) ~(income_year : int) + ~(m_clean_calls : bool) ~(dgfip_options : string list option) : + [ `Run | `Displayed_dgfip_help | `Error of string ] = + let exception INTERNAL_FAIL of string in + let exception DGFIP_HELP in + let err m = Format.kasprintf (fun s -> raise (INTERNAL_FAIL s)) m in + try + (* Reading backend first because we need it for parsing dgfip_flags *) + let backend = + match backend with Some "dgfip_c" -> Dgfip_c | _ -> UnknownBackend + in + let dgfip_flags = + match process_dgfip_options backend ~application_names dgfip_options with + | `Dgfip_options_help -> raise DGFIP_HELP + | `Dgfip_options_version -> raise DGFIP_HELP + | `Error m -> err "%s" m + | `Dgfip_options f -> f + in + let mpp_function = + match mpp_function with + | None -> err "Option --mpp_function required" + | Some m -> m + in + let value_sort = + let precision = Option.get precision in + if precision = "double" then RegularFloat + else + let mpfr_regex = Re.Pcre.regexp "^mpfr(\\d+)$" in + if Re.Pcre.pmatch ~rex:mpfr_regex precision then + let mpfr_prec = + Re.Pcre.get_substring (Re.Pcre.exec ~rex:mpfr_regex precision) 1 + in + MPFR (int_of_string mpfr_prec) + else if precision = "interval" then Interval + else + let bigint_regex = Re.Pcre.regexp "^fixed(\\d+)$" in + if Re.Pcre.pmatch ~rex:bigint_regex precision then + let fixpoint_prec = + Re.Pcre.get_substring (Re.Pcre.exec ~rex:bigint_regex precision) 1 + in + BigInt (int_of_string fixpoint_prec) + else if precision = "mpq" then Rational + else err "Unkown precision option: %s" precision + in + let round_ops = + match roundops with + | Some "default" -> RODefault + | Some "multi" -> ROMulti + | Some roundops -> + let mf_regex = Re.Pcre.regexp "^mainframe(\\d+)$" in + if Re.Pcre.pmatch ~rex:mf_regex roundops then + let mf_long_size = + Re.Pcre.get_substring (Re.Pcre.exec ~rex:mf_regex roundops) 1 + in + match int_of_string mf_long_size with + | (32 | 64) as sz -> ROMainframe sz + | _ -> err "Invalid long size for mainframe: %s" mf_long_size + else err "Unknown roundops option: %s" roundops + | None -> err "Unspecified roundops@." + in + let execution_mode = + match (run_tests, run_test) with + | Some s, _ -> MultipleTests s + | None, Some s -> SingleTest s + | None, None -> Extraction + in + let files = + match List.length files with + | 0 -> err "please provide at least one M source file" + | _ -> NonEmpty files + in + set_all_arg_refs files application_names without_dgfip_m debug + var_info_debug display_time print_cycles output optimize_unsafe_float + m_clean_calls comparison_error_margin income_year value_sort round_ops + backend dgfip_test_filter mpp_function dgfip_flags execution_mode; + `Run + with + | INTERNAL_FAIL m -> `Error m + | DGFIP_HELP -> `Displayed_dgfip_help diff --git a/src/mlang/utils/config.mli b/src/mlang/utils/config.mli new file mode 100644 index 000000000..42a1b38bf --- /dev/null +++ b/src/mlang/utils/config.mli @@ -0,0 +1,110 @@ +(** According on the [value_sort], a specific interpreter will be called with + the right kind of floating-point value *) +type value_sort = + | RegularFloat + | MPFR of int (** bitsize of the floats *) + | BigInt of int (** precision of the fixed point *) + | Interval + | Rational + +(** Rounding operations to use in the interpreter. They correspond to the + rounding operations used by the DGFiP calculator in different execution + contexts. + + - RODefault: rounding operations used in the PC/single-thread context + - ROMulti: rouding operations used in the PC/multi-thread context + - ROMainframe rounding operations used in the mainframe context *) +type round_ops = + | RODefault + | ROMulti + | ROMainframe of int (** size of type long, either 32 or 64 *) + +type backend = Dgfip_c | UnknownBackend + +type execution_mode = + | SingleTest of string + | MultipleTests of string + | Extraction + +type files = NonEmpty of string list + +val get_files : files -> string list + +val source_files : files ref +(** M source files to be compiled *) + +val application_names : string list ref + +val without_dgfip_m : bool ref + +val verify_flag : bool ref +(** Use Z3 to check if verif rules hold all the time *) + +val debug_flag : bool ref +(** Prints debug information *) + +val var_info_flag : bool ref +(** Print infomation about variables declared, defined ou used incorrectly *) + +val var_info_debug : string list ref +(** Prints even more information but only about some variables members of a + list *) + +val warning_flag : bool ref +(** Print warning info *) + +val no_print_cycles_flag : bool ref +(** Dump circular definitions of variables *) + +val display_time : bool ref +(** Displays timing information *) + +val output_file : string ref +(** Output file *) + +val optimize_unsafe_float : bool ref +(** Activate unsafe floating point optimizations *) + +val m_clean_calls : bool ref +(** Clean regular variables between M calls *) + +val comparison_error_margin : float ref + +val income_year : int ref + +val value_sort : value_sort ref + +val round_ops : round_ops ref + +val backend : backend ref + +val dgfip_test_filter : bool ref + +val mpp_function : string ref + +val dgfip_flags : Dgfip_options.flags ref + +val execution_mode : execution_mode ref + +val set_opts : + files:string list -> + application_names:string list -> + without_dgfip_m:bool -> + debug:bool -> + var_info_debug:string list -> + display_time:bool -> + print_cycles:bool -> + backend:string option -> + output:string option -> + run_tests:string option -> + dgfip_test_filter:bool -> + run_test:string option -> + mpp_function:string option -> + optimize_unsafe_float:bool -> + precision:string option -> + roundops:string option -> + comparison_error_margin:float option -> + income_year:int -> + m_clean_calls:bool -> + dgfip_options:string list option -> + [ `Displayed_dgfip_help | `Error of string | `Run ] diff --git a/src/mlang/dgfip_m.ml b/src/mlang/utils/dgfip_m.ml similarity index 98% rename from src/mlang/dgfip_m.ml rename to src/mlang/utils/dgfip_m.ml index 2596c8cd6..49439ed01 100644 --- a/src/mlang/dgfip_m.ml +++ b/src/mlang/utils/dgfip_m.ml @@ -57,6 +57,9 @@ variable saisie variation variable saisie penalite : attribut primrest; +variable saisie environnement +: attribut toto; + variable calculee : attribut primrest; @@ -242,7 +245,10 @@ evenement : valeur penalite : valeur base_tl : valeur date -: valeur 2042_rect; +: valeur 2042_rect +: valeur anc_penalite +: valeur id_evt +: valeur strate; |} let string_to_rule_domain_id : string -> string list = function diff --git a/src/mlang/dgfip_m.mli b/src/mlang/utils/dgfip_m.mli similarity index 100% rename from src/mlang/dgfip_m.mli rename to src/mlang/utils/dgfip_m.mli diff --git a/src/mlang/utils/dgfip_options.ml b/src/mlang/utils/dgfip_options.ml index 9d5ffdd78..1f92e0862 100644 --- a/src/mlang/utils/dgfip_options.ml +++ b/src/mlang/utils/dgfip_options.ml @@ -11,6 +11,71 @@ open Cmdliner +type flags = { + (* -m *) annee_revenu : int; + (* -P *) flg_correctif : bool; + (* flg_correctif true by default, -P makes it false *) + (* -R *) flg_iliad : bool; + (* also implied by "iliad" in !Cli.application_names; disabled by -U *) + (* -R *) flg_pro : bool; + (* also implied by "pro" in !Cli.application_names; disabled by -U *) + (* -U *) flg_cfir : bool; + (* disabled by -R *) + (* -b *) flg_gcos : bool; + (* -b0 and -b1 ; disabled by -U and -R *) + (* -b *) flg_tri_ebcdic : bool; + (* -b1 only *) + (* -s *) flg_short : bool; + (* -r *) flg_register : bool; + (* -O *) flg_optim_min_max : bool; + (* -X *) flg_extraction : bool; + (* -D *) flg_genere_libelle_restituee : bool; + (* -S *) flg_controle_separe : bool; + (* -I *) flg_controle_immediat : bool; + (* unused *) + (* -o *) flg_overlays : bool; + (* -Z *) flg_colors : bool; + (* -L *) flg_ticket : bool; + (* -t *) flg_trace : bool; + (* -g *) flg_debug : bool; + (* also implied by -t *) + (* -k *) nb_debug_c : int; + (* -x *) + xflg : bool; + (* Flags to deal with in a particular way : -c compilation mode -l link + mode -v specify the variable file (tgv.m) -e specify the error file + (err.m) *) + (* Other flags, not used in makefiles -h dir_var_h -i flg_ident + -K flg_optim_cte -G flg_listing (+genere_cre = FALSE) -p + flag_phase -f flg_ench_init -E cvt_file -g flg_debug -a flg_api -T + flg_trace_irdata *) +} + +let default_flags = + { + annee_revenu = 1991; + flg_correctif = true; + flg_iliad = false; + flg_pro = false; + flg_cfir = false; + flg_gcos = false; + flg_tri_ebcdic = false; + flg_short = false; + flg_register = false; + flg_optim_min_max = false; + flg_extraction = false; + flg_genere_libelle_restituee = false; + flg_controle_separe = false; + flg_controle_immediat = false; + flg_overlays = false; + flg_colors = false; + flg_ticket = false; + flg_trace = false; + flg_debug = false; + nb_debug_c = 0; + xflg = false; + } + let income_year = Arg.(value & opt int 1991 & info [ "m" ] ~doc:"Income year") let iliad_pro = @@ -97,72 +162,6 @@ let info = in Cmd.info "mlang --dgfip_options" ~doc ~man -(* Flags inherited from the old compiler *) -type flags = { - (* -m *) annee_revenu : int; - (* -P *) flg_correctif : bool; - (* flg_correctif true by default, -P makes it false *) - (* -R *) flg_iliad : bool; - (* also implied by "iliad" in !Cli.application_names; disabled by -U *) - (* -R *) flg_pro : bool; - (* also implied by "pro" in !Cli.application_names; disabled by -U *) - (* -U *) flg_cfir : bool; - (* disabled by -R *) - (* -b *) flg_gcos : bool; - (* -b0 and -b1 ; disabled by -U and -R *) - (* -b *) flg_tri_ebcdic : bool; - (* -b1 only *) - (* -s *) flg_short : bool; - (* -r *) flg_register : bool; - (* -O *) flg_optim_min_max : bool; - (* -X *) flg_extraction : bool; - (* -D *) flg_genere_libelle_restituee : bool; - (* -S *) flg_controle_separe : bool; - (* -I *) flg_controle_immediat : bool; - (* unused *) - (* -o *) flg_overlays : bool; - (* -Z *) flg_colors : bool; - (* -L *) flg_ticket : bool; - (* -t *) flg_trace : bool; - (* -g *) flg_debug : bool; - (* also implied by -t *) - (* -k *) nb_debug_c : int; - (* -x *) - xflg : bool; - (* Flags to deal with in a particular way : -c compilation mode -l link - mode -v specify the variable file (tgv.m) -e specify the error file - (err.m) *) - (* Other flags, not used in makefiles -h dir_var_h -i flg_ident - -K flg_optim_cte -G flg_listing (+genere_cre = FALSE) -p - flag_phase -f flg_ench_init -E cvt_file -g flg_debug -a flg_api -T - flg_trace_irdata *) -} - -let default_flags = - { - annee_revenu = 1991; - flg_correctif = true; - flg_iliad = false; - flg_pro = false; - flg_cfir = false; - flg_gcos = false; - flg_tri_ebcdic = false; - flg_short = false; - flg_register = false; - flg_optim_min_max = false; - flg_extraction = false; - flg_genere_libelle_restituee = false; - flg_controle_separe = false; - flg_controle_immediat = false; - flg_overlays = false; - flg_colors = false; - flg_ticket = false; - flg_trace = false; - flg_debug = false; - nb_debug_c = 0; - xflg = false; - } - let handler ~(application_names : string list) (income_year : int) (iliad_pro : bool) (cfir : bool) (batch : int option) (primitive_only : bool) (extraction : bool) (separate_controls : bool) @@ -201,7 +200,4 @@ let handler ~(application_names : string list) (income_year : int) let process_dgfip_options ~application_names options = let options = Array.of_list ("mlang" :: options) in let cmd = Cmd.v info (dgfip_t (handler ~application_names)) in - let res = Cmd.eval_value ~argv:options cmd in - match res with - | Ok res -> ( match res with `Ok res -> Some res | _ -> None) - | _ -> None + Cmd.eval_value ~argv:options cmd diff --git a/src/mlang/utils/dgfip_options.mli b/src/mlang/utils/dgfip_options.mli new file mode 100644 index 000000000..82572d664 --- /dev/null +++ b/src/mlang/utils/dgfip_options.mli @@ -0,0 +1,53 @@ +type flags = { + annee_revenu : int; + flg_correctif : bool; + flg_iliad : bool; + flg_pro : bool; + flg_cfir : bool; + flg_gcos : bool; + flg_tri_ebcdic : bool; + flg_short : bool; + flg_register : bool; + flg_optim_min_max : bool; + flg_extraction : bool; + flg_genere_libelle_restituee : bool; + flg_controle_separe : bool; + flg_controle_immediat : bool; + flg_overlays : bool; + flg_colors : bool; + flg_ticket : bool; + flg_trace : bool; + flg_debug : bool; + nb_debug_c : int; + xflg : bool; +} + +val default_flags : flags + +val handler : + application_names:string list -> + int -> + bool -> + bool -> + int option -> + bool -> + bool -> + bool -> + bool -> + bool -> + bool -> + bool -> + bool -> + bool -> + bool -> + int -> + bool -> + bool -> + bool -> + bool -> + flags + +val process_dgfip_options : + application_names:string list -> + string list -> + (flags Cmdliner.Cmd.eval_ok, Cmdliner.Cmd.eval_error) result diff --git a/src/mlang/utils/dune b/src/mlang/utils/dune new file mode 100644 index 000000000..7300f8e7f --- /dev/null +++ b/src/mlang/utils/dune @@ -0,0 +1,4 @@ +(library + (public_name mlang.utils) + (name utils) + (libraries re ANSITerminal cmdliner dune-build-info threads)) diff --git a/src/mlang/utils/errors.mli b/src/mlang/utils/errors.mli index 7bc005197..8b25db9ca 100644 --- a/src/mlang/utils/errors.mli +++ b/src/mlang/utils/errors.mli @@ -31,8 +31,8 @@ exception - A main error message (string). - A list of associated source code locations ([Pos.t]), each with an optional descriptive message. - - An optional thunk (continuation) to be executed after the error is - caught and displayed. *) + - An optional thunk (continuation) to be executed after the error is caught + and displayed. *) (** {2 Formatting Functions} *) @@ -41,23 +41,25 @@ val format_structured_error : (** [format_structured_error ppf (msg, pos)] formats a structured error for **human-readable** console output. It first prints the main message, followed by the code snippets corresponding to each source position, - retrieved via [Pos.retrieve_loc_text]. If a position has an - associated message, that message is printed just before its code snippet. + retrieved via [Pos.retrieve_loc_text]. If a position has an associated + message, that message is printed just before its code snippet. @param ppf The OCaml [Format] module's formatter. - @param error_data A tuple containing the main message and the list of - associated locations. *) + @param error_data + A tuple containing the main message and the list of associated locations. +*) val format_structured_error_gnu_format : Format.formatter -> string * (string option * Pos.t) list -> unit (** [format_structured_error_gnu_format ppf (msg, pos_list)] formats an error - according to **GNU standards** (`file:line:col: message`). For each location, - it prints the formatted position, the main error message, and any location-specific - message. + according to **GNU standards** (`file:line:col: message`). For each + location, it prints the formatted position, the main error message, and any + location-specific message. @param ppf The OCaml [Format] module's formatter. - @param error_data A tuple containing the main message and the list of - associated locations. *) + @param error_data + A tuple containing the main message and the list of associated locations. +*) (** {2 Error Raising Functions} *) @@ -65,46 +67,49 @@ val format_structured_error_gnu_format : [StructuredError] exception with different kinds of information. *) val raise_error : string -> 'a -(** Raises a simple [StructuredError] with only a main message and no - associated source code locations or continuation. +(** Raises a simple [StructuredError] with only a main message and no associated + source code locations or continuation. @param msg The main error message. - @raise StructuredError Always raises this exception with an empty list of - locations. *) + @raise StructuredError + Always raises this exception with an empty list of locations. *) val raise_spanned_error : string -> ?span_msg:string -> Pos.t -> 'a (** Raises a [StructuredError] that points to a single source code location. @param msg The main error message. - @param ?span_msg An optional message specific to the provided location - ([span]). + @param ?span_msg + An optional message specific to the provided location ([span]). @param span The source code position ([Pos.t]) where the error occurred. - @raise StructuredError Raises the exception with the provided message and a - single-element list containing the span and its optional message. *) + @raise StructuredError + Raises the exception with the provided message and a single-element list + containing the span and its optional message. *) val raise_multispanned_error : string -> (string option * Pos.t) list -> 'a -(** Raises a [StructuredError] that points to multiple source code - locations, each with its own optional message. +(** Raises a [StructuredError] that points to multiple source code locations, + each with its own optional message. @param msg The main error message. - @param spans A list of tuples, where each contains an optional - location-specific message and a source code position ([Pos.t]). - @raise StructuredError Raises the exception with the provided message and - list of spans. *) + @param spans + A list of tuples, where each contains an optional location-specific + message and a source code position ([Pos.t]). + @raise StructuredError + Raises the exception with the provided message and list of spans. *) val raise_spanned_error_with_continuation : string -> ?span_msg:string -> Pos.t -> (unit -> unit) -> 'a (** Raises a [StructuredError] for a single source location and includes a - continuation thunk. This thunk is a function that can be executed - by the error handler after the error message is displayed. + continuation thunk. This thunk is a function that can be executed by the + error handler after the error message is displayed. @param msg The main error message. @param ?span_msg An optional message specific to the provided location. @param span The source code position ([Pos.t]) of the error. - @param kont A function of type [unit -> unit] to be executed after error - reporting. - @raise StructuredError Raises the exception including the message, the span, - and the continuation. *) + @param kont + A function of type [unit -> unit] to be executed after error reporting. + @raise StructuredError + Raises the exception including the message, the span, and the + continuation. *) (** {2 Warning Functions} *) @@ -112,18 +117,18 @@ val raise_spanned_error_with_continuation : exception. They use the same formatting logic as the error functions. *) val print_spanned_warning : string -> ?span_msg:string -> Pos.t -> unit -(** Prints a warning message associated with a single source code location. - The output is formatted for human readability using [format_structured_error]. +(** Prints a warning message associated with a single source code location. The + output is formatted for human readability using [format_structured_error]. @param msg The main warning message. @param ?span_msg An optional message specific to the provided location. @param span The source code position ([Pos.t]) of the warning. *) val print_multispanned_warning : string -> (string option * Pos.t) list -> unit -(** Prints a warning message associated with multiple source code locations. - The output is formatted for human readability using - [format_structured_error]. +(** Prints a warning message associated with multiple source code locations. The + output is formatted for human readability using [format_structured_error]. @param msg The main warning message. - @param spans A list of tuples, each containing an optional message and a - source position. *) + @param spans + A list of tuples, each containing an optional message and a source + position. *) diff --git a/src/mlang/utils/pos.ml b/src/mlang/utils/pos.ml index f7b8dc9d3..f4800d912 100644 --- a/src/mlang/utils/pos.ml +++ b/src/mlang/utils/pos.ml @@ -78,8 +78,8 @@ let format fmt (pos : t) = type 'a marked = | Mark of 'a * t - (** Everything related to the source code should keep its t stored, to improve - error messages *) + (** Everything related to the source code should keep its t stored, to + improve error messages *) (** Placeholder t *) let none : t = diff --git a/src/mlang/utils/pos.mli b/src/mlang/utils/pos.mli index ce99340bf..2168984be 100644 --- a/src/mlang/utils/pos.mli +++ b/src/mlang/utils/pos.mli @@ -35,8 +35,8 @@ val make : string -> Lexing.position * Lexing.position -> t @param loc A tuple containing the start and end [Lexing.position]. *) val make_between : t -> t -> t -(** [make_between p1 p2] creates a new position that starts at the beginning - of [p1] and ends at the end of [p2]. +(** [make_between p1 p2] creates a new position that starts at the beginning of + [p1] and ends at the end of [p2]. @raise Failure if [p1] and [p2] are from different files. *) (** {2 Formatting} *) @@ -47,13 +47,14 @@ val format_short : Format.formatter -> t -> unit val format_gnu : Format.formatter -> t -> unit (** [format_gnu ppf pos] prints the position in a format compatible with GNU - error message standards. - (See: https://www.gnu.org/prep/standards/standards.html#Formatting-Error-Messages) *) + error message standards. (See: + https://www.gnu.org/prep/standards/standards.html#Formatting-Error-Messages) +*) val format : Format.formatter -> t -> unit (** [format ppf pos] prints a detailed, human-readable representation of the - position to the formatter [ppf]. Example: - `in file foo.ml, from 10:5 to 12:20`. *) + position to the formatter [ppf]. Example: `in file foo.ml, from 10:5 to + 12:20`. *) val retrieve_loc_text : t -> string (** [retrieve_loc_text pos] reads the source file associated with [pos] and @@ -102,7 +103,8 @@ val get_start_line : t -> int (** [get_start_line pos] returns the starting line number of the position. *) val get_start_column : t -> int -(** [get_start_column pos] returns the starting column number of the position. *) +(** [get_start_column pos] returns the starting column number of the position. +*) val get_end_line : t -> int (** [get_end_line pos] returns the ending line number of the position. *)