Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
d47591fd
Commit
d47591fd
authored
Sep 6, 2022
by
Laurent Lecluse
Browse files
Options
Downloads
Patches
Plain Diff
Script de mise à jour automatique du taux HETD
(cherry picked from commit
01c1a18c
)
parent
1d11726e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
admin/actions/maj-taux-hetd-2022-07.php
+74
-0
74 additions, 0 deletions
admin/actions/maj-taux-hetd-2022-07.php
with
74 additions
and
0 deletions
admin/actions/maj-taux-hetd-2022-07.php
0 → 100644
+
74
−
0
View file @
d47591fd
<?php
$bdd
=
$oa
->
getBdd
();
$c
->
begin
(
'Mise à jour du taux horaire'
);
$c
->
msg
(
'Ajout du nouveau taux'
);
$dsql
=
"DELETE FROM TAUX_HORAIRE_HETD WHERE ID NOT IN (1,2)"
;
$bdd
->
exec
(
$dsql
);
$isql
=
"
INSERT INTO TAUX_HORAIRE_HETD(
ID,
VALEUR,
HISTO_CREATION,
HISTO_CREATEUR_ID,
HISTO_MODIFICATION,
HISTO_MODIFICATEUR_ID
) VALUES (
3,
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'),
(SELECT id FROM utilisateur where username='oseappli')
)
"
;
$bdd
->
exec
(
$isql
);
$vreps
=
[
'V_CONTRAT_MAIN'
=>
[
'c.histo_creation'
=>
'a.date_debut'
,
'th.histo_creation'
=>
'th.histo_modification'
,
],
'V_ETAT_PAIEMENT'
=>
[
'OSE_FORMULE . GET_TAUX_HORAIRE_HETD(NVL(mep . date_mise_en_paiement, SYSDATE))'
=>
'a.taux_hetd'
,
],
'V_EXPORT_PAIEMENT_WINPAIE'
=>
[
'ose_formule.get_taux_horaire_hetd(nvl(t2.date_mise_en_paiement, sysdate))'
=>
'(select taux_hetd from annee ann where ann.id = i.annee_id)'
,
'OSE_FORMULE.GET_TAUX_HORAIRE_HETD( NVL(t2.date_mise_en_paiement,SYSDATE) )'
=>
'(select taux_hetd from annee ann where ann.id = i.annee_id)'
,
],
'V_EXPORT_PAIEMENT_SIHAM'
=>
[
'ose_formule.get_taux_horaire_hetd(nvl(t2.date_mise_en_paiement, sysdate))'
=>
'(select taux_hetd from annee ann where ann.id = i.annee_id)'
,
],
'V_EXP_HETD_CENTRE_COUT'
=>
[
'OSE_FORMULE.GET_TAUX_HORAIRE_HETD( NVL(mep.date_mise_en_paiement,SYSDATE) )'
=>
'a.taux_hetd'
,
'OSE_FORMULE.GET_TAUX_HORAIRE_HETD( SYSDATE )'
=>
'(select taux_hetd from annee ann where ann.id = annee_id)'
,
],
'V_IMPUTATION_BUDGETAIRE_SIHAM'
=>
[
'ose_formule.get_taux_horaire_hetd(nvl(mep.date_mise_en_paiement, sysdate))'
=>
'a.taux_hetd'
,
'OSE_FORMULE.GET_TAUX_HORAIRE_HETD( NVL(mep.date_mise_en_paiement,SYSDATE) )'
=>
'a.taux_hetd'
,
],
];
foreach
(
$vreps
as
$view
=>
$reps
)
{
$c
->
msg
(
'Mise à jour de la vue '
.
$view
);
$vcm
=
$bdd
->
view
()
->
get
(
$view
);
if
(
isset
(
$vcm
[
$view
][
'definition'
]))
{
$vcm
=
$vcm
[
$view
][
'definition'
];
foreach
(
$reps
as
$s
=>
$r
)
{
$vcm
=
str_ireplace
(
$s
,
$r
,
$vcm
);
}
$bdd
->
exec
(
$vcm
);
}
}
$c
->
end
(
'Taux horaire actualisé'
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment