From feedaa479f617d18ac45426b9084da4ee05048d5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Jul 2021 10:53:18 +1000 Subject: [PATCH] Minor fix for entity created object --- app/Mail/Admin/EntityCreatedObject.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Mail/Admin/EntityCreatedObject.php b/app/Mail/Admin/EntityCreatedObject.php index f8b426a798fc..c4cfc886c5d0 100644 --- a/app/Mail/Admin/EntityCreatedObject.php +++ b/app/Mail/Admin/EntityCreatedObject.php @@ -23,7 +23,7 @@ class EntityCreatedObject public $entity; - public $contact; + public $client; public $company; @@ -49,7 +49,7 @@ class EntityCreatedObject /* Set customized translations _NOW_ */ $t->replace(Ninja::transformTranslations($this->entity->company->settings)); - $this->contact = $this->entity->invitations()->first()->contact; + $this->client = $this->entity->client; $this->company = $this->entity->company; $this->setTemplate(); @@ -100,7 +100,7 @@ class EntityCreatedObject ctrans( $this->template_subject, [ - 'client' => $this->contact->present()->name(), + 'client' => $this->client->present()->name(), 'invoice' => $this->entity->number, ] ); @@ -112,7 +112,7 @@ class EntityCreatedObject $this->template_body, [ 'amount' => $this->getAmount(), - 'client' => $this->contact->present()->name(), + 'client' => $this->client->present()->name(), 'invoice' => $this->entity->number, ] );