Skip to content
Snippets Groups Projects
Commit b35b51a9 authored by Florian Joriot's avatar Florian Joriot
Browse files

Correction de contrat sans heures qui ne devrait pas etre la

parent a4702eff
No related branches found
No related tags found
No related merge requests found
...@@ -349,12 +349,14 @@ class ContratProcess implements ProcessInterface ...@@ -349,12 +349,14 @@ class ContratProcess implements ProcessInterface
contrat c contrat c
JOIN INTERVENANT i ON c.intervenant_id = i.id JOIN INTERVENANT i ON c.intervenant_id = i.id
JOIN parametre pm ON pm.nom = 'contrat_mis' JOIN parametre pm ON pm.nom = 'contrat_mis'
JOIN type_contrat tc ON tc.code = 'CONTRAT'
LEFT JOIN LEFT JOIN
contrat ap ON c.id = ap.contrat_id AND (ap.histo_destruction IS NULL) contrat ap ON c.id = ap.contrat_id AND (ap.histo_destruction IS NULL)
LEFT JOIN LEFT JOIN
($sqlVTblContrat) vtblc ON vtblc.contrat_id = c.id ($sqlVTblContrat) vtblc ON vtblc.contrat_id = c.id
WHERE WHERE
c.histo_destruction IS NULL c.histo_destruction IS NULL
AND c.type_contrat_id = tc.id
/*@INTERVENANT_ID=c.intervenant_id*/ /*@INTERVENANT_ID=c.intervenant_id*/
/*@ANNEE_ID=i.annee_id*/ /*@ANNEE_ID=i.annee_id*/
), ),
...@@ -366,7 +368,7 @@ contrats_max_dates AS ( ...@@ -366,7 +368,7 @@ contrats_max_dates AS (
mission_id_principal, mission_id_principal,
intervenant_id, intervenant_id,
annee_id, annee_id,
MAX(COALESCE(date_fin_avenant, date_fin_contrat)) AS max_date_fin_contrat MAX(GREATEST(date_fin_avenant, date_fin_contrat)) AS max_date_fin_contrat
FROM FROM
contrat_et_avenants contrat_et_avenants
GROUP BY GROUP BY
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment