diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index 7dff3ac..e5240a6 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -229,18 +229,25 @@ class DeclarationTVA_PDF */ private function getTemplatePath() { + error_log("DeclarationTVA: Template path: " . $this->template_path); + // Check for custom template first $custom_template = $this->template_path . 'ca3_custom_template.pdf'; + error_log("DeclarationTVA: Looking for custom template: " . $custom_template); if (file_exists($custom_template)) { + error_log("DeclarationTVA: Custom template found"); return $custom_template; } // Fall back to default template $default_template = $this->template_path . 'ca3_official_template.pdf'; + error_log("DeclarationTVA: Looking for default template: " . $default_template); if (file_exists($default_template)) { + error_log("DeclarationTVA: Default template found"); return $default_template; } + error_log("DeclarationTVA: No template found"); return false; }