diff --git a/app/Mail/Admin/EntitySentObject.php b/app/Mail/Admin/EntitySentObject.php index 3b9003e07e..570c149b1c 100644 --- a/app/Mail/Admin/EntitySentObject.php +++ b/app/Mail/Admin/EntitySentObject.php @@ -121,7 +121,7 @@ class EntitySentObject ctrans( $this->template_subject, [ - 'client' => $this->contact->present()->name(), + 'client' => $this->contact->client->present()->name(), 'invoice' => $this->entity->number, ] ); @@ -133,7 +133,7 @@ class EntitySentObject $this->template_body, [ 'amount' => $this->getAmount(), - 'client' => $this->contact->present()->name(), + 'client' => $this->contact->client->present()->name(), 'invoice' => $this->entity->number, ] ); diff --git a/app/Notifications/Admin/EntitySentNotification.php b/app/Notifications/Admin/EntitySentNotification.php index 33a735bce1..4d38c3c083 100644 --- a/app/Notifications/Admin/EntitySentNotification.php +++ b/app/Notifications/Admin/EntitySentNotification.php @@ -103,14 +103,14 @@ class EntitySentNotification extends Notification "texts.notification_{$this->entity_name}_sent_subject", [ 'amount' => $amount, - 'client' => $this->contact->present()->name(), + 'client' => $this->contact->client->present()->name(), 'invoice' => $this->entity->number, ] )) ->attachment(function ($attachment) use ($amount) { $attachment->title(ctrans('texts.invoice_number_placeholder', ['invoice' => $this->entity->number]), $this->invitation->getAdminLink()) ->fields([ - ctrans('texts.client') => $this->contact->present()->name(), + ctrans('texts.client') => $this->contact->client->present()->name(), ctrans('texts.amount') => $amount, ]); });