Ajout des horaires de travail en paramètres .env

This commit is contained in:
2020-07-29 14:49:14 +02:00
parent c30bd74e6f
commit cbe0cbf4e7
3 changed files with 10 additions and 2 deletions

View File

@@ -147,8 +147,10 @@ class TimerController extends AbstractController
$officeworkstart = clone $start;
$officeworkend = clone $officeworkstart;
$officeworkstart->SetTime(9,0,0);
$officeworkend->SetTime(17,30,0);
$uStart = explode(":",$this->getParameter('officeHourStart'));
$uEnd = explode(":",$this->getParameter('officeHourEnd'));
$officeworkstart->SetTime(intval($uStart[0]),intval($uStart[1]),0);
$officeworkend->SetTime(intval($uEnd[0]),intval($uEnd[1]),0);
if ($start < $officeworkstart || $end > $officeworkend) {
$data->setAdditionalHour(true);
}else{