Commit 1b173c72 authored by Florian Joriot's avatar Florian Joriot
Browse files

Correction vue V_CONTRAT_SERVICE pour ignorer les elements et service historisé

parent 77a46d1b
Loading
Loading
Loading
Loading
Loading
+4
Changes for data/ddl/view/V_CONTRAT_SERVICES.sql: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_CONTRAT_SERVICES AS

SELECT
  t.intervenant_id,
  t.contrat_id,
@@ -69,6 +70,9 @@ FROM
        LEFT JOIN structure           str ON str.id = COALESCE(m.structure_id, sr.structure_id, ep.structure_id)
    WHERE
      tblc.actif = 1
      AND ep.histo_destruction is null
      AND s.histo_destruction is null
      AND vh.histo_destruction is null
  ) t
GROUP BY
  t.intervenant_id,