Loading src/Command/SignatureNotificationsCommand.php +8 −1 Original line number Diff line number Diff line Loading @@ -15,14 +15,21 @@ class SignatureNotificationsCommand extends SignatureCommandAbstract { $this ->setDescription("Notifications manuelles des signatures") ->addOption('history', 'i', InputOption::VALUE_NONE) ->addOption('dateref', 'd', InputOption::VALUE_OPTIONAL, "Date de rappel", 'now') ; } protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getIO($input, $output); $dateRef = $input->getOption('dateref'); $date = new \DateTime(); if( $dateRef ){ $date = new \DateTime($dateRef); } $this->getSignatureService()->recallSignatures($date); // TODO return self::SUCCESS; Loading src/Service/SignatureService.php +4 −1 Original line number Diff line number Diff line Loading @@ -748,13 +748,14 @@ class SignatureService $daysSinceLastRecall = $dateRef->diff($from)->days; if( $daysSinceLastRecall >= $days_beetween_recalls ){ $this->recallSignature($signature); } else { $this->getLoggerService()->debug("$signature (non envoyé, delais de $days_beetween_recalls jours)"); } } } public function recallSignature(Signature $signature) :void { echo " #### $signature \n"; foreach ($signature->getRecipients() as $recipient) { if( !$recipient->isDone() ){ $this->notificationRecipientSend($recipient); Loading Loading @@ -1052,6 +1053,8 @@ class SignatureService // Obtenir le lien $link = $signatureRecipient->getUrlDocument(); $this->getLoggerService()->debug("Envoi notification pour '$signatureRecipient'"); $subject = $this->getSignatureConfigurationService()->get_mail_recipient_subject(); $message = $this->getSignatureConfigurationService()->get_mail_recipient_message(); $datas = [ Loading Loading
src/Command/SignatureNotificationsCommand.php +8 −1 Original line number Diff line number Diff line Loading @@ -15,14 +15,21 @@ class SignatureNotificationsCommand extends SignatureCommandAbstract { $this ->setDescription("Notifications manuelles des signatures") ->addOption('history', 'i', InputOption::VALUE_NONE) ->addOption('dateref', 'd', InputOption::VALUE_OPTIONAL, "Date de rappel", 'now') ; } protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getIO($input, $output); $dateRef = $input->getOption('dateref'); $date = new \DateTime(); if( $dateRef ){ $date = new \DateTime($dateRef); } $this->getSignatureService()->recallSignatures($date); // TODO return self::SUCCESS; Loading
src/Service/SignatureService.php +4 −1 Original line number Diff line number Diff line Loading @@ -748,13 +748,14 @@ class SignatureService $daysSinceLastRecall = $dateRef->diff($from)->days; if( $daysSinceLastRecall >= $days_beetween_recalls ){ $this->recallSignature($signature); } else { $this->getLoggerService()->debug("$signature (non envoyé, delais de $days_beetween_recalls jours)"); } } } public function recallSignature(Signature $signature) :void { echo " #### $signature \n"; foreach ($signature->getRecipients() as $recipient) { if( !$recipient->isDone() ){ $this->notificationRecipientSend($recipient); Loading Loading @@ -1052,6 +1053,8 @@ class SignatureService // Obtenir le lien $link = $signatureRecipient->getUrlDocument(); $this->getLoggerService()->debug("Envoi notification pour '$signatureRecipient'"); $subject = $this->getSignatureConfigurationService()->get_mail_recipient_subject(); $message = $this->getSignatureConfigurationService()->get_mail_recipient_message(); $datas = [ Loading