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

Correction Pb actualisation du point d'indice à 42,86€

parent 36b718d0
No related branches found
No related tags found
No related merge requests found
......@@ -33,40 +33,42 @@ $bdd->exec($isql);
$vreps = [
'V_CONTRAT_MAIN' => [
'c.histo_creation' => 'a.date_debut',
'left join taux_horaire_hetd( +)th[\n\(\= ._,a-zA-Z]*' => "LEFT JOIN taux_horaire_hetd th ON th.valeur = OSE_FORMULE.GET_TAUX_HORAIRE_HETD(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',
'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)',
'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)',
'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)',
'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',
'ose_formule.get_taux_horaire_hetd\( *nvl\( *mep.date_mise_en_paiement, *sysdate *\) *\)' => 'a.taux_hetd',
],
];
$dir = '/app/data/ddl/view/';
foreach ($vreps as $view => $reps) {
$c->msg('Mise à jour de la vue ' . $view);
$vcm = $bdd->view()->get($view);
$count = 0;
if (isset($vcm[$view]['definition'])) {
$vcm = $vcm[$view]['definition'];
foreach ($reps as $s => $r) {
$vcm = str_ireplace($s, $r, $vcm);
$cnt = 0;
$vcm = preg_replace('/' . $s . '/si', $r, $vcm, -1, $cnt);
$count += $cnt;
}
$c->msg('Mise à jour de la vue ' . $view.' : '.$count.' modification(s) apportée(s)');
$bdd->exec($vcm);
}
}
......
......@@ -118,8 +118,7 @@ FROM (SELECT c.*,
JOIN etat_volume_horaire evh ON evh.code = 'valide'
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 a.date_debut BETWEEN th.histo_modification AND COALESCE(th.histo_destruction, sysdate)
LEFT JOIN taux_horaire_hetd th ON th.valeur = OSE_FORMULE.GET_TAUX_HORAIRE_HETD(a.date_debut)
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment