1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
This commit is contained in:
Hillel Coren 2017-05-29 18:02:08 +03:00
parent 050739e7fd
commit 7fd9ce903f
2 changed files with 5 additions and 1 deletions

View File

@ -73,6 +73,10 @@ class SendNotificationEmail extends Job implements ShouldQueue
*/ */
public function handle(UserMailer $userMailer) public function handle(UserMailer $userMailer)
{ {
if (config('queue.default') !== 'sync') {
$this->user->account->loadLocalizationSettings();
}
$userMailer->sendNotification($this->user, $this->invoice, $this->type, $this->payment, $this->notes); $userMailer->sendNotification($this->user, $this->invoice, $this->type, $this->payment, $this->notes);
} }
} }

View File

@ -42,6 +42,6 @@ class DocumentPolicy extends EntityPolicy
return $user->can('view', $document->invoice); return $user->can('view', $document->invoice);
} }
return $user->owns($item); return $user->owns($document);
} }
} }