Support legacy vars

This commit is contained in:
David Bomba 2023-02-01 09:26:40 +11:00
parent ad9445cb4d
commit 228f3af4b9

View File

@ -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' =>''];