From 8383dc1c6d88efcdec91c187eb5a30c916c8e1bd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 17 Mar 2024 16:06:06 +1100 Subject: [PATCH] Adjustments for email quotas --- app/Models/Account.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index 2a6b60717b63..4fc236da4971 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -503,8 +503,10 @@ class Account extends BaseModel } if ($this->isPaid()) { + $multiplier = $this->plan == 'enterprise' ? 2 : 1.2; + $limit = $this->paid_plan_email_quota; - $limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 30; + $limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * (20 * $multiplier); } else { $limit = $this->free_plan_email_quota; $limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 1.5;