1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Refine promo rules

This commit is contained in:
Hillel Coren 2017-01-29 09:33:53 +02:00
parent c6e8ca20b7
commit 2843265ce5

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;