feat #16 = majoration de temps

This commit is contained in:
afornerot 2024-07-23 13:45:08 +02:00
parent 0390c3b474
commit 138a83e8de
1 changed files with 5 additions and 1 deletions

View File

@ -94,9 +94,13 @@ class TallydayRepository extends ServiceEntityRepository
// Enlever du temps travailler les minutes sup payé // Enlever du temps travailler les minutes sup payé
$timeextra=$this->_em->getRepository("App:Timeextra")->getTimeextrauser($user, new \DateTime()); $timeextra=$this->_em->getRepository("App:Timeextra")->getTimeextrauser($user, new \DateTime());
if($timeextra[1]) { if($timeextra[1]>0) {
$ework->sub(new \DateInterval("PT".$timeextra[1]."M")); $ework->sub(new \DateInterval("PT".$timeextra[1]."M"));
} }
// Ajouter du temps sur des heures supplémentaires majorées
else {
$ework->add(new \DateInterval("PT".($timeextra[1]*-1)."M"));
}
// Nbday worked // Nbday worked
$nbdaywork=count($tbdays); $nbdaywork=count($tbdays);