Skip to content
Snippets Groups Projects
Commit ee61e644 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Modification indicateur 550,560 et 570 afin de tenir compte de la clôture...

Modification indicateur 550,560 et 570 afin de tenir compte de la clôture uniquement si elle est activée (#50952)

(cherry picked from commit a6a271d3)
parent cea33e35
No related branches found
No related tags found
No related merge requests found
......@@ -7,12 +7,12 @@ FROM
tbl_workflow w
JOIN tbl_workflow wc ON wc.intervenant_id = w.intervenant_id
JOIN intervenant i ON i.id = wc.intervenant_id
JOIN statut s ON s.id = i.statut_id
JOIN structure s ON s.id = w.structure_id
WHERE
w.etape_code = 'SERVICE_VALIDATION_REALISE'
AND w.objectif > w.realisation
AND w.atteignable = 1
AND wc.etape_code = 'CLOTURE_REALISE'
AND (wc.etape_code = 'CLOTURE_REALISE' AND s.cloture = 1)
AND wc.objectif = wc.realisation
AND w.structure_id <> i.structure_id
\ No newline at end of file
......@@ -9,13 +9,14 @@ FROM
JOIN tbl_workflow wc ON wc.intervenant_id = w.intervenant_id
JOIN intervenant i ON i.id = wc.intervenant_id
JOIN structure s ON s.id = w.structure_id
JOIN statut s ON s.id = i.statut_id
LEFT JOIN HISTO_INTERVENANT_SERVICE his ON his.INTERVENANT_ID = w.intervenant_id
WHERE
w.etape_code = 'REFERENTIEL_VALIDATION_REALISE'
AND w.objectif > w.realisation
AND w.atteignable = 1
AND wc.etape_code = 'CLOTURE_REALISE'
AND (wc.etape_code = 'CLOTURE_REALISE' AND s.cloture = 1)
AND wc.objectif = wc.realisation
AND w.structure_id = i.structure_id
......
......@@ -7,12 +7,13 @@ FROM
tbl_workflow w
JOIN tbl_workflow wc ON wc.intervenant_id = w.intervenant_id
JOIN intervenant i ON i.id = wc.intervenant_id
JOIN statut s ON s.id = i.statut_id
JOIN structure s ON s.id = w.structure_id
WHERE
w.etape_code = 'REFERENTIEL_VALIDATION_REALISE'
AND w.objectif > w.realisation
AND w.atteignable = 1
AND wc.etape_code = 'CLOTURE_REALISE'
AND (wc.etape_code = 'CLOTURE_REALISE' AND s.cloture =1)
AND wc.objectif = wc.realisation
AND w.structure_id <> i.structure_id
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment