mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Set .name consistently
This commit is contained in:
parent
1575974099
commit
e694fe44c9
@ -169,6 +169,9 @@ class HtmlEngine
|
|||||||
$data['$invoice.po_number'] = ['value' => $this->entity->po_number ?: ' ', 'label' => ctrans('texts.po_number')];
|
$data['$invoice.po_number'] = ['value' => $this->entity->po_number ?: ' ', 'label' => ctrans('texts.po_number')];
|
||||||
$data['$poNumber'] = &$data['$invoice.po_number'];
|
$data['$poNumber'] = &$data['$invoice.po_number'];
|
||||||
$data['$po_number'] = &$data['$invoice.po_number'];
|
$data['$po_number'] = &$data['$invoice.po_number'];
|
||||||
|
|
||||||
|
$data['$project.name'] = ['value' => $this->entity->project?->name ?: '', 'label' => ctrans('texts.project')];
|
||||||
|
|
||||||
$data['$entity.datetime'] = ['value' => $this->formatDatetime($this->entity->created_at, $this->client->date_format()), 'label' => ctrans('texts.date')];
|
$data['$entity.datetime'] = ['value' => $this->formatDatetime($this->entity->created_at, $this->client->date_format()), 'label' => ctrans('texts.date')];
|
||||||
$data['$invoice.datetime'] = &$data['$entity.datetime'];
|
$data['$invoice.datetime'] = &$data['$entity.datetime'];
|
||||||
$data['$quote.datetime'] = &$data['$entity.datetime'];
|
$data['$quote.datetime'] = &$data['$entity.datetime'];
|
||||||
@ -219,11 +222,6 @@ class HtmlEngine
|
|||||||
$data['$credit.custom3'] = &$data['$invoice.custom3'];
|
$data['$credit.custom3'] = &$data['$invoice.custom3'];
|
||||||
$data['$credit.custom4'] = &$data['$invoice.custom4'];
|
$data['$credit.custom4'] = &$data['$invoice.custom4'];
|
||||||
|
|
||||||
if ($this->entity->project) {
|
|
||||||
$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['$invoice.project'] = &$data['$project.name'];
|
||||||
$data['$quote.project'] = &$data['$project.name'];
|
$data['$quote.project'] = &$data['$project.name'];
|
||||||
|
|
||||||
@ -231,11 +229,7 @@ class HtmlEngine
|
|||||||
|
|
||||||
$data['$show_paid_stamp'] = ['value' => $this->entity->status_id == 4 && $this->settings->show_paid_stamp ? 'flex' : 'none', 'label' => ''];
|
$data['$show_paid_stamp'] = ['value' => $this->entity->status_id == 4 && $this->settings->show_paid_stamp ? 'flex' : 'none', 'label' => ''];
|
||||||
|
|
||||||
if ($this->entity->vendor) {
|
$data['$invoice.vendor'] = ['value' => $this->entity->vendor?->present()->name() ?: '', 'label' => ctrans('texts.vendor_name')];
|
||||||
$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) {
|
if (strlen($this->company->getSetting('qr_iban')) > 5) {
|
||||||
try {
|
try {
|
||||||
@ -280,19 +274,10 @@ class HtmlEngine
|
|||||||
$data['$credit.custom3'] = &$data['$quote.custom3'];
|
$data['$credit.custom3'] = &$data['$quote.custom3'];
|
||||||
$data['$credit.custom4'] = &$data['$quote.custom4'];
|
$data['$credit.custom4'] = &$data['$quote.custom4'];
|
||||||
|
|
||||||
if ($this->entity->project) {
|
|
||||||
$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['$invoice.project'] = &$data['$project.name'];
|
||||||
$data['$quote.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')];
|
||||||
$data['$invoice.vendor'] = ['value' => $this->entity->vendor->present()->name(), 'label' => ctrans('texts.vendor_name')];
|
|
||||||
} else {
|
|
||||||
$data['$invoice.vendor'] = ['value' => '', 'label' => ''];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->entity_string == 'credit') {
|
if ($this->entity_string == 'credit') {
|
||||||
@ -928,7 +913,7 @@ class HtmlEngine
|
|||||||
|
|
||||||
private function getCountryName(): string
|
private function getCountryName(): string
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var \Illuminate\Support\Collection<\App\Models\Country> */
|
/** @var \Illuminate\Support\Collection<\App\Models\Country> */
|
||||||
$countries = app('countries');
|
$countries = app('countries');
|
||||||
|
|
||||||
@ -1180,7 +1165,7 @@ class HtmlEngine
|
|||||||
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top">
|
<td align="center" valign="top">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
|
||||||
@ -1203,7 +1188,7 @@ class HtmlEngine
|
|||||||
// return '
|
// return '
|
||||||
// <table border="0" cellspacing="0" cellpadding="0" align="center">
|
// <table border="0" cellspacing="0" cellpadding="0" align="center">
|
||||||
// <tr style="border: 0 !important; ">
|
// <tr style="border: 0 !important; ">
|
||||||
// <td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
// <td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
||||||
// <a href="'. $link .'" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">'. $text .'</a>
|
// <a href="'. $link .'" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">'. $text .'</a>
|
||||||
// </td>
|
// </td>
|
||||||
// </tr>
|
// </tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user