double check closed
This commit is contained in:
parent
961ad45808
commit
f7e0ab4217
@ -11,13 +11,17 @@ class Crunchbutton_Order extends Cana_Table {
|
||||
case 'dishes':
|
||||
foreach ($typeItem as $item) {
|
||||
$total += Dish::o($item['id'])->price;
|
||||
if ($item['toppings']) {
|
||||
foreach ($item['toppings'] as $topping => $bleh) {
|
||||
$total += Topping::o($topping)->price;
|
||||
}
|
||||
foreach ($item['toppings'] as $topping => $bleh) {
|
||||
}
|
||||
if ($item['substitutions']) {
|
||||
foreach ($item['substitutions'] as $topping => $bleh) {
|
||||
$total += Substitution::o($topping)->price;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'sides':
|
||||
foreach ($typeItem as $item) {
|
||||
@ -76,6 +80,10 @@ class Crunchbutton_Order extends Cana_Table {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->restaurant()->open()) {
|
||||
$errors[] = 'This restaurant is closed.';
|
||||
}
|
||||
|
||||
if ($errors) {
|
||||
return $errors;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user