1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #4445 from beganovich/v5-task-product-key-to-service

(v5) Rename task.product_key to taks.service
This commit is contained in:
Benjamin Beganović 2020-12-08 16:53:03 +01:00 committed by GitHub
commit 829d4feaff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -636,7 +636,7 @@ class CompanySettings extends BaseSettings
'$product.line_total',
],
'task_columns' =>[
'$task.product_key',
'$task.service',
'$task.description',
'$task.rate',
'$task.hours',

View File

@ -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)) {

View File

@ -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;

View File

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