diff --git a/app/Repositories/ProjectRepository.php b/app/Repositories/ProjectRepository.php index 13eec3139b..c73df66c10 100644 --- a/app/Repositories/ProjectRepository.php +++ b/app/Repositories/ProjectRepository.php @@ -49,7 +49,7 @@ class ProjectRepository extends BaseRepository $body = '
'.$task->description().'
'; } else { - $body = ''; + $body = $task->description ?? ''; } $item = new InvoiceItem(); diff --git a/app/Services/Pdf/PdfBuilder.php b/app/Services/Pdf/PdfBuilder.php index 3fcad4dd63..48e37b1a08 100644 --- a/app/Services/Pdf/PdfBuilder.php +++ b/app/Services/Pdf/PdfBuilder.php @@ -729,6 +729,7 @@ class PdfBuilder */ public function buildTableBody(string $type): array { + $elements = []; $items = $this->transformLineItems($this->service->config->entity->line_items, $type); @@ -776,6 +777,9 @@ class PdfBuilder $table_type = "product_quote_columns"; } + $_type = Str::startsWith($type, '$') ? ltrim($type, '$') : $type; + + $column_visibility = $this->getColumnVisibility($this->service->config->entity->line_items, $_type); foreach ($items as $row) { $element = ['element' => 'tr', 'elements' => []]; @@ -804,9 +808,6 @@ class PdfBuilder } } } else { - $_type = Str::startsWith($type, '$') ? ltrim($type, '$') : $type; - - $column_visibility = $this->getColumnVisibility($this->service->config->entity->line_items, $_type); foreach ($this->service->config->pdf_variables[$table_type] as $key => $cell) { // We want to keep aliases like these: diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index e1a34ada57..4dce8a21cd 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -981,6 +981,8 @@ class Design extends BaseDesign $table_type = "product_quote_columns"; } + $column_visibility = $this->getColumnVisibility($this->entity->line_items, $_type); + foreach ($items as $row) { $element = ['element' => 'tr', 'elements' => []]; @@ -1008,9 +1010,7 @@ class Design extends BaseDesign } } } else { - - $column_visibility = $this->getColumnVisibility($this->entity->line_items, $_type); - + foreach ($this->context['pdf_variables'][$table_type] as $key => $cell) { // We want to keep aliases like these: // $task.cost => $task.rate diff --git a/composer.json b/composer.json index 03562a728e..0afcf418f1 100644 --- a/composer.json +++ b/composer.json @@ -222,8 +222,12 @@ { "type": "vcs", "url": "https://github.com/turbo124/snappdf" + }, + { + "type": "path", + "url": "../admin-api" } ], "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 8ce7f6b00d..e85c307598 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a8c8a77c6cc5e0b0c046923603c2110a", + "content-hash": "2f0a47c420c857b7fc7a4a71e2f3224d", "packages": [ { "name": "adrienrn/php-mimetyper",