Commit 199efd5c authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Arrondisseur presque OK

parent 6a06d981
Loading
Loading
Loading
Loading
Loading
+0 −1
Changes for module/Formule/src/Controller/AffichageController.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ use Formule\Model\FormuleDetailsExtractor;
use Formule\Service\AfficheurServiceAwareTrait;
use Formule\Service\FormuleServiceAwareTrait;
use Intervenant\Entity\Db\Intervenant;
use Service\Entity\Db\EtatVolumeHoraire;
use Service\Entity\Db\TypeVolumeHoraire;
use Service\Service\EtatVolumeHoraireServiceAwareTrait;
use UnicaenVue\View\Model\AxiosModel;
+6 −7
Changes for module/Formule/src/Model/Arrondisseur/Arrondisseur.php: 6 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -124,8 +124,14 @@ class Arrondisseur

    protected function preparationHorizontaleDescendante(Ligne $data): void
    {
        /* le total général est recalculé */
        $ct = $this->addCalcul($data->getValeur(Ligne::TOTAL));
        $ct->addValeur($data->getValeur(Ligne::CAT_TYPE_PRIME));

        // Sous-total par catégorie
        foreach (Ligne::CATEGORIES as $categorie) {
            $ct->addValeur($data->getValeur($categorie));

            $cc = $this->addCalcul($data->getValeur($categorie));
            $cc->addValeur($data->getValeur($categorie . Ligne::TYPE_ENSEIGNEMENT));
            $cc->addValeur($data->getValeur($categorie . Ligne::TYPE_REFERENTIEL));
@@ -136,13 +142,6 @@ class Arrondisseur
                $ceth->addValeur($data->getValeur($categorie . $type));
            }
        }

        /* le total général est recalculé */
        $totalGeneral = $data->getValeur(Ligne::CAT_TYPE_PRIME)->getValueFinale();
        foreach (Ligne::CATEGORIES as $categorie) {
            $totalGeneral += $data->getValeur($categorie)->getValueFinale();
        }
        $data->getValeur(Ligne::TOTAL)->setValue(round($totalGeneral, 2));
    }


+5 −1
Changes for module/Formule/src/Model/Arrondisseur/Testeur.php: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -190,10 +190,14 @@ class Testeur


        if ($this->depassementServiceDuSansHC) {
            if ($sTotal > $hetd) {
            if ($vh->getHeures() > 0 && $sTotal > $hetd) {
                $erreurs++;
                $total->addError('Le total HETD est trop important par rapport au nombre d\'heures saisies (' . $hetd . ')');
            }
            if ($vh->getHeures() < 0 && $sTotal < $hetd) {
                $erreurs++;
                $total->addError('Le total HETD est trop petit par rapport au nombre d\'heures saisies (' . $hetd . ')');
            }
        } else {
            if ($sTotal != $hetd) {
                $erreurs++;