From e087b26fc607197e55222d2d30f93ae21c62016c Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Thu, 9 Apr 2026 04:45:02 +0530 Subject: [PATCH] Do not render default footer when document print template footer is blank --- app/Controllers/DoctorDocument.php | 1 + app/Views/doctor_document/doc_letterhead_print.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Controllers/DoctorDocument.php b/app/Controllers/DoctorDocument.php index 7d6ece7..560ad31 100644 --- a/app/Controllers/DoctorDocument.php +++ b/app/Controllers/DoctorDocument.php @@ -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'; diff --git a/app/Views/doctor_document/doc_letterhead_print.php b/app/Views/doctor_document/doc_letterhead_print.php index 277ea99..213a4ce 100644 --- a/app/Views/doctor_document/doc_letterhead_print.php +++ b/app/Views/doctor_document/doc_letterhead_print.php @@ -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); ?>