diff --git a/app/Models/Company.php b/app/Models/Company.php index 680cc92a0838..f1bfd81b9a2b 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -56,13 +56,17 @@ class Company extends Eloquent // handle promos and discounts public function hasActiveDiscount(Carbon $date = null) { - if ( ! $this->discount) { + if ( ! $this->discount || ! $this->discount_expires) { return false; } $date = $date ?: Carbon::today(); - return $this->discount_expires && $this->discount_expires->gt($date); + if ($this->plan_term == PLAN_TERM_MONTHLY) { + return $this->discount_expires->gt($date); + } else { + return $this->discount_expires->subMonths(11)->gt($date); + } } public function discountedPrice($price)