Commit 993b04b8 authored by Florian Joriot's avatar Florian Joriot
Browse files

indicateur 430 se base sur les heures contractualisé plutot que sur le workflow

(cherry picked from commit 4027b7a4)
parent 9a4cf4d1
Loading
Loading
Loading
Loading
+3 −14
Original line number Diff line number Diff line
@@ -9,20 +9,9 @@ SELECT
FROM
  intervenant i
  JOIN tbl_workflow w ON w.intervenant_id = i.id
  JOIN statut si ON si.id = i.statut_id
  JOIN (
    SELECT DISTINCT
      c.intervenant_id,
      c.structure_id
    FROM
      contrat c
    WHERE
      c.type_contrat_id = 1 --a déjà un contrat de type 'CONTRAT'
      AND c.histo_destruction IS NULL
  ) hc ON hc.intervenant_id = i.id
  JOIN tbl_contrat c ON c.intervenant_id = i.id
WHERE
  w.atteignable = 1
  AND si.contrat = 1
  AND w.etape_code = 'CONTRAT'
  AND w.objectif > 0
  AND w.realisation < w.objectif
 No newline at end of file
  AND c.edite > 0
  AND c.edite < c.NBVH
 No newline at end of file