diff --git a/gestion/lib/Service/GestionService.php b/gestion/lib/Service/GestionService.php index 0e20d79..41bebce 100644 --- a/gestion/lib/Service/GestionService.php +++ b/gestion/lib/Service/GestionService.php @@ -267,6 +267,14 @@ class GestionService { $articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue); $this->gestionBdd->insertDevisArticleFromDevisIdAndArticlesIdArray($devisId, $articleIds); } + + try{ + $this->gestionBdd->createDevisTrajetFromVCalendar($devisId,$userName); + } + catch(Exception $e){ + $this->logger->debug("error on creating devis trajet"); + } + $thanatoIsSubcontractor = $thanato["fk_thanato_type_key"] === ThanatoTypeConstant::THANATO_TYPE_SUBCONTRACTOR; if($thanatoIsSubcontractor){ $orderCreated = $this->orderBdd->createOrderFromDevisIdAndDate($devisId,$calendarStartDate,$userName); @@ -285,7 +293,7 @@ class GestionService { $this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid); $this->devisPdfService->generateDevisPdfByDevisId($devisId,$this->userConnectedUuid); $devis = $this->gestionBdd->getDevisByDevisId($devisId); - + //Move calendar attachment file to defunt folder $devisExist = $devis != null && $devis["client_entreprise"] != null; if (VCalendarHelpers::hasAttachment($vCalendarString)) { @@ -317,8 +325,6 @@ class GestionService { } } - - $this->gestionBdd->createDevisTrajetFromVCalendar($devisId,$userName); } catch(Exception $e){ $this->logger->debug("error creating devis");