Commit 47739538 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Update ServiceService.php

parent 191cd743
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -622,7 +622,11 @@ class ServiceService extends AbstractEntityService
            $service->setHistoDestruction(null);
            $service->setTypeVolumeHoraire($typeVolumeHoraire);
            $service->setChanged(true);
            try {
                $this->save($service, false);
            } catch (\Exception $e) {

            }
        }
    }

@@ -640,7 +644,11 @@ class ServiceService extends AbstractEntityService
            false
        );

        $role = $this->getServiceContext()->getSelectedIdentityRole();

        $sVolumeHoraire      = $this->getServiceVolumeHoraire();
        $sElementPedagogique = $this->getServiceElementPedagogique();


        $qb = $this->select(['id', 'elementPedagogique', 'etablissement']);
        //@formatter:off
@@ -657,6 +665,10 @@ class ServiceService extends AbstractEntityService
        $sVolumeHoraire->finderByTypeVolumeHoraire($tvhSource, $qb);
        $sVolumeHoraire->finderByEtatVolumeHoraire($evhValide, $qb);

        if ($structure = $role->getStructure()) {
            $sElementPedagogique->finderByStructure($structure, $qb);
        }

        $s = $this->getList($qb);

        $old = [];