mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 16:04:32 -04:00
Fixes for account reference
This commit is contained in:
parent
2bd5c35775
commit
2ec4adc4c8
@ -365,10 +365,10 @@ class Account extends BaseModel
|
|||||||
if(is_null(Cache::get("throttle_notified:{$this->key}"))) {
|
if(is_null(Cache::get("throttle_notified:{$this->key}"))) {
|
||||||
|
|
||||||
$nmo = new NinjaMailerObject;
|
$nmo = new NinjaMailerObject;
|
||||||
$nmo->mailable = new EmailQuotaExceeded($account->companies()->first());
|
$nmo->mailable = new EmailQuotaExceeded($this->companies()->first());
|
||||||
$nmo->company = $account->companies()->first();
|
$nmo->company = $this->companies()->first();
|
||||||
$nmo->settings = $account->companies()->first()->settings;
|
$nmo->settings = $this->companies()->first()->settings;
|
||||||
$nmo->to_user = $account->companies()->first()->owner();
|
$nmo->to_user = $this->companies()->first()->owner();
|
||||||
NinjaMailerJob::dispatch($nmo);
|
NinjaMailerJob::dispatch($nmo);
|
||||||
|
|
||||||
Cache::put("throttle_notified:{$this->key}", true, 60 * 24);
|
Cache::put("throttle_notified:{$this->key}", true, 60 * 24);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user