correction timer
This commit is contained in:
@@ -97,11 +97,6 @@ class TimerController extends AbstractController
|
||||
$officeworkend = clone $officeworkstart;
|
||||
$officeworkstart->SetTime(9,0,0);
|
||||
$officeworkend->SetTime(17,30,0);
|
||||
if ($start < $officeworkstart || $end > $officeworkend) {
|
||||
$timer->setAdditionalHour(true);
|
||||
}else{
|
||||
$timer->setAdditionalHour($additionalhour);
|
||||
}
|
||||
|
||||
$timer = new Entity();
|
||||
$timer->setUser($user);
|
||||
@@ -111,6 +106,11 @@ class TimerController extends AbstractController
|
||||
$timer->setDuration($duration);
|
||||
$timer->setDescription($description);
|
||||
$timer->setActivePenalty($activepenalty);
|
||||
if ($start < $officeworkstart || $end > $officeworkend) {
|
||||
$timer->setAdditionalHour(true);
|
||||
}else{
|
||||
$timer->setAdditionalHour($additionalhour);
|
||||
}
|
||||
$em->persist($timer);
|
||||
$em->flush();
|
||||
|
||||
|
Reference in New Issue
Block a user