Do not render default footer when document print template footer is blank
This commit is contained in:
parent
9fcb7c9ee1
commit
e087b26fc6
|
|
@ -1055,6 +1055,7 @@ class DoctorDocument extends BaseController
|
|||
'print_footer_margin' => $printFooterMargin,
|
||||
'custom_header_html' => $customHeaderHtml,
|
||||
'custom_footer_html' => $customFooterHtml,
|
||||
'has_selected_print_template' => is_array($selectedPrintTemplate),
|
||||
];
|
||||
|
||||
$mpdfTempDir = WRITEPATH . 'cache' . DIRECTORY_SEPARATOR . 'mpdf';
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ $headerMargin = number_format((float) ($print_header_margin ?? 0.50), 2, '.', ''
|
|||
$footerMargin = number_format((float) ($print_footer_margin ?? 1.50), 2, '.', '');
|
||||
$customHeaderHtml = (string) ($custom_header_html ?? '');
|
||||
$customFooterHtml = (string) ($custom_footer_html ?? '');
|
||||
$hasSelectedPrintTemplate = ! empty($has_selected_print_template);
|
||||
?>
|
||||
<style>
|
||||
@page {
|
||||
|
|
@ -47,7 +48,7 @@ $customFooterHtml = (string) ($custom_footer_html ?? '');
|
|||
<htmlpagefooter name="myFooter">
|
||||
<?php if (trim($customFooterHtml) !== ''): ?>
|
||||
<?= $customFooterHtml ?>
|
||||
<?php else: ?>
|
||||
<?php elseif (! $hasSelectedPrintTemplate): ?>
|
||||
<table width="100%" style="font-size:10px;">
|
||||
<tr>
|
||||
<td width="15%">Page : {PAGENO}/{nbpg}</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user