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

Refonte de l'indicateur 320 : Ne lister que les intervenants qui n'ont pas encore de contrat édité.

parent 33e86e3f
No related branches found
No related tags found
1 merge request!55Ll bug report services
......@@ -9,11 +9,17 @@ SELECT DISTINCT
w.structure_id
FROM
tbl_workflow w
LEFT JOIN tbl_contrat c ON c.INTERVENANT_ID = w.intervenant_id AND w.structure_id = c.structure_id
JOIN intervenant i ON w.intervenant_id = i.id
JOIN statut_intervenant si ON si.id = i.statut_id
LEFT JOIN contrat c ON c.intervenant_id = w.intervenant_id
WHERE
w.atteignable = 1
AND w.etape_code = 'CONTRAT'
AND w.objectif > 0
AND w.realisation = 0
AND NVL(c.EDITE,0) <> 1
AND c.histo_destruction IS NULL
AND i.histo_destruction IS NULL
AND si.histo_destruction IS NULL
AND c.id IS NULL
AND si.peut_avoir_contrat = 1
) t
\ 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