Commit bf6bf202 authored by Florian Joriot's avatar Florian Joriot
Browse files

getServiceTaux -> getServiceTauxRemu

parent fe708347
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -38,14 +38,14 @@ class TauxController extends AbstractController
        ]);


        $tauxListe = $this->getServiceTaux()->getTauxRemus();
        $tauxListe = $this->getServiceTaux()->getTauxRemusAnnee($tauxListe);
        $tauxListe = $this->getServiceTauxRemu()->getTauxRemus();
        $tauxListe = $this->getServiceTauxRemu()->getTauxRemusAnnee($tauxListe);

        $liste = [];

        foreach ($tauxListe as $taux) {
            //Calcul de la liste des taux
            $liste[$taux->getId()] = $this->getServiceTaux()->tauxWs($taux);
            $liste[$taux->getId()] = $this->getServiceTauxRemu()->tauxWs($taux);
        }


@@ -61,7 +61,7 @@ class TauxController extends AbstractController
        $form     = $this->getFormTaux();
        if (empty($tauxRemu)) {
            $title    = "Création d'un nouveau taux";
            $tauxRemu = $this->getServiceTaux()->newEntity();
            $tauxRemu = $this->getServiceTauxRemu()->newEntity();
        } else {
            $title = "Édition d'un taux";
        }
@@ -95,9 +95,9 @@ class TauxController extends AbstractController

        if (empty($tauxRemuValeurId)) {
            $title          = "Création d'une nouvelle valeur";
            $tauxRemuValeur = $this->getServiceTaux()->newEntityValeur();
            $tauxRemuValeur = $this->getServiceTauxRemu()->newEntityValeur();
        } else {
            $tauxRemuValeur = $this->getServiceTaux()->getTauxRemusValeur($tauxRemuValeurId);
            $tauxRemuValeur = $this->getServiceTauxRemu()->getTauxRemusValeur($tauxRemuValeurId);
            $title          = "Édition d'une valeur";
        }

@@ -123,7 +123,7 @@ class TauxController extends AbstractController
    public function supprimerAction(): \Laminas\View\Model\JsonModel
    {
        $tauxRemu = $this->getEvent()->getParam('tauxRemu');
        $this->getServiceTaux()->delete($tauxRemu, true);
        $this->getServiceTauxRemu()->delete($tauxRemu, true);

        $this->flashMessenger()->addSuccessMessage("Taux supprimée avec succès.");

@@ -145,7 +145,7 @@ class TauxController extends AbstractController
    public function supprimerValeurAction(): MessengerViewModel
    {
        $tauxRemuValeurId = $this->params()->fromRoute('tauxRemuValeur');
        $tauxRemuValeur   = $this->getServiceTaux()->getTauxRemusValeur($tauxRemuValeurId);
        $tauxRemuValeur   = $this->getServiceTauxRemu()->getTauxRemusValeur($tauxRemuValeurId);
        $this->em()->remove($tauxRemuValeur);
        $this->em()->flush();

+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ class TauxForm extends AbstractForm
        ]);
        $this->build();

        $this->setValueOptions('tauxRemu', $this->getServiceTaux()->getTauxRemusIndexable());
        $this->setValueOptions('tauxRemu', $this->getServiceTauxRemu()->getTauxRemusIndexable());
        $this->get('tauxRemu')->setEmptyOption("");
        $this->get('tauxRemu')->setLabel('Taux de référence');

@@ -84,6 +84,6 @@ class tauxRemuHydrator extends GenericHydrator
        $object->setValeur(DateTimeFromString::run($data['date']), $data['valeur']);
        $object->setCode($data['code']);
        $object->setLibelle($data['libelle']);
        $object->setTauxRemu($this->getServiceTaux()->get($data['tauxRemu']));
        $object->setTauxRemu($this->getServiceTauxRemu()->get($data['tauxRemu']));
    }
}