This commit is contained in:
arzynik 2012-11-07 13:58:34 -05:00
parent 488583efc8
commit 15891e878c
2 changed files with 2 additions and 2 deletions

View File

@ -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.'.';
}

View File

@ -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() {