diff --git a/app/Services/PdfMaker/PdfMaker.php b/app/Services/PdfMaker/PdfMaker.php index aded4c4a54fe..2f50f9882ddb 100644 --- a/app/Services/PdfMaker/PdfMaker.php +++ b/app/Services/PdfMaker/PdfMaker.php @@ -82,6 +82,12 @@ class PdfMaker return $this; } + /** + * Final method to get compiled HTML. + * + * @param bool $final @deprecated + * @return mixed + */ public function getCompiledHTML($final = false) { $html = $this->document->saveHTML(); diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 54b73d6c7216..991a0895e8e2 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -454,6 +454,7 @@ class HtmlEngine $data['$method'] = ['value' => ' ', 'label' => ctrans('texts.method')]; $data['$amount'] = ['value' => '', 'label' => ctrans('texts.amount')]; + $data['$statement'] = ['value' => '', 'label' => ctrans('texts.statement')]; $arrKeysLength = array_map('strlen', array_keys($data)); array_multisort($arrKeysLength, SORT_DESC, $data); diff --git a/resources/views/pdf-designs/hipster.html b/resources/views/pdf-designs/hipster.html index 4180fceeaf9b..a2af152de09b 100644 --- a/resources/views/pdf-designs/hipster.html +++ b/resources/views/pdf-designs/hipster.html @@ -345,6 +345,12 @@ ? document.getElementById(tableIdentifier).style.display = 'none' : ''; }); + + // If we have elements in these tables, we can change label to "Statement" & hide entity details. + if (document.querySelectorAll('#statement-payment-table > tbody, #statement-payment-table > tbody, #statement-aging-table-totals > tbody').length > 0) { + document.querySelector('.entity-label').innerText = '$statement_label'; + document.querySelector('.entity-details-wrapper').style.display = 'none'; + } });