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

Corrections mineures vues sql

parent a366c740
No related branches found
No related tags found
No related merge requests found
Pipeline #35563 passed
...@@ -36,7 +36,8 @@ SELECT ...@@ -36,7 +36,8 @@ SELECT
'1' code_origine, '1' code_origine,
i.id intervenant_id, i.id intervenant_id,
i.nom_usuel || ',' || i.prenom nom, i.nom_usuel || ',' || i.prenom nom,
t.prime_id prime_id t.prime_id prime_id,
t.date_declaration date_declaration
FROM FROM
( (
SELECT SELECT
...@@ -50,7 +51,8 @@ FROM ...@@ -50,7 +51,8 @@ FROM
SUM(hpm.total_paie) paie_mission, SUM(hpm.total_paie) paie_mission,
SUM(hpm.total_heures_a_payer) total_heures_a_payer, SUM(hpm.total_heures_a_payer) total_heures_a_payer,
SUM(hpm.total_heures_payees) total_heures_payees, SUM(hpm.total_heures_payees) total_heures_payees,
SUM(round(hpm.total_paie * 0.1, 2)) montant_prime SUM(round(hpm.total_paie * 0.1, 2)) montant_prime,
MAX(f.histo_creation) date_declaration
FROM FROM
mission_prime mp mission_prime mp
JOIN mission m ON JOIN mission m ON
...@@ -68,6 +70,7 @@ FROM ...@@ -68,6 +70,7 @@ FROM
JOIN periode p ON JOIN periode p ON
p.ecart_mois = ROUND(MONTHS_BETWEEN(m.date_fin, a.date_debut)+ 0.5) p.ecart_mois = ROUND(MONTHS_BETWEEN(m.date_fin, a.date_debut)+ 0.5)
AND p.enseignement = 0 AND p.enseignement = 0
JOIN fichier f ON f.id = mp.declaration_id and f.histo_destruction IS NULL
WHERE WHERE
--Il faut impérativement une prime validée --Il faut impérativement une prime validée
mp.declaration_id IS NOT NULL mp.declaration_id IS NOT NULL
......
...@@ -115,7 +115,8 @@ SELECT ...@@ -115,7 +115,8 @@ SELECT
0 heures, 0 heures,
vhr.heures heures_ref, vhr.heures heures_ref,
0 heures_non_payees, CASE WHEN mnp.id IS NOT NULL
THEN 1 ELSE 0 END heures_non_payees,
mnp.libelle_court motif_non_paiement, mnp.libelle_court motif_non_paiement,
t.libelle_court tag, t.libelle_court tag,
0 service_fi, 0 service_fi,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment