From 228f3af4b92ec0bf6fa007e8cb8948d0f3426a4a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 1 Feb 2023 09:26:40 +1100 Subject: [PATCH] Support legacy vars --- app/Utils/HtmlEngine.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 9461b87734ff..e8629864d760 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -177,6 +177,16 @@ class HtmlEngine $data['$custom3'] = &$data['$invoice.custom3']; $data['$custom4'] = &$data['$invoice.custom4']; + $data['$quote.custom1'] = &$data['$invoice.custom1']; + $data['$quote.custom2'] = &$data['$invoice.custom2']; + $data['$quote.custom3'] = &$data['$invoice.custom3']; + $data['$quote.custom4'] = &$data['$invoice.custom4']; + + $data['$credit.custom1'] = &$data['$invoice.custom1']; + $data['$credit.custom2'] = &$data['$invoice.custom2']; + $data['$credit.custom3'] = &$data['$invoice.custom3']; + $data['$credit.custom4'] = &$data['$invoice.custom4']; + if($this->entity->project) { $data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project')]; $data['$invoice.project'] = &$data['$project.name']; @@ -226,6 +236,16 @@ class HtmlEngine $data['$custom3'] = &$data['$quote.custom3']; $data['$custom4'] = &$data['$quote.custom4']; + $data['$invoice.custom1'] = &$data['$quote.custom1']; + $data['$invoice.custom2'] = &$data['$quote.custom2']; + $data['$invoice.custom3'] = &$data['$quote.custom3']; + $data['$invoice.custom4'] = &$data['$quote.custom4']; + + $data['$credit.custom1'] = &$data['$quote.custom1']; + $data['$credit.custom2'] = &$data['$quote.custom2']; + $data['$credit.custom3'] = &$data['$quote.custom3']; + $data['$credit.custom4'] = &$data['$quote.custom4']; + if($this->entity->project) { $data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project_name')]; $data['$invoice.project'] = &$data['$project.name']; @@ -261,6 +281,16 @@ class HtmlEngine $data['$custom3'] = &$data['$credit.custom3']; $data['$custom4'] = &$data['$credit.custom4']; + $data['$quote.custom1'] = &$data['$credit.custom1']; + $data['$quote.custom2'] = &$data['$credit.custom2']; + $data['$quote.custom3'] = &$data['$credit.custom3']; + $data['$quote.custom4'] = &$data['$credit.custom4']; + + $data['$invoice.custom1'] = &$data['$credit.custom1']; + $data['$invoice.custom2'] = &$data['$credit.custom2']; + $data['$invoice.custom3'] = &$data['$credit.custom3']; + $data['$invoice.custom4'] = &$data['$credit.custom4']; + } $data['$portal_url'] = ['value' => $this->invitation->getPortalLink(), 'label' =>''];