Commit 02667f53 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction #47678

parent 9885c106
Loading
Loading
Loading
Loading
+21 −19
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_EXPORT_PAIEMENT_SIHAM AS
CREATE
OR REPLACE FORCE VIEW V_EXPORT_PAIEMENT_SIHAM AS
SELECT annee_id,
       type_intervenant_id,
       structure_id,
       periode_id,
       'P'                                                                   TYPE,
       'P'                                                               type,
       code_rh                                                           matricule,
       CASE WHEN type_intervenant_code = 'P' THEN '200204' ELSE '202251' END retenue,
       CASE WHEN type_intervenant_code = 'P' THEN '0204' ELSE '1578' END code_indemnite_retenu,
       ose_paiement.get_format_mois_du()                                 du_mois,
       '20' || ose_paiement.get_annee_extraction_paie()                  annee_de_paye,
       ose_paiement.get_mois_extraction_paie()                           mois_de_paye,
       '01'                                                              numero_de_remise,
       'N'                                                               tg_specifique,
       'A definir'                                                       dossier_de_paye,
       '01/' || ose_paiement.get_mois_extraction_paie() || '/20' ||
@@ -37,7 +39,7 @@ FROM (SELECT i.annee_id
                 END                                                                                           insee,
             i.nom_usuel || ',' || i.prenom                                                                    nom,
             t2.code_origine                                                                                   code_origine,
             CASE WHEN ind <> CEIL(t2.nbu / max_nbu) THEN max_nbu ELSE t2.nbu - max_nbu * (ind - 1) END        nbu,
             CASE WHEN ind <> ceil(t2.nbu / max_nbu) THEN max_nbu ELSE t2.nbu - max_nbu * (ind - 1) END        nbu,
             t2.nbu                                                                                            tnbu,
             (SELECT taux_hetd FROM annee ann WHERE ann.id = i.annee_id)                                       montant,
             COALESCE(t2.unite_budgetaire, '') || ' ' || to_char(i.annee_id) || ' ' || to_char(i.annee_id + 1) libelle
@@ -97,11 +99,11 @@ FROM (SELECT i.annee_id
                     unite_budgetaire,
                     date_mise_en_paiement) t2
               JOIN (SELECT level ind, 99 max_nbu FROM dual CONNECT BY 1=1 AND LEVEL <= 11) tnbu
                    ON CEIL(t2.nbu / max_nbu) >= ind
                    ON ceil(t2.nbu / max_nbu) >= ind
               JOIN intervenant i ON i.id = t2.intervenant_id
               JOIN annee a ON a.id = i.annee_id
               LEFT JOIN intervenant_dossier d ON i.id = d.intervenant_id AND d.histo_destruction IS NULL
               JOIN statut si ON si.id = i.statut_id
               JOIN type_intervenant ti ON ti.id = si.type_intervenant_id
               JOIN STRUCTURE s ON s.id = i.structure_id) t3
               JOIN structure s ON s.id = i.structure_id) t3
ORDER BY annee_id, type_intervenant_id, structure_id, periode_id, nom, code_origine, nbu DESC
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@ return [
    "MATRICULE": {
        "libelle": "Matricule"
    },
     "RETENUE": {
        "libelle": "Retenue"
    },
     "CODE_INDEMNITE_RETENU": {
        "libelle": "Code indemnité/retenue"
    }
     "DU_MOIS": {
        "libelle": "Du mois (AAAA-MM)"
    },