From 324036828a4da7802280fcb9aa2f957fbc01b4b4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 12 Mar 2022 10:27:59 +1100 Subject: [PATCH] Fixes for project name --- app/Utils/HtmlEngine.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 9e20a2ff9d9b..ff6b6a1f2556 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -174,6 +174,16 @@ class HtmlEngine $data['$approveButton'] = ['value' => ''.ctrans('texts.view_quote').'', 'label' => ctrans('texts.approve')]; $data['$view_url'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_quote')]; $data['$date'] = ['value' => $this->translateDate($this->entity->date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.quote_date')]; + + if($this->entity->project) { + $data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project_name')]; + $data['$invoice.project'] = &$data['$project.name']; + } + + if($this->entity->vendor) { + $data['$invoice.vendor'] = ['value' => $this->entity->vendor->present()->name(), 'label' => ctrans('texts.vendor_name')]; + } + } if ($this->entity_string == 'credit') {