mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Make $project.name defined as empty for invoices with no project
Allows inclusion of $project.name in emails without needing a special case for invoices with no project Signed-off-by: thirstyice <thirstyice@users.noreply.github.com>
This commit is contained in:
parent
d0795c0a12
commit
1575974099
@ -221,9 +221,11 @@ class HtmlEngine
|
||||
|
||||
if ($this->entity->project) {
|
||||
$data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project')];
|
||||
$data['$invoice.project'] = &$data['$project.name'];
|
||||
$data['$quote.project'] = &$data['$project.name'];
|
||||
} else {
|
||||
$data['$project.name'] = ['value' => '', 'label' => ''];
|
||||
}
|
||||
$data['$invoice.project'] = &$data['$project.name'];
|
||||
$data['$quote.project'] = &$data['$project.name'];
|
||||
|
||||
$data['$status_logo'] = ['value' => '<div class="stamp is-paid"> ' . ctrans('texts.paid') .'</div>', 'label' => ''];
|
||||
|
||||
@ -231,6 +233,8 @@ class HtmlEngine
|
||||
|
||||
if ($this->entity->vendor) {
|
||||
$data['$invoice.vendor'] = ['value' => $this->entity->vendor->present()->name(), 'label' => ctrans('texts.vendor_name')];
|
||||
} else {
|
||||
$data['$invoice.vendor'] = ['value' => '', 'label' => ''];
|
||||
}
|
||||
|
||||
if (strlen($this->company->getSetting('qr_iban')) > 5) {
|
||||
@ -277,14 +281,17 @@ class HtmlEngine
|
||||
$data['$credit.custom4'] = &$data['$quote.custom4'];
|
||||
|
||||
if ($this->entity->project) {
|
||||
$data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project')];
|
||||
$data['$invoice.project'] = &$data['$project.name'];
|
||||
$data['$quote.project'] = &$data['$project.name'];
|
||||
|
||||
$data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project')];
|
||||
} else {
|
||||
$data['$project.name'] = ['value' => '', 'label' => ''];
|
||||
}
|
||||
$data['$invoice.project'] = &$data['$project.name'];
|
||||
$data['$quote.project'] = &$data['$project.name'];
|
||||
|
||||
if ($this->entity->vendor) {
|
||||
$data['$invoice.vendor'] = ['value' => $this->entity->vendor->present()->name(), 'label' => ctrans('texts.vendor_name')];
|
||||
} else {
|
||||
$data['$invoice.vendor'] = ['value' => '', 'label' => ''];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user