From a1815bccbf609740554600ae0556942bcd902d7b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 29 Jun 2021 20:13:10 +1000 Subject: [PATCH 1/2] Minor fixes for tests --- tests/Integration/CompanyLedgerTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Integration/CompanyLedgerTest.php b/tests/Integration/CompanyLedgerTest.php index b097e594111d..1a228ab74d5b 100644 --- a/tests/Integration/CompanyLedgerTest.php +++ b/tests/Integration/CompanyLedgerTest.php @@ -97,6 +97,7 @@ class CompanyLedgerTest extends TestCase $settings->vat_number = 'vat number'; $settings->id_number = 'id number'; $settings->timezone_id = '1'; + $settings->language_id = '1'; $this->company->settings = $settings; $this->company->save(); From 6aa4e5c0e46621250f69027299ef64ea14e542a8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 29 Jun 2021 20:14:32 +1000 Subject: [PATCH 2/2] Fix for missing entity in email object --- app/Mail/Admin/EntityCreatedObject.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Mail/Admin/EntityCreatedObject.php b/app/Mail/Admin/EntityCreatedObject.php index 9dbd4a54a473..f8b426a798fc 100644 --- a/app/Mail/Admin/EntityCreatedObject.php +++ b/app/Mail/Admin/EntityCreatedObject.php @@ -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;