1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Minor fixes for quotas

This commit is contained in:
David Bomba 2023-04-22 09:18:52 +10:00
parent 576d3b2ab1
commit e410741665
6 changed files with 7 additions and 6 deletions

View File

@ -116,7 +116,7 @@ class RecurringInvoiceFilters extends QueryFilters
/**
* Filters the query by the users company ID.
*
* @return Illuminate\Database\Eloquent\Builder
* @return Builder
*/
public function entityFilter(): Builder
{
@ -126,7 +126,7 @@ class RecurringInvoiceFilters extends QueryFilters
/**
* Filter based on line_items product_key
*
* @param string value Product keys
* @param string $value Product keys
* @return Builder
*/
public function product_key(string $value = ''): Builder

View File

@ -30,6 +30,7 @@ class BlackListRule implements Rule
'sharklasers.com',
'100072641.help',
'yandex.com',
'bloheyz.com',
];
/**

View File

@ -136,7 +136,7 @@ class NinjaMailerJob implements ShouldQueue
->send($this->nmo->mailable);
/* Count the amount of emails sent across all the users accounts */
Cache::increment($this->company->account->key);
Cache::increment("email_quota".$this->company->account->key);
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
->send();

View File

@ -247,7 +247,7 @@ class Email implements ShouldQueue
$mailer->send($this->mailable);
Cache::increment($this->company->account->key);
Cache::increment("email_quota".$this->company->account->key);
LightLogs::create(new EmailSuccess($this->company->company_key))
->send();

View File

@ -95,7 +95,7 @@ class EmailMailer implements ShouldQueue
$mailer->send($this->email_mailable);
Cache::increment($this->email_service->company->account->key);
Cache::increment("email_quota".$this->email_service->company->account->key);
LightLogs::create(new EmailSuccess($this->email_service->company->company_key))
->send();

View File

@ -28,7 +28,7 @@ class EmailStats
*/
public static function inc($company_key)
{
Cache::increment(self::EMAIL.$company_key);
Cache::increment("email_quota".self::EMAIL.$company_key);
}
/**