From 15891e878cd8041ee2d05f87d40edabd81ce9448 Mon Sep 17 00:00:00 2001 From: arzynik Date: Wed, 7 Nov 2012 13:58:34 -0500 Subject: [PATCH] fixes #467 --- include/library/Crunchbutton/Order.php | 2 +- include/library/Crunchbutton/Restaurant.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/library/Crunchbutton/Order.php b/include/library/Crunchbutton/Order.php index 87cde2264..d6c75f4dd 100644 --- a/include/library/Crunchbutton/Order.php +++ b/include/library/Crunchbutton/Order.php @@ -85,7 +85,7 @@ class Crunchbutton_Order extends Cana_Table { $errors['closed'] = 'This restaurant is closed.'; } - if ($this->restaurant()->meetDeliveryMin($this) && $this->delivery_type == 'delivery') { + if (!$this->restaurant()->meetDeliveryMin($this) && $this->delivery_type == 'delivery') { $errors['minimum'] = 'Please meet the delivery minimum of '.$this->restaurant()->delivery_min.'.'; } diff --git a/include/library/Crunchbutton/Restaurant.php b/include/library/Crunchbutton/Restaurant.php index 047ee74fd..6ab9c5596 100644 --- a/include/library/Crunchbutton/Restaurant.php +++ b/include/library/Crunchbutton/Restaurant.php @@ -18,7 +18,7 @@ class Crunchbutton_Restaurant extends Cana_Table { return true; } $price = $this->delivery_min_amt == 'subtotal' ? $order->price : $order->final_price; - return $price < $this->delivery_min ? true : false; + return $price < $this->delivery_min ? false : true; } public function top() {