mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refactor email limits on hosted
This commit is contained in:
parent
dfdd5437d5
commit
879bca1fd1
@ -33,7 +33,7 @@ class Account extends BaseModel
|
|||||||
use PresentableTrait;
|
use PresentableTrait;
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
|
||||||
private $free_plan_email_quota = 50;
|
private $free_plan_email_quota = 20;
|
||||||
|
|
||||||
private $paid_plan_email_quota = 500;
|
private $paid_plan_email_quota = 500;
|
||||||
/**
|
/**
|
||||||
@ -390,11 +390,11 @@ class Account extends BaseModel
|
|||||||
|
|
||||||
if($this->isPaid()){
|
if($this->isPaid()){
|
||||||
$limit = $this->paid_plan_email_quota;
|
$limit = $this->paid_plan_email_quota;
|
||||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$limit = $this->free_plan_email_quota;
|
$limit = $this->free_plan_email_quota;
|
||||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
|
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
return min($limit, 5000);
|
return min($limit, 5000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user