diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index d99a4a2c4c60..e5f6a80da46d 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -413,7 +413,7 @@ class Design extends BaseDesign $elements = [ ['element' => 'div', 'elements' => [ - ['element' => 'span', 'content' => '$entity.public_notes', 'properties' => ['data-element' => 'total-table-public-notes-label']], + ['element' => 'span', 'content' => '$entity.public_notes', 'properties' => ['data-element' => 'total-table-public-notes-label', 'style' => 'text-align: left;']], ]], ]; diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 12cbac3de004..3eac6b6050d3 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -183,7 +183,7 @@ class HtmlEngine $data['$invoice.custom2'] = ['value' => $this->formatCustomFieldValue('invoice2', $this->entity->custom_value2) ?: ' ', 'label' => $this->makeCustomField('invoice2')]; $data['$invoice.custom3'] = ['value' => $this->formatCustomFieldValue('invoice3', $this->entity->custom_value3) ?: ' ', 'label' => $this->makeCustomField('invoice3')]; $data['$invoice.custom4'] = ['value' => $this->formatCustomFieldValue('invoice4', $this->entity->custom_value4) ?: ' ', 'label' => $this->makeCustomField('invoice4')]; - $data['$invoice.public_notes'] = ['value' => $this->entity->public_notes ?: ' ', 'label' => ctrans('texts.public_notes')]; + $data['$invoice.public_notes'] = ['value' => nl2br($this->entity->public_notes) ?: ' ', 'label' => ctrans('texts.public_notes')]; $data['$entity.public_notes'] = &$data['$invoice.public_notes']; $data['$entity_issued_to'] = ['value' => '', 'label' => ctrans("texts.{$this->entity_string}_issued_to")];