correction sur la plage horaire de récupération des événements
This commit is contained in:
@@ -519,6 +519,7 @@ class ReportController extends AbstractController
|
||||
// Somme event validé avant la date
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->setTime(23,59,0);
|
||||
$events = $em
|
||||
->createQueryBuilder('event')
|
||||
->select('event')
|
||||
@@ -547,6 +548,7 @@ class ReportController extends AbstractController
|
||||
// Somme astreinte validé avant la date
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->setTime(23,59,0);
|
||||
$penaltys = $em
|
||||
->createQueryBuilder('penalty')
|
||||
->select('penalty')
|
||||
@@ -576,9 +578,11 @@ class ReportController extends AbstractController
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$start->modify('previous monday');
|
||||
$start->setTime(0,0,0);
|
||||
$endmonth = new \Datetime('first day of this month');
|
||||
$endmonth->add(new \DateInterval('P1M'));
|
||||
$endmonth->modify('next monday');
|
||||
$end->setTime(23,59,0);
|
||||
|
||||
$eventsbyweek = $em
|
||||
->createQueryBuilder('event')
|
||||
@@ -610,9 +614,11 @@ class ReportController extends AbstractController
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$start->modify('previous monday');
|
||||
$start->setTime(0,0,0);
|
||||
$endmonth = new \Datetime('first day of this month');
|
||||
$endmonth->add(new \DateInterval('P1M'));
|
||||
$endmonth->modify('next monday');
|
||||
$end->setTime(23,59,0);
|
||||
|
||||
$penaltybyweek = $em
|
||||
|
||||
@@ -654,9 +660,11 @@ class ReportController extends AbstractController
|
||||
// Formater les mois
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$start->setTime(0,0,0);
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->sub(new \DateInterval('P1D'));
|
||||
$end->setTime(23,59,0);
|
||||
while($start<$end) {
|
||||
$tbproject["months"][$start->format("Ym")]=[
|
||||
"monthid"=> $start->format("Ym"),
|
||||
@@ -743,9 +751,11 @@ class ReportController extends AbstractController
|
||||
// Formater les utilisateurs
|
||||
$start=new \Datetime('first day of this month');
|
||||
$start->sub(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$start->setTime(0,0,0);
|
||||
$end=new \Datetime('first day of this month');
|
||||
$end->add(new \DateInterval('P'.$nbmonth.'M'));
|
||||
$end->sub(new \DateInterval('P1D'));
|
||||
$end->setTime(23,59,0);
|
||||
|
||||
foreach($users as $user) {
|
||||
$tbevents = $this->getEventuser($user,$start,$end,true);
|
||||
@@ -829,7 +839,9 @@ class ReportController extends AbstractController
|
||||
private function getEventuser($user,$start,$end,$onlyvalidate) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$tbevents=[];
|
||||
|
||||
dump($user->getId());
|
||||
dump($start);
|
||||
dump($end);
|
||||
// Récupération de event
|
||||
$qb = $em
|
||||
->createQueryBuilder('event')
|
||||
|
Reference in New Issue
Block a user