From aa9d0c4dbc842ecc9cadc961be14695343b0aabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr> Date: Thu, 6 Jul 2023 15:44:21 +0200 Subject: [PATCH] =?UTF-8?q?historisation=20des=20volumes=20horaires=20apr?= =?UTF-8?q?=C3=A8s=20histo=20de=20la=20mission?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 83b7c8d1b73c3df75cf343388c3d17fb968c00db) --- module/Mission/src/Controller/SaisieController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/Mission/src/Controller/SaisieController.php b/module/Mission/src/Controller/SaisieController.php index 2f4084883f..18b42842b2 100755 --- a/module/Mission/src/Controller/SaisieController.php +++ b/module/Mission/src/Controller/SaisieController.php @@ -197,6 +197,11 @@ class SaisieController extends AbstractController $this->getProcessusPlafond()->beginTransaction(); try { $this->getServiceMission()->delete($mission); + //On historise les volumes horaires de la mission + $volumesHoraires = $mission->getVolumesHorairesPrevus(); + foreach( $volumesHoraires as $volumesHoraire ){ + $this->getServiceMission()->deleteVolumeHoraire($volumesHoraire); + } $this->updateTableauxBord($mission); $this->flashMessenger()->addSuccessMessage("Mission supprimée avec succès."); } catch (\Exception $e) { -- GitLab