Skip to content
Permalink
Browse files

Fix restaurant closed when future order is enabled

  • Loading branch information...
sampoyigi committed Aug 1, 2019
1 parent 0a30c8d commit 76e708c4b33e478030121bcaa75a6c44ccf285cf
Showing with 5 additions and 9 deletions.
  1. +5 −9 classes/Location.php
@@ -126,15 +126,11 @@ public function checkOrderType($orderType = null)
$model = $this->getModel();
$method = 'has'.ucfirst($orderType);
$isOpen = !(
$workingSchedule->isClosed()
OR ($model->methodExists($method) AND !$model->$method())
);
$isOpening = (
!$this->getModel()->hasFutureOrder()
AND $workingSchedule->isOpening()
);
if ($model->methodExists($method) AND !$model->$method())
return FALSE;
$isOpen = $workingSchedule->isOpen();
$isOpening = ($workingSchedule->isOpening() AND $this->getModel()->hasFutureOrder());
return ($isOpen OR $isOpening);
}

0 comments on commit 76e708c

Please sign in to comment.
You can’t perform that action at this time.