Add debugging to template reset functionality
- Add debug logging to resetToDefaultTemplate method - Add debug logging to getTemplateInfo method - Track template path resolution and file operations - Debug REVENIR AU MODELE OFFICIEL button issues
This commit is contained in:
parent
5ea9b31a7d
commit
d48800a849
@ -1496,6 +1496,10 @@ class DeclarationTVA_PDF
|
|||||||
);
|
);
|
||||||
|
|
||||||
$custom_template = $this->template_path . 'ca3_custom_template.pdf';
|
$custom_template = $this->template_path . 'ca3_custom_template.pdf';
|
||||||
|
error_log("DeclarationTVA: Template info - looking for: " . $custom_template);
|
||||||
|
error_log("DeclarationTVA: Template info - path: " . $this->template_path);
|
||||||
|
error_log("DeclarationTVA: Template info - exists: " . (file_exists($custom_template) ? 'YES' : 'NO'));
|
||||||
|
|
||||||
if (file_exists($custom_template)) {
|
if (file_exists($custom_template)) {
|
||||||
$info['custom_template'] = true;
|
$info['custom_template'] = true;
|
||||||
$info['template_path'] = $custom_template;
|
$info['template_path'] = $custom_template;
|
||||||
@ -1512,9 +1516,16 @@ class DeclarationTVA_PDF
|
|||||||
public function resetToDefaultTemplate()
|
public function resetToDefaultTemplate()
|
||||||
{
|
{
|
||||||
$custom_template = $this->template_path . 'ca3_custom_template.pdf';
|
$custom_template = $this->template_path . 'ca3_custom_template.pdf';
|
||||||
|
error_log("DeclarationTVA: Reset template - looking for: " . $custom_template);
|
||||||
|
error_log("DeclarationTVA: Template path: " . $this->template_path);
|
||||||
|
error_log("DeclarationTVA: File exists: " . (file_exists($custom_template) ? 'YES' : 'NO'));
|
||||||
|
|
||||||
if (file_exists($custom_template)) {
|
if (file_exists($custom_template)) {
|
||||||
return unlink($custom_template);
|
$result = unlink($custom_template);
|
||||||
|
error_log("DeclarationTVA: Delete result: " . ($result ? 'SUCCESS' : 'FAILED'));
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
error_log("DeclarationTVA: No custom template to delete");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user