Commit d2db0a73 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Adaptations master plafonds-perso

parent fbace45d
Loading
Loading
Loading
Loading
+7 −5
Changes for data/ddl/package/UNICAEN_TBL/body.sql: 7 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -1565,7 +1565,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
            s.intervenant_id,
            SUM(CASE WHEN vh.MOTIF_NON_PAIEMENT_ID IS NULL THEN vh.heures ELSE 0 END) heures,
            SUM(CASE WHEN vh.MOTIF_NON_PAIEMENT_ID IS NOT NULL THEN vh.heures ELSE 0 END) heures_non_payables,
            sum(ep.taux_fc) fc
            SUM(ep.taux_fc) fc
          FROM
                 service               s
            JOIN type_volume_horaire tvh ON tvh.code = ''PREVU''
@@ -1583,11 +1583,11 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
          SELECT
            intervenant_id,
            SUM(total) AS total_hetd
            from
          FROM
            formule_resultat   fr
          JOIN type_volume_horaire tvh ON tvh.id = fr.type_volume_horaire_id
          JOIN etat_volume_horaire evh ON evh.id = fr.etat_volume_horaire_id
                where
            WHERE
            tvh.code = ''PREVU''
          GROUP BY
            intervenant_id
@@ -1626,10 +1626,11 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
                OR (tpjs.type_heure_hetd = 1  AND COALESCE(hetd.total_hetd,0) > COALESCE(tpjs.seuil_hetd,-1))
                OR (COALESCE(i_h.heures_non_payables,0) > 0 AND tpjs.obligatoire_hnp = 1 ))


          -- Le RIB n''est demandé QUE s''il est différent!!
          AND CASE
                WHEN tpjs.changement_rib = 0 OR d.id IS NULL THEN 1
                ELSE CASE WHEN replace(i.bic, '' '', '''') = replace(d.bic, '' '', '''') AND replace(i.iban, '' '', '''') = replace(d.iban, '' '', '''') THEN 0 ELSE 1 END
                ELSE CASE WHEN REPLACE(i.bic, '' '', '''') = REPLACE(d.bic, '' '', '''') AND REPLACE(i.iban, '' '', '''') = REPLACE(d.iban, '' '', '''') THEN 0 ELSE 1 END
              END = 1

          -- Filtre FC
@@ -1657,7 +1658,8 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
      v.INTERVENANT_ID,
      v.TYPE_PIECE_JOINTE_ID,
      v.HEURES_POUR_SEUIL,
      v.OBLIGATOIRE
      v.OBLIGATOIRE,
      v.HEURES_POUR_SEUIL_HETD
    FROM
      (' || QUERY_APPLY_PARAMS(viewQuery, useParams) || ') v
      FULL JOIN TBL_PIECE_JOINTE_DEMANDE t ON
+11 −11
Changes for data/ddl/table/PERIODE.php: 11 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -40,10 +40,10 @@ return [
            'length'      => 0,
            'scale'       => '0',
            'precision'   => 1,
            'nullable'    => false,
            'default'     => null,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 6,
            'commentaire' => null,
            'commentaire' => NULL,
        ],
        'HISTO_CREATEUR_ID'     => [
            'name'        => 'HISTO_CREATEUR_ID',
@@ -134,12 +134,12 @@ return [
            'type'        => 'string',
            'bdd-type'    => 'VARCHAR2',
            'length'      => 15,
            'scale'       => null,
            'precision'   => null,
            'nullable'    => false,
            'default'     => null,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 4,
            'commentaire' => null,
            'commentaire' => NULL,
        ],
        'LIBELLE_LONG'          => [
            'name'        => 'LIBELLE_LONG',
@@ -172,10 +172,10 @@ return [
            'length'      => 0,
            'scale'       => '0',
            'precision'   => 1,
            'nullable'    => false,
            'default'     => null,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 7,
            'commentaire' => null,
            'commentaire' => NULL,
        ],
    ],
];
+12 −12
Changes for data/ddl/table/TBL_PIECE_JOINTE_DEMANDE.php: 12 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -45,6 +45,18 @@ return [
            'position'    => 6,
            'commentaire' => NULL,
        ],
        'HEURES_POUR_SEUIL_HETD' => [
            'name'        => 'HEURES_POUR_SEUIL_HETD',
            'type'        => 'float',
            'bdd-type'    => 'FLOAT',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => 126,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 8,
            'commentaire' => NULL,
        ],
        'ID'                     => [
            'name'        => 'ID',
            'type'        => 'int',
@@ -93,18 +105,6 @@ return [
            'position'    => 5,
            'commentaire' => NULL,
        ],
        'HEURES_POUR_SEUIL_HETD'    => [
            'name'        => 'HEURES_POUR_SEUIL_HETD',
            'type'        => 'float',
            'bdd-type'    => 'FLOAT',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => 126,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 8,
            'commentaire' => NULL,
        ],
    ],
];

+3 −3
Changes for data/ddl/table/TYPE_PIECE_JOINTE_STATUT.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ return [
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 4,
            'position'    => 3,
            'commentaire' => NULL,
        ],
        'OBLIGATOIRE_HNP'       => [
@@ -198,7 +198,7 @@ return [
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 3,
            'position'    => 18,
            'commentaire' => NULL,
        ],
        'TYPE_HEURE_HETD'       => [
@@ -210,7 +210,7 @@ return [
            'precision'   => 1,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 18,
            'position'    => 4,
            'commentaire' => NULL,
        ],
        'TYPE_PIECE_JOINTE_ID'  => [
+6 −6
Changes for data/ddl/view/V_CONTRAT_SERVICES.sql: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ WITH services AS (
    vh.heures                               heures_totales
  FROM
              contrat                  c
	       JOIN structure              str ON str.id = c.structure_id
         JOIN STRUCTURE              str ON str.id = c.structure_id
         JOIN volume_horaire          vh ON vh.contrat_id = c.id AND vh.histo_destruction IS NULL
         JOIN service                  s ON s.id = vh.service_id
         JOIN type_intervention       ti ON ti.id = vh.type_intervention_id
@@ -37,7 +37,7 @@ servicesAutres AS (
      GROUP BY
      c.id, ti.libelle
    ) t
		GROUP by
    GROUP BY
    t.contrat_id
    )
SELECT
@@ -46,10 +46,10 @@ SELECT
  s."serviceComposante",
  s."serviceCode",
  s."serviceLibelle",
  CASE WHEN sum(s.heures_cm) = 0 THEN to_char(0) ELSE replace(ltrim(to_char(sum(s.heures_cm), '999999.00')),'.',',') END 		 "cm",
  CASE WHEN sum(s.heures_td) = 0 THEN to_char(0) ELSE replace(ltrim(to_char(sum(s.heures_td), '999999.00')),'.',',') END 		 "td",
  CASE WHEN sum(s.heures_tp) = 0 THEN to_char(0) ELSE replace(ltrim(to_char(sum(s.heures_tp), '999999.00')),'.',',') END 		 "tp",
  CASE WHEN sum(s.heures_autres) = 0 THEN to_char(0) ELSE replace(ltrim(to_char(sum(s.heures_autres), '999999.00')),'.',',') END "autres",
  CASE WHEN SUM(s.heures_cm) = 0 THEN to_char(0) ELSE REPLACE(ltrim(to_char(SUM(s.heures_cm), '999999.00')),'.',',') END      "cm",
  CASE WHEN SUM(s.heures_td) = 0 THEN to_char(0) ELSE REPLACE(ltrim(to_char(SUM(s.heures_td), '999999.00')),'.',',') END      "td",
  CASE WHEN SUM(s.heures_tp) = 0 THEN to_char(0) ELSE REPLACE(ltrim(to_char(SUM(s.heures_tp), '999999.00')),'.',',') END      "tp",
  CASE WHEN SUM(s.heures_autres) = 0 THEN to_char(0) ELSE REPLACE(ltrim(to_char(SUM(s.heures_autres), '999999.00')),'.',',') END "autres",
  SUM(heures_totales)                                                                       heures,
  SUM(heures_totales)                                                         "serviceHeures",
  MAX(sa.type_intervention_libelle)                                                 "libelleAutres"
Loading