Commit 8ef7ece8 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction mauvaise prise en compte dans la feuille de route lors de...

Correction mauvaise prise en compte dans la feuille de route lors de l'archivage d'un pièce jointe et de l'ajout d'une nouvelle pièce jointe pas encore validée (#39195).
parent dd9f64c3
......@@ -1406,7 +1406,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
pjd.intervenant_id intervenant_id,
CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee,
SUM(CASE WHEN pjf.id IS NULL THEN 0 ELSE 1 END) fournie,
SUM(CASE WHEN pjf.validation_id IS NULL THEN 0 ELSE 1 END) validee,
MAX(pjf.validation_id) keep(DENSE_RANK FIRST ORDER BY pjf.annee_id DESC) validee,
COALESCE(pjd.heures_pour_seuil,0) heures_pour_seuil,
COALESCE(pjd.obligatoire,1) obligatoire
FROM
......@@ -1429,7 +1429,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
pjf.intervenant_id intervenant_id,
0 demandee,
1 fournie,
SUM(CASE WHEN pjf.validation_id IS NULL THEN 0 ELSE 1 END) validee,
MAX(pjf.validation_id) keep(DENSE_RANK FIRST ORDER BY pjf.annee_id DESC) validee,
0 heures_pour_seuil,
0 obligatoire
FROM
......@@ -1449,7 +1449,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
intervenant_id,
demandee,
CASE WHEN fournie <> 0 THEN 1 ELSE 0 END fournie,
CASE WHEN validee <> 0 THEN 1 ELSE 0 END validee,
CASE WHEN validee IS NULL THEN 0 ELSE 1 END validee,
heures_pour_seuil,
obligatoire
FROM
......
......@@ -6,7 +6,7 @@ WITH t AS (
pjd.intervenant_id intervenant_id,
CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee,
SUM(CASE WHEN pjf.id IS NULL THEN 0 ELSE 1 END) fournie,
SUM(CASE WHEN pjf.validation_id IS NULL THEN 0 ELSE 1 END) validee,
MAX(pjf.validation_id) keep(DENSE_RANK FIRST ORDER BY pjf.annee_id DESC) validee,
COALESCE(pjd.heures_pour_seuil,0) heures_pour_seuil,
COALESCE(pjd.obligatoire,1) obligatoire
FROM
......@@ -29,7 +29,7 @@ WITH t AS (
pjf.intervenant_id intervenant_id,
0 demandee,
1 fournie,
SUM(CASE WHEN pjf.validation_id IS NULL THEN 0 ELSE 1 END) validee,
MAX(pjf.validation_id) keep(DENSE_RANK FIRST ORDER BY pjf.annee_id DESC) validee,
0 heures_pour_seuil,
0 obligatoire
FROM
......@@ -49,7 +49,7 @@ SELECT
intervenant_id,
demandee,
CASE WHEN fournie <> 0 THEN 1 ELSE 0 END fournie,
CASE WHEN validee <> 0 THEN 1 ELSE 0 END validee,
CASE WHEN validee IS NULL THEN 0 ELSE 1 END validee,
heures_pour_seuil,
obligatoire
FROM
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment