Commit 4027b7a4 authored by Florian Joriot's avatar Florian Joriot
Browse files

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

parent 50aa4e9a
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