1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Refine promo rules

This commit is contained in:
Hillel Coren 2017-01-29 09:33:36 +02:00
parent 527ded9b92
commit 10573d0f30

View File

@ -107,6 +107,11 @@ class Company extends Eloquent
return false;
}
// if they've already been pro return false
if ($this->plan_expires && $this->plan_expires != '0000-00-00') {
return false;
}
// if they've already had a discount or a promotion is active return false
if ($this->discount_expires || $this->hasActivePromo()) {
return false;