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