mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
Fixes for plan expiry
This commit is contained in:
parent
f3c1420c59
commit
6fcab82101
@ -498,8 +498,15 @@ class Account extends BaseModel
|
||||
|
||||
$plan_expires = Carbon::parse($this->plan_expires);
|
||||
|
||||
if(!$this->payment_id && $plan_expires->gt(now()))
|
||||
return $plan_expires->diffInDays();
|
||||
if(!$this->payment_id && $plan_expires->gt(now())){
|
||||
|
||||
$diff = $plan_expires->diffInDays();
|
||||
|
||||
if($diff > 14);
|
||||
return 0;
|
||||
|
||||
return $diff;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user