Loading code/formules/testArrondisseurFromService.php +3 −3 Changes for code/formules/testArrondisseurFromService.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -12,11 +12,11 @@ $fs = $container->get(\Formule\Service\FormuleService::class); $ts = $container->get(\Formule\Service\TestService::class); $intervenantId = 777000; $intervenantId = 201; //$intervenantId = 2032; $typeVolumeHoraireId = 1; $etatVolumeHoraireId = 1; $arrondir = \Formule\Entity\FormuleIntervenant::ARRONDISSEUR_FULL; $etatVolumeHoraireId = 2; $arrondir = \Formule\Entity\FormuleIntervenant::ARRONDISSEUR_MINIMAL; $fi = $fs->getFormuleServiceIntervenant($intervenantId, $typeVolumeHoraireId, $etatVolumeHoraireId); $fi->setArrondisseur($arrondir); Loading module/Formule/src/Model/Arrondisseur/Afficheur.php +10 −3 Changes for module/Formule/src/Model/Arrondisseur/Afficheur.php: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ class Afficheur $main = $ligne; echo '<table class="table table-bordered table-xs">'; echo '<tr>'; echo '<th style="min-width:5em"></th><th>Total</th>'; echo '<th style="min-width:5em"></th><th>Vol. horaire</th><th>Total</th>'; foreach (Ligne::CATEGORIES as $categorie) { if ($main->getValeur($categorie)->getValue() == 0) continue; echo '<th>' . $categorie . '</th>'; Loading @@ -48,10 +48,9 @@ class Afficheur foreach ($sl->getSubs() as $vk => $vl) { $this->affLigne($vl, $ligne, '» vol. h.', false); } echo '<tr><td colspan="13"> </td></tr>'; echo '<tr><td colspan="14"> </td></tr>'; } echo '</table>'; } Loading @@ -66,6 +65,14 @@ class Afficheur } echo '<th>' . $name . '</th>'; echo "<td>"; if ($ligne->getVolumeHoraire()){ $vh = $ligne->getVolumeHoraire(); echo $vh->getHeures(); echo " sd*=".($vh->getTauxServiceDu() * $vh->getPonderationServiceDu()); echo " hc*=".($vh->getTauxServiceCompl() * $vh->getPonderationServiceCompl()); } echo "</td>"; $this->affValeur($ligne->getValeur(Ligne::TOTAL)); foreach (Ligne::CATEGORIES as $categorie) { if ($main->getValeur($categorie)->getValue() == 0) continue; Loading module/Formule/src/Model/Arrondisseur/Arrondisseur.php +4 −4 Changes for module/Formule/src/Model/Arrondisseur/Arrondisseur.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ namespace Formule\Model\Arrondisseur; use Enseignement\Entity\Db\Service; use Formule\Entity\Db\FormuleTestIntervenant; use Formule\Entity\FormuleIntervenant; use Formule\Entity\FormuleServiceIntervenant; use Formule\Entity\FormuleVolumeHoraire; Loading @@ -30,9 +29,10 @@ class Arrondisseur $this->calculs = []; if ($fi::ARRONDISSEUR_NO == $fi->getArrondisseur()) { return; // Aucun arrondissage à effectuer } // Optimisation dangeureuse : on doit entrer dans l'arrondisseur même s'il n'est pas utilisé afin de pouvoir déboguer //if ($fi::ARRONDISSEUR_NO == $fi->getArrondisseur()) { // return; // Aucun arrondissage à effectuer //} $data = $this->makeData($fi); Loading module/Formule/src/Model/Arrondisseur/Testeur.php +15 −0 Changes for module/Formule/src/Model/Arrondisseur/Testeur.php: 15 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -40,6 +40,21 @@ class Testeur protected function controleColonnes(Ligne $ligne): void { if ($ligne->getVolumeHoraire()){ $vh = $ligne->getVolumeHoraire(); $pService = $vh->getTauxServiceDu() * $vh->getPonderationServiceDu(); $pCompl = $vh->getTauxServiceCompl() * $vh->getPonderationServiceCompl(); if ($ligne->getValeur(Ligne::CAT_SERVICE)->getValue() != 0 && $ligne->getValeur(Ligne::CAT_COMPL)->getValue() == 0){ $ligne->getValeur(Ligne::TOTAL)->setControle($vh->getHeures() * $pService); } if ($ligne->getValeur(Ligne::CAT_SERVICE)->getValue() == 0 && $ligne->getValeur(Ligne::CAT_COMPL)->getValue() != 0){ $ligne->getValeur(Ligne::TOTAL)->setControle($vh->getHeures() * $pCompl); } if (abs($pService-$pCompl) < 0.001){ // taux service = taux compl $ligne->getValeur(Ligne::TOTAL)->setControle($vh->getHeures() * $pCompl); } } foreach( $ligne->getValeurs() as $valeur ){ $value = $valeur->getValueFinale(); Loading Loading
code/formules/testArrondisseurFromService.php +3 −3 Changes for code/formules/testArrondisseurFromService.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -12,11 +12,11 @@ $fs = $container->get(\Formule\Service\FormuleService::class); $ts = $container->get(\Formule\Service\TestService::class); $intervenantId = 777000; $intervenantId = 201; //$intervenantId = 2032; $typeVolumeHoraireId = 1; $etatVolumeHoraireId = 1; $arrondir = \Formule\Entity\FormuleIntervenant::ARRONDISSEUR_FULL; $etatVolumeHoraireId = 2; $arrondir = \Formule\Entity\FormuleIntervenant::ARRONDISSEUR_MINIMAL; $fi = $fs->getFormuleServiceIntervenant($intervenantId, $typeVolumeHoraireId, $etatVolumeHoraireId); $fi->setArrondisseur($arrondir); Loading
module/Formule/src/Model/Arrondisseur/Afficheur.php +10 −3 Changes for module/Formule/src/Model/Arrondisseur/Afficheur.php: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ class Afficheur $main = $ligne; echo '<table class="table table-bordered table-xs">'; echo '<tr>'; echo '<th style="min-width:5em"></th><th>Total</th>'; echo '<th style="min-width:5em"></th><th>Vol. horaire</th><th>Total</th>'; foreach (Ligne::CATEGORIES as $categorie) { if ($main->getValeur($categorie)->getValue() == 0) continue; echo '<th>' . $categorie . '</th>'; Loading @@ -48,10 +48,9 @@ class Afficheur foreach ($sl->getSubs() as $vk => $vl) { $this->affLigne($vl, $ligne, '» vol. h.', false); } echo '<tr><td colspan="13"> </td></tr>'; echo '<tr><td colspan="14"> </td></tr>'; } echo '</table>'; } Loading @@ -66,6 +65,14 @@ class Afficheur } echo '<th>' . $name . '</th>'; echo "<td>"; if ($ligne->getVolumeHoraire()){ $vh = $ligne->getVolumeHoraire(); echo $vh->getHeures(); echo " sd*=".($vh->getTauxServiceDu() * $vh->getPonderationServiceDu()); echo " hc*=".($vh->getTauxServiceCompl() * $vh->getPonderationServiceCompl()); } echo "</td>"; $this->affValeur($ligne->getValeur(Ligne::TOTAL)); foreach (Ligne::CATEGORIES as $categorie) { if ($main->getValeur($categorie)->getValue() == 0) continue; Loading
module/Formule/src/Model/Arrondisseur/Arrondisseur.php +4 −4 Changes for module/Formule/src/Model/Arrondisseur/Arrondisseur.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ namespace Formule\Model\Arrondisseur; use Enseignement\Entity\Db\Service; use Formule\Entity\Db\FormuleTestIntervenant; use Formule\Entity\FormuleIntervenant; use Formule\Entity\FormuleServiceIntervenant; use Formule\Entity\FormuleVolumeHoraire; Loading @@ -30,9 +29,10 @@ class Arrondisseur $this->calculs = []; if ($fi::ARRONDISSEUR_NO == $fi->getArrondisseur()) { return; // Aucun arrondissage à effectuer } // Optimisation dangeureuse : on doit entrer dans l'arrondisseur même s'il n'est pas utilisé afin de pouvoir déboguer //if ($fi::ARRONDISSEUR_NO == $fi->getArrondisseur()) { // return; // Aucun arrondissage à effectuer //} $data = $this->makeData($fi); Loading
module/Formule/src/Model/Arrondisseur/Testeur.php +15 −0 Changes for module/Formule/src/Model/Arrondisseur/Testeur.php: 15 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -40,6 +40,21 @@ class Testeur protected function controleColonnes(Ligne $ligne): void { if ($ligne->getVolumeHoraire()){ $vh = $ligne->getVolumeHoraire(); $pService = $vh->getTauxServiceDu() * $vh->getPonderationServiceDu(); $pCompl = $vh->getTauxServiceCompl() * $vh->getPonderationServiceCompl(); if ($ligne->getValeur(Ligne::CAT_SERVICE)->getValue() != 0 && $ligne->getValeur(Ligne::CAT_COMPL)->getValue() == 0){ $ligne->getValeur(Ligne::TOTAL)->setControle($vh->getHeures() * $pService); } if ($ligne->getValeur(Ligne::CAT_SERVICE)->getValue() == 0 && $ligne->getValeur(Ligne::CAT_COMPL)->getValue() != 0){ $ligne->getValeur(Ligne::TOTAL)->setControle($vh->getHeures() * $pCompl); } if (abs($pService-$pCompl) < 0.001){ // taux service = taux compl $ligne->getValeur(Ligne::TOTAL)->setControle($vh->getHeures() * $pCompl); } } foreach( $ligne->getValeurs() as $valeur ){ $value = $valeur->getValueFinale(); Loading