Fix validation PDF path to match saveValidatedPDF expectations
This commit is contained in:
parent
79e3a562fa
commit
5d97dfbad2
@ -331,15 +331,23 @@ class DeclarationTVA_PDF
|
|||||||
// Generate PDF filename
|
// Generate PDF filename
|
||||||
$filename = 'CA3_' . $declaration_id . '_' . date('Y-m-d') . '.pdf';
|
$filename = 'CA3_' . $declaration_id . '_' . date('Y-m-d') . '.pdf';
|
||||||
|
|
||||||
// Create VAT declarations documents directory structure
|
// Create VAT declarations documents directory structure (same as saveValidatedPDF expects)
|
||||||
$vat_declarations_dir = DOL_DATA_ROOT . '/declarationtva/validated/';
|
$vat_declarations_dir = DOL_DATA_ROOT . '/documents/declarationtva/';
|
||||||
|
$year_dir = $vat_declarations_dir . date('Y') . '/';
|
||||||
|
$month_dir = $year_dir . date('m') . '/';
|
||||||
|
|
||||||
// Create directory if it doesn't exist
|
// Create directories if they don't exist
|
||||||
if (!is_dir($vat_declarations_dir)) {
|
if (!is_dir($vat_declarations_dir)) {
|
||||||
dol_mkdir($vat_declarations_dir);
|
dol_mkdir($vat_declarations_dir);
|
||||||
}
|
}
|
||||||
|
if (!is_dir($year_dir)) {
|
||||||
|
dol_mkdir($year_dir);
|
||||||
|
}
|
||||||
|
if (!is_dir($month_dir)) {
|
||||||
|
dol_mkdir($month_dir);
|
||||||
|
}
|
||||||
|
|
||||||
$filepath = $vat_declarations_dir . $filename;
|
$filepath = $month_dir . $filename;
|
||||||
|
|
||||||
// Debug logging
|
// Debug logging
|
||||||
error_log("generateDetailedCA3PDF: Calling generateCompleteCA3PDF with status='validation'");
|
error_log("generateDetailedCA3PDF: Calling generateCompleteCA3PDF with status='validation'");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user