Loading module/Oscar/src/Oscar/Command/OscarTimesheetRecallsCommand.php +7 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,13 @@ class OscarTimesheetRecallsCommand extends OscarAdvancedCommandAbstract foreach ($declarers as $declarer) { $result = $this->getTimesheetService()->recallProcess($declarer->getId(), $period->getPeriodCode(), $processDate, $force, $preview); try { $result = $this->getTimesheetService()->recallProcess( $declarer->getId(), $period->getPeriodCode(), $processDate, $force, $preview); } catch (\Exception $e) { $this->getIO()->error($e->getMessage()); continue; } if( $result['mailSend'] ){ $snd = "<green>Mail envoyé</green>"; } else { Loading module/Oscar/src/Oscar/Service/TimesheetService.php +11 −1 Original line number Diff line number Diff line Loading @@ -3505,10 +3505,11 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat } else { if ($recallSend == null) { $recallSend = new RecallDeclaration(); $this->getEntityManager()->persist($recallSend); $recallSend->setStartProcess($processDate); $this->getEntityManager()->persist($recallSend); } try { $repport = $this->sendMailRecallDeclarer( $declarer, $periodInfos->getPeriodCode(), Loading @@ -3517,8 +3518,14 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat $processDate, $force ); $result['mailSend'] = true; $result = array_merge($result, $repport); } catch (\Exception $e) { $this->getEntityManager()->detach($recallSend); $result['recall_info'] = "Erreur d'envoi de mail : " . $e->getMessage(); } } } Loading Loading @@ -3578,6 +3585,9 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat return $recallDeclaration->getRepport(); } catch (\Exception $e) { var_dump($period); var_dump($periodInfos->getMonth()); var_dump($periodInfos->getYear()); throw new OscarException( "Un problème est survenu lors de la procédure de rappel pour $declarer pour la période $period : " . $e->getMessage( ) Loading Loading
module/Oscar/src/Oscar/Command/OscarTimesheetRecallsCommand.php +7 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,13 @@ class OscarTimesheetRecallsCommand extends OscarAdvancedCommandAbstract foreach ($declarers as $declarer) { $result = $this->getTimesheetService()->recallProcess($declarer->getId(), $period->getPeriodCode(), $processDate, $force, $preview); try { $result = $this->getTimesheetService()->recallProcess( $declarer->getId(), $period->getPeriodCode(), $processDate, $force, $preview); } catch (\Exception $e) { $this->getIO()->error($e->getMessage()); continue; } if( $result['mailSend'] ){ $snd = "<green>Mail envoyé</green>"; } else { Loading
module/Oscar/src/Oscar/Service/TimesheetService.php +11 −1 Original line number Diff line number Diff line Loading @@ -3505,10 +3505,11 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat } else { if ($recallSend == null) { $recallSend = new RecallDeclaration(); $this->getEntityManager()->persist($recallSend); $recallSend->setStartProcess($processDate); $this->getEntityManager()->persist($recallSend); } try { $repport = $this->sendMailRecallDeclarer( $declarer, $periodInfos->getPeriodCode(), Loading @@ -3517,8 +3518,14 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat $processDate, $force ); $result['mailSend'] = true; $result = array_merge($result, $repport); } catch (\Exception $e) { $this->getEntityManager()->detach($recallSend); $result['recall_info'] = "Erreur d'envoi de mail : " . $e->getMessage(); } } } Loading Loading @@ -3578,6 +3585,9 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat return $recallDeclaration->getRepport(); } catch (\Exception $e) { var_dump($period); var_dump($periodInfos->getMonth()); var_dump($periodInfos->getYear()); throw new OscarException( "Un problème est survenu lors de la procédure de rappel pour $declarer pour la période $period : " . $e->getMessage( ) Loading