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
This commit is contained in:
Frank Cools 2025-10-08 01:33:07 +02:00
parent c471defd25
commit 82a996700e

View File

@ -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/';
}
/**