diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index b1febefdab7a..b5afe3bb2b71 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -636,7 +636,7 @@ class CompanySettings extends BaseSettings '$product.line_total', ], 'task_columns' =>[ - '$task.product_key', + '$task.service', '$task.description', '$task.rate', '$task.hours', diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 3c5115facb17..d99a4a2c4c60 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -300,9 +300,7 @@ class Design extends BaseDesign $elements = []; // Some of column can be aliased. This is simple workaround for these. - $aliases = [ - '$task.product_key' => '$task.service', - ]; + $aliases = []; foreach ($this->context['pdf_variables']["{$type}_columns"] as $column) { if (array_key_exists($column, $aliases)) { diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index 5b3245ca8c01..a10a4783c228 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -617,6 +617,7 @@ trait MakesInvoiceValues } $data[$key][$table_type.'.product_key'] = $item->product_key; + $data[$key][$table_type.'.service'] = is_null(optional($item)->service) ? $item->product_key : $item->service; $data[$key][$table_type.'.notes'] = $item->notes; $data[$key][$table_type.'.description'] = $item->notes; $data[$key][$table_type.'.custom_value1'] = $item->custom_value1; diff --git a/app/Utils/Traits/MakesTemplateData.php b/app/Utils/Traits/MakesTemplateData.php index 599157576da7..28ccb2d6a1e9 100644 --- a/app/Utils/Traits/MakesTemplateData.php +++ b/app/Utils/Traits/MakesTemplateData.php @@ -191,7 +191,7 @@ trait MakesTemplateData $data['$product.line_total'] = ['value' => '$20.00', 'label' => ctrans('texts.line_total')]; $data['$task.date'] = ['value' => '2010-02-03', 'label' => ctrans('texts.date')]; $data['$task.discount'] = ['value' => '5%', 'label' => ctrans('texts.discount')]; - $data['$task.product_key'] = ['value' => 'key', 'label' => ctrans('texts.product_key')]; + $data['$task.service'] = ['value' => 'key', 'label' => ctrans('texts.service')]; $data['$task.notes'] = ['value' => 'Note for Tasks', 'label' => ctrans('texts.notes')]; $data['$task.rate'] = ['value' => '$100.00', 'label' => ctrans('texts.rate')]; $data['$task.hours'] = ['value' => '1', 'label' => ctrans('texts.hours')];