Browse Source

OpeningSolver : correctif

packProduct
Guillaume 3 years ago
parent
commit
3b0bd28e3d
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      Solver/Section/OpeningSolver.php

+ 5
- 1
Solver/Section/OpeningSolver.php View File

if($opening) { if($opening) {
$now = new \DateTime(); $now = new \DateTime();
if($weekDay == $now->format('N')) { if($weekDay == $now->format('N')) {
if($now < $opening->getTimeEnd()) {
$timeEnd = $opening->getTimeEnd();
$timeStart = $opening->getTimeStart();

if((($timeEnd && $now < $timeEnd) || !$timeEnd)
&& (($timeStart && $now > $timeStart) || !$timeStart) ) {
return true; return true;
} }
} }

Loading…
Cancel
Save