diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 7a2272012794..f24aebd1d148 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -432,10 +432,6 @@ class Design extends BaseDesign ? $this->context['variables'] : ['values' => ['$entity.public_notes' => $this->entity->public_notes, '$entity.terms' => $this->entity->terms, '$entity_footer' => $this->entity->footer], 'labels' => []]; - if ($this->type == 'delivery_note') { - return []; - } - $variables = $this->context['pdf_variables']['total_columns']; $elements = [ @@ -453,6 +449,10 @@ class Design extends BaseDesign ['element' => 'div', 'properties' => ['class' => 'totals-table-right-side'], 'elements' => []], ]; + if ($this->type == 'delivery_note') { + return $elements; + } + foreach (['discount'] as $property) { $variable = sprintf('%s%s', '$', $property);