Commit 7bb2fe35 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'master' of https://git.unicaen.fr/open-source/OSE

parents 21f66699 0cc934cd
Loading
Loading
Loading
Loading
+2 −0
Changes for CHANGELOG.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@

* Données personnelles : pouvoir pré-remplir le champs statut avec un statut non sélectionnable dans la liste. (#45216)
* Budget/Liquidation : afficher le nombre de HETD uniquement des HCO et non les HETD des HCO + Heures de service
* Notes : Afficher le bon utilisateur pour la validation de service (#45413).
* Forcer l'activiation de l'étape pièces justificatives même si il n'y a pas de service prévisionnel de renseigné.

# OSE 18.2 (15/06/2022)

+126 −137

File changed.

Preview size limit exceeded, changes collapsed.

+680 −317

File changed.

Preview size limit exceeded, changes collapsed.

+35 −29
Changes for data/ddl/view/V_CONTRAT_MAIN.sql: 35 added lines, 29 removed lines.
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_CONTRAT_MAIN AS
CREATE
OR REPLACE FORCE VIEW V_CONTRAT_MAIN AS
WITH hs AS (
  SELECT contrat_id, sum(heures) "serviceTotal", max("libelleAutres") "libelleAutres" FROM V_CONTRAT_SERVICES GROUP BY contrat_id
  SELECT contrat_id, SUM(heures) "serviceTotal", MAX("libelleAutres") "libelleAutres" FROM V_CONTRAT_SERVICES GROUP BY contrat_id
)
SELECT
  ct.annee_id,
SELECT ct.annee_id,
       ct.structure_id,
       ct.intervenant_id,
       ct.formule_resultat_id,
@@ -23,10 +23,10 @@ SELECT
       ct."tauxHoraireDate",
       ct."dateSignature",
       ct."modifieComplete",
  CASE WHEN ct.est_contrat=1 THEN 1 ELSE null END "contrat1",
  CASE WHEN ct.est_contrat=1 THEN null ELSE 1 END "avenant1",
       CASE WHEN ct.est_contrat = 1 THEN 1 ELSE NULL END  "contrat1",
       CASE WHEN ct.est_contrat = 1 THEN NULL ELSE 1 END  "avenant1",
       CASE WHEN ct.est_contrat = 1 THEN '3' ELSE '2' END "n",
  to_char(SYSDATE, 'dd/mm/YYYY - hh24:mi:ss') "horodatage",
       to_char(sysdate, 'dd/mm/YYYY - hh24:mi:ss')        "horodatage",
       'Exemplaire à conserver'                           "exemplaire1",
       'Exemplaire à retourner' || ct."exemplaire2"       "exemplaire2",
       ct."serviceTotal",
@@ -40,7 +40,8 @@ SELECT
                   'Avenant au contrat de travail initial modifiant le volume horaire initial'
                   || ' de recrutement en qualité'
           END                                            "titre",
  CASE WHEN ct.est_atv = 1 THEN
       CASE
           WHEN ct.est_atv = 1 THEN
               'd''agent temporaire vacataire'
           ELSE
               'de chargé' || ct."e" || ' d''enseignement vacataire'
@@ -52,10 +53,7 @@ SELECT
           WHEN ct.est_projet = 1 AND ct.est_contrat = 0 THEN 'Projet d''avenant'
           WHEN ct.est_projet = 0 AND ct.est_contrat = 0 THEN 'Avenant n°' || ct.contrat_id || '.' || ct.numero_avenant
           END                                            "titreCourt"
FROM
(
  SELECT
    c.*,
FROM (SELECT c.*,
             i.annee_id                                                                          annee_id,
             fr.id                                                                               formule_resultat_id,
             s.libelle_court                                                                     "composante",
@@ -83,24 +81,32 @@ FROM
             replace(ltrim(to_char(COALESCE(th.valeur, 0), '999999.00')), '.', ',')              "tauxHoraireValeur",
             COALESCE(to_char(th.histo_creation, 'dd/mm/YYYY'), 'TAUX INTROUVABLE')              "tauxHoraireDate",
             to_char(COALESCE(v.histo_creation, c.histo_creation), 'dd/mm/YYYY')                 "dateSignature",
    CASE WHEN c.structure_id <> COALESCE(cp.structure_id,0) THEN 'modifié' ELSE 'complété' END    "modifieComplete",
    CASE WHEN s.aff_adresse_contrat = 1 THEN
      ' signé à l''adresse suivante :' || CHR(13) || CHR(10) ||
      s.libelle_court || ' - ' || REPLACE(ose_divers.formatted_adresse(
             CASE
                 WHEN c.structure_id <> COALESCE(cp.structure_id, 0) THEN 'modifié'
                 ELSE 'complété' END                                                             "modifieComplete",
             CASE
                 WHEN s.aff_adresse_contrat = 1 THEN
                         ' signé à l''adresse suivante :' || chr(13) || chr(10) ||
                         s.libelle_court || ' - ' || replace(ose_divers.formatted_adresse(
                                                                     s.adresse_precisions, s.adresse_lieu_dit,
        s.adresse_numero, s.adresse_numero_compl_id, s.adresse_voirie_id, s.adresse_voie,
        s.adresse_code_postal, s.adresse_commune, s.adresse_pays_id
      ), CHR(13), ' - ')
                                                                     s.adresse_numero, s.adresse_numero_compl_id,
                                                                     s.adresse_voirie_id, s.adresse_voie,
                                                                     s.adresse_code_postal, s.adresse_commune,
                                                                     s.adresse_pays_id
                                                                 ), chr(13), ' - ')
                 ELSE '' END                                                                     "exemplaire2",
             replace(ltrim(to_char(COALESCE(hs."serviceTotal", 0), '999999.00')), '.', ',')      "serviceTotal",
    CASE WHEN hs."libelleAutres" IS NOT NULL THEN '*Dont type(s) intervention(s) : ' ||  hs."libelleAutres" END "legendeAutresHeures",
    CASE WHEN hs."libelleAutres" IS NOT NULL THEN 'Autres heures*' ELSE 'Autres heures' END                         "enteteAutresHeures",
             CASE
                 WHEN hs."libelleAutres" IS NOT NULL
                     THEN '*Dont type(s) intervention(s) : ' || hs."libelleAutres" END           "legendeAutresHeures",
             CASE
                 WHEN hs."libelleAutres" IS NOT NULL THEN 'Autres heures*'
                 ELSE 'Autres heures' END                                                        "enteteAutresHeures",
             CASE WHEN c.contrat_id IS NULL THEN 1 ELSE 0 END                                    est_contrat,
             CASE WHEN v.id IS NULL THEN 1 ELSE 0 END                                            est_projet,
    CASE WHEN LOWER(si.codes_corresp_1) = 'oui' THEN 1 ELSE 0 END                                 est_atv
             CASE WHEN LOWER(si.codes_corresp_2) = 'oui' THEN 1 ELSE 0 END                       est_atv

  FROM
              contrat               c
      FROM contrat c
               JOIN type_contrat tc ON tc.id = c.type_contrat_id
               JOIN intervenant i ON i.id = c.intervenant_id
               JOIN annee a ON a.id = i.annee_id
@@ -111,10 +117,10 @@ FROM
               LEFT JOIN validation v ON v.id = c.validation_id AND v.histo_destruction IS NULL
               JOIN type_volume_horaire tvh ON tvh.code = 'PREVU'
               JOIN etat_volume_horaire evh ON evh.code = 'valide'
    LEFT JOIN formule_resultat     fr ON fr.intervenant_id = i.id AND fr.type_volume_horaire_id = tvh.id AND fr.etat_volume_horaire_id = evh.id
    LEFT JOIN taux_horaire_hetd    th ON c.histo_creation BETWEEN th.histo_creation AND COALESCE(th.histo_destruction,SYSDATE)
               LEFT JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.type_volume_horaire_id = tvh.id AND
                                                fr.etat_volume_horaire_id = evh.id
               LEFT JOIN taux_horaire_hetd th
                         ON c.histo_creation BETWEEN th.histo_creation AND COALESCE(th.histo_destruction, sysdate)
               LEFT JOIN hs ON hs.contrat_id = c.id
               LEFT JOIN contrat cp ON cp.id = c.contrat_id
  WHERE
    c.histo_destruction IS NULL
) ct
 No newline at end of file
      WHERE c.histo_destruction IS NULL) ct
 No newline at end of file
+7 −5
Changes for data/ddl/view/V_EXPORT_PAIEMENT_SIHAM.sql: 7 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -16,17 +16,19 @@ SELECT annee_id,
       ose_paiement.get_annee_extraction_paie()                              date_pecuniaire,
       nbu                                                                   nombre_d_unites,
       montant                                                               montant,
       libelle || ' ' || lpad(to_char(floor(nbu)), 2, '00') || ' H' ||
       CASE to_char(round(nbu - floor(nbu), 2) * 100, '00')
           WHEN ' 00' THEN ''
           ELSE ' ' || lpad(round(nbu - floor(nbu), 2) * 100, 2, '00') END   libelle,
       'DN ' || type_intervenant_code || ' '
           || substr(UPPER(structure_libelle), 0, 10)
           || ' ' || annee_libelle                                           libelle,
       'B'                                                                   mode_de_calcul,
       code_origine                                                          code_origine
FROM (SELECT i.annee_id                                                                                        annee_id,
             a.libelle                                                                                         annee_libelle,
             ti.id                                                                                             type_intervenant_id,
             ti.code                                                                                           type_intervenant_code,
             i.code_rh                                                                                         code_rh,
             t2.structure_id                                                                                   structure_id,
             s.libelle_court                                                                                   structure_libelle,
             s.source_code                                                                                     structure_code,
             t2.periode_paiement_id                                                                            periode_id,
             i.id                                                                                              intervenant_id,
             CASE
@@ -102,5 +104,5 @@ FROM (SELECT 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 = t2.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
Loading