Skip to content
Snippets Groups Projects
Commit b6313ce2 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Changement de taux HETD de juillet 2022

parent d47591fd
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ INSERT INTO TAUX_HORAIRE_HETD(
42.86,
TO_DATE('01/09/2022 00:00', 'dd/mm/YYYY HH24:MI'),
(SELECT id FROM utilisateur where username='oseappli'),
TO_DATE('01/09/2022 00:00', 'dd/mm/YYYY HH24:MI'),
TO_DATE('01/07/2022 00:00', 'dd/mm/YYYY HH24:MI'),
(SELECT id FROM utilisateur where username='oseappli')
)
";
......
......@@ -79,8 +79,8 @@ FROM (SELECT c.*,
si.libelle "statut",
replace(ltrim(to_char(COALESCE(c.total_hetd, fr.total, 0), '999999.00')), '.', ',') "totalHETD",
replace(ltrim(to_char(COALESCE(th.valeur, 0), '999999.00')), '.', ',') "tauxHoraireValeur",
COALESCE(to_char(th.histo_creation, 'dd/mm/YYYY'), 'TAUX INTROUVABLE') "tauxHoraireDate",
to_char(COALESCE(v.histo_creation, c.histo_creation), 'dd/mm/YYYY') "dateSignature",
COALESCE(to_char(th.histo_modification, 'dd/mm/YYYY'), 'TAUX INTROUVABLE') "tauxHoraireDate",
to_char(COALESCE(v.histo_creation, a.date_debut), 'dd/mm/YYYY') "dateSignature",
CASE
WHEN c.structure_id <> COALESCE(cp.structure_id, 0) THEN 'modifié'
ELSE 'complété' END "modifieComplete",
......@@ -120,7 +120,7 @@ FROM (SELECT c.*,
LEFT JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.type_volume_horaire_id = tvh.id AND
fr.etat_volume_horaire_id = evh.id
LEFT JOIN taux_horaire_hetd th
ON c.histo_creation BETWEEN th.histo_creation AND COALESCE(th.histo_destruction, sysdate)
ON a.date_debut BETWEEN th.histo_modification AND COALESCE(th.histo_destruction, sysdate)
LEFT JOIN hs ON hs.contrat_id = c.id
LEFT JOIN contrat cp ON cp.id = c.contrat_id
WHERE c.histo_destruction IS NULL) ct
\ No newline at end of file
......@@ -40,7 +40,7 @@ FROM (SELECT i.annee_id
t2.code_origine code_origine,
CASE WHEN ind <> ceil(t2.nbu / max_nbu) THEN max_nbu ELSE t2.nbu - max_nbu * (ind - 1) END nbu,
t2.nbu tnbu,
ose_formule.get_taux_horaire_hetd(nvl(t2.date_mise_en_paiement, sysdate)) montant,
(select taux_hetd from annee ann where ann.id = i.annee_id) montant,
COALESCE(t2.unite_budgetaire, '') || ' ' || to_char(i.annee_id) || ' ' || to_char(i.annee_id + 1) libelle
FROM (SELECT structure_id,
periode_paiement_id,
......
......@@ -32,7 +32,7 @@ FROM (SELECT i.annee_id
t2.code_origine code_origine,
CASE WHEN ind <> ceil(t2.nbu / max_nbu) THEN max_nbu ELSE t2.nbu - max_nbu * (ind - 1) END nbu,
t2.nbu tnbu,
ose_formule.get_taux_horaire_hetd(nvl(t2.date_mise_en_paiement, sysdate)) montant,
(select taux_hetd from annee ann where ann.id = i.annee_id) montant,
COALESCE(t2.unite_budgetaire, '') || ' ' || to_char(i.annee_id) || ' ' || to_char(i.annee_id + 1) libelle
FROM (SELECT structure_id,
periode_paiement_id,
......
......@@ -30,7 +30,7 @@ WITH t AS (
total_hetd,
cc.source_code || ' ' || cc.libelle centre_couts,
OSE_FORMULE.GET_TAUX_HORAIRE_HETD( NVL(mep.date_mise_en_paiement,SYSDATE) ) * CASE WHEN mep.id IS NULL THEN frs.total ELSE mep.heures END
a.taux_hetd * CASE WHEN mep.id IS NULL THEN frs.total ELSE mep.heures END
total_euros
FROM
formule_resultat_service frs
......@@ -62,7 +62,7 @@ WITH t AS (
type_volume_horaire, etat_volume_horaire, annee, code_intervenant, intervenant, statut_intervenant,
type_intervenant, grade, structure_enseignement, groupe_type_formation, type_formation,
code_formation, total_hetd, centre_couts,
OSE_FORMULE.GET_TAUX_HORAIRE_HETD( SYSDATE ) * total_hetd total_euros
(select taux_hetd from annee ann where ann.id = annee_id) * total_hetd total_euros
FROM (
SELECT
tvh.id type_volume_horaire_id,
......
......@@ -104,7 +104,7 @@ FROM (SELECT dep3.*,
i.numero_insee intervenant_numero_insee,
CASE
WHEN round(CASE WHEN th.code = 'fc_majorees' THEN mep.heures ELSE 0 END *
ose_formule.get_taux_horaire_hetd(nvl(mep.date_mise_en_paiement, sysdate)), 2) > 0
a.taux_hetd, 2) > 0
THEN '1542'
ELSE
CASE WHEN ti.code = 'P' THEN '="0204"' ELSE '="2251"' END
......@@ -121,7 +121,7 @@ FROM (SELECT dep3.*,
CASE WHEN th.code = 'fc_majorees' THEN mep.heures ELSE 0 END fc_majorees,
mis.heures_aa exercice_aa,
mis.heures_ac exercice_ac,
ose_formule.get_taux_horaire_hetd(nvl(mep.date_mise_en_paiement, sysdate)) taux_horaire
a.taux_hetd taux_horaire
FROM tbl_paiement mis
JOIN mise_en_paiement mep
ON mep.id = mis.mise_en_paiement_id AND mep.histo_destruction IS NULL
......
......@@ -418,6 +418,12 @@ return [
'HISTO_CREATION' => '2017-02-01 00:00:00',
'HISTO_MODIFICATION' => '2017-02-01 00:00:00',
],
[
'ID' => 3,
'VALEUR' => 42.86,
'HISTO_CREATION' => '2022-09-01 00:00:00',
'HISTO_MODIFICATION' => '2022-07-01 00:00:00',
],
],
'TBL' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment