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

finalisation multi-structures pour gestion/paiement

parent b0ba14b3
Loading
Loading
Loading
Loading
+3 −1
Changes for data/ddl/view/V_EXPORT_PAIEMENT_INDEMNITES.sql: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@ WITH heures_paie_mission AS(
SELECT
	t.annee_id           			annee_id,
	ti.id				 		    type_intervenant,
	i.structure_id		 				structure_id,
	str.id	   	 				    structure_id,
    str.ids	   	 	                structure_ids,
	t.periode_id         			periode_id,
	t.periode_code		   			periode_code,
	i.id         			        intervenant_id,
@@ -71,3 +72,4 @@ JOIN intervenant i ON t.intervenant_id = i.id
LEFT JOIN intervenant_dossier d ON d.intervenant_id = i.id AND d.histo_destruction IS NULL
JOIN statut s ON s.id = i.statut_id
JOIN type_intervenant ti ON ti.id = s.type_intervenant_id
LEFT JOIN structure str ON str.id = i.structure_id
 No newline at end of file
+13 −5
Changes for data/ddl/view/V_EXPORT_PAIEMENT_SIHAM.sql: 13 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ CREATE OR REPLACE FORCE VIEW V_EXPORT_PAIEMENT_SIHAM AS
SELECT annee_id,
       type_intervenant_id,
       structure_id,
       structure_ids,
       periode_id,
       CASE WHEN type_paie IS NOT NULL THEN type_paie ELSE 'P' END       type,
       code_rh                                                           matricule,
@@ -28,6 +29,7 @@ FROM (SELECT i.annee_id
             ti.code                                                                                           type_intervenant_code,
             i.code_rh                                                                                         code_rh,
             t2.structure_id                                                                                   structure_id,
             t2.structure_ids                                                                                  structure_ids,
             s.libelle_court                                                                                   structure_libelle,
             s.source_code                                                                                     structure_code,
             t2.periode_paiement_id                                                                            periode_id,
@@ -51,6 +53,7 @@ FROM (SELECT i.annee_id
             si.type_paie_prime																				   type_paie_prime,
             si.mode_calcul_prime																			   mode_calcul_prime
      FROM (SELECT structure_id,
                   structure_ids,
                   periode_paiement_id,
                   intervenant_id,
                   code_origine,
@@ -62,7 +65,8 @@ FROM (SELECT i.annee_id
            FROM (WITH mep AS (SELECT
                                   -- pour les filtres
                                   mep.id,
                                   mis.structure_id,
                                   str.id structure_id,
                                   str.ids structure_ids,
                                   mep.periode_paiement_id,
                                   mis.intervenant_id,
                                   mep.heures,
@@ -77,11 +81,13 @@ FROM (SELECT i.annee_id
                                             ON mep.id = mis.mise_en_paiement_id AND mep.histo_destruction IS NULL
                                        JOIN centre_cout cc ON cc.id = mep.centre_cout_id
                                        JOIN type_heures th ON th.id = mep.type_heures_id
                                        JOIN structure str ON str.id = mis.structure_id
                               WHERE mep.date_mise_en_paiement IS NOT NULL
                                 AND mep.periode_paiement_id IS NOT NULL
                                 AND th.eligible_extraction_paie = 1)
                  SELECT mep.id,
                         mep.structure_id,
                         str.id structure_id,
                         str.ids structure_ids,
                         mep.periode_paiement_id,
                         mep.intervenant_id,
                         2             code_origine,
@@ -90,13 +96,14 @@ FROM (SELECT i.annee_id
                         mep.date_mise_en_paiement,
                         mep.taux_horaire,
						 mep.taux_conges_payes
                  FROM mep
                  FROM mep JOIN structure str ON str.id = mep.structure_id
                  WHERE mep.heures_aa > 0

                  UNION ALL

                  SELECT mep.id,
                         mep.structure_id,
                         str.id structure_id,
                         str.ids structure_ids,
                         mep.periode_paiement_id,
                         mep.intervenant_id,
                         1             code_origine,
@@ -105,9 +112,10 @@ FROM (SELECT i.annee_id
                         mep.date_mise_en_paiement,
						 mep.taux_horaire,
                         mep.taux_conges_payes
                  FROM mep
                  FROM mep JOIN structure str ON str.id = mep.structure_id
                  WHERE mep.heures_ac > 0) t1
            GROUP BY structure_id,
                     structure_ids,
                     periode_paiement_id,
                     intervenant_id,
                     code_origine,
+12 −3
Changes for data/ddl/view/V_EXPORT_PAIEMENT_WINPAIE.sql: 12 added lines, 3 removed lines.
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_EXPORT_PAIEMENT_WINPAIE AS
CREATE OR REPLACE VIEW V_EXPORT_PAIEMENT_WINPAIE AS
SELECT annee_id,
       type_intervenant_id,
       structure_id,
       structure_ids,
       periode_id,
       intervenant_id,
       insee,
@@ -22,6 +23,7 @@ FROM (SELECT i.annee_id
             ti.id                                                                                             type_intervenant_id,
             ti.code                                                                                           type_intervenant_code,
             t2.structure_id                                                                                   structure_id,
             t2.structure_ids                                                                                  structure_ids,
             t2.periode_paiement_id                                                                            periode_id,
             i.id                                                                                              intervenant_id,
             CASE
@@ -42,6 +44,7 @@ FROM (SELECT i.annee_id
             si.type_paie_prime																				   type_paie_prime,
             si.mode_calcul_prime																			   mode_calcul_prime
      FROM (SELECT structure_id,
                   structure_ids,
                   periode_paiement_id,
                   intervenant_id,
                   code_origine,
@@ -53,7 +56,8 @@ FROM (SELECT i.annee_id
            FROM (WITH mep AS (SELECT
                                   -- pour les filtres
                                   mep.id,
                                   mis.structure_id,
                                   str.id structure_id,
                                   str.ids structure_ids,
                                   mep.periode_paiement_id,
                                   mis.intervenant_id,
                                   mep.heures,
@@ -68,11 +72,13 @@ FROM (SELECT i.annee_id
                                             ON mep.id = mis.mise_en_paiement_id AND mep.histo_destruction IS NULL
                                        JOIN centre_cout cc ON cc.id = mep.centre_cout_id
                                        JOIN type_heures th ON th.id = mep.type_heures_id
                                        JOIN structure str ON str.id = mis.structure_id
                               WHERE mep.date_mise_en_paiement IS NOT NULL
                                 AND mep.periode_paiement_id IS NOT NULL
                                 AND th.eligible_extraction_paie = 1)
                  SELECT mep.id,
                         mep.structure_id,
                         mep.structure_ids,
                         mep.periode_paiement_id,
                         mep.intervenant_id,
                         2             code_origine,
@@ -87,7 +93,8 @@ FROM (SELECT i.annee_id
                  UNION ALL

                  SELECT mep.id,
                         mep.structure_id,
                         str.id structure_id,
                         str.ids structure_ids,
                         mep.periode_paiement_id,
                         mep.intervenant_id,
                         1             code_origine,
@@ -97,8 +104,10 @@ FROM (SELECT i.annee_id
                         mep.taux_horaire,
                         mep.taux_conges_payes
                  FROM mep
                    JOIN structure str ON str.id = mep.structure_id
                  WHERE mep.heures_ac > 0) t1
            GROUP BY structure_id,
                     structure_ids,
                     periode_paiement_id,
                     intervenant_id,
                     code_origine,
+9
Changes for data/etats_sortie.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ return [
    "STRUCTURE_ID": {
        "visible": false
    },
    "STRUCTURE_IDS": {
        "visible": false
    },
    "PERIODE_ID": {
        "visible": false
    },
@@ -150,6 +153,9 @@ return [
    "STRUCTURE_ID": {
        "visible": false
    },
    "STRUCTURE_IDS": {
        "visible": false
    },
    "PERIODE_ID": {
        "visible": false
    },
@@ -209,6 +215,9 @@ return [
    "STRUCTURE_ID": {
        "visible": false
    },
    "STRUCTURE_IDS": {
        "visible": false
    },
    "PERIODE_ID": {
        "visible": false
    },
+1 −1
Changes for module/Application/src/Service/EtatSortieService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ class EtatSortieService extends AbstractEntityService
        $role = $this->getServiceContext()->getSelectedIdentityRole(); // à fournir à l'évaluateur...


        if (trim($etatSortie->getCsvTraitement())) {
        if (trim($etatSortie->getCsvTraitement() ?? '')) {
            $__PHP__CODE__TRAITEMENT__ = $etatSortie->getCsvTraitement();
            // Isolation de traitement pour éviter tout débordement...
            $traitement = function () use ($csv, $etatSortie, $data, $filtres, $entityManager, $role, $options, $__PHP__CODE__TRAITEMENT__) {
Loading