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