From 82a996700ef4a1f633e2a984398a8d9aa21927c7 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Wed, 8 Oct 2025 01:33:07 +0200 Subject: [PATCH] Fix template path resolution for PDF generation - Use realpath() to get absolute path to templates directory - Fix template loading for CA-3 PDF generation - Resolve template path mismatch issue - Ensure official template is found and used correctly --- core/class/declarationtva_pdf.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index f612d8a..96fd304 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -91,7 +91,8 @@ class DeclarationTVA_PDF { $this->db = $db; $this->entity = (int) $conf->entity; - $this->template_path = dirname(__FILE__) . '/../../templates/declarationtva/'; + // Use absolute path to templates directory + $this->template_path = realpath(dirname(dirname(dirname(__FILE__)))) . '/templates/declarationtva/'; } /**