1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 06:32:40 +01:00

Fix for missing entity in email object

This commit is contained in:
David Bomba 2021-06-29 20:14:32 +10:00
parent a1815bccbf
commit 6aa4e5c0e4

View File

@ -45,9 +45,9 @@ class EntityCreatedObject
/* Init a new copy of the translator*/
$t = app('translator');
/* Set the locale*/
App::setLocale($this->company->getLocale());
App::setLocale($this->entity->company->getLocale());
/* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->company->settings));
$t->replace(Ninja::transformTranslations($this->entity->company->settings));
$this->contact = $this->entity->invitations()->first()->contact;
$this->company = $this->entity->company;