1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
This commit is contained in:
Hillel Coren 2017-05-29 18:02:43 +03:00
parent 4d1b64c041
commit 46ea8a40ca
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)
{
if (config('queue.default') !== 'sync') {
$this->user->account->loadLocalizationSettings();
}
$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->owns($item);
return $user->owns($document);
}
}