Fix PDF file paths to remove duplicate /documents
- Changed PDF generation path from /documents/declarationtva/validated/ to /declarationtva/validated/ - Updated hasValidatedDocument() to look in /declarationtva/validated/ - Updated getValidatedPDFPath() to look in /declarationtva/validated/ - This removes the duplicate /documents in the file path - Files will now be saved in /var/lib/dolibarr/declarationtva/validated/ - URLs will be /dolibarr/documents/declarationtva/validated/ (single /documents)
This commit is contained in:
parent
ef40e60d6e
commit
15d4fb34b6
@ -1262,7 +1262,7 @@ class DeclarationTVA
|
||||
}
|
||||
|
||||
// Check if PDF file exists in the VAT declarations directory
|
||||
$vat_declarations_dir = DOL_DATA_ROOT . '/documents/declarationtva/validated/';
|
||||
$vat_declarations_dir = DOL_DATA_ROOT . '/declarationtva/validated/';
|
||||
|
||||
// Look for PDF files with the declaration number
|
||||
$pattern = $vat_declarations_dir . 'CA3_' . $obj->declaration_number . '_*.pdf';
|
||||
@ -1302,7 +1302,7 @@ class DeclarationTVA
|
||||
}
|
||||
|
||||
// Check if PDF file exists in the VAT declarations directory
|
||||
$vat_declarations_dir = DOL_DATA_ROOT . '/documents/declarationtva/validated/';
|
||||
$vat_declarations_dir = DOL_DATA_ROOT . '/declarationtva/validated/';
|
||||
|
||||
// Look for PDF files with the declaration number
|
||||
$pattern = $vat_declarations_dir . 'CA3_' . $obj->declaration_number . '_*.pdf';
|
||||
|
||||
@ -184,7 +184,7 @@ class DeclarationTVA_PDF
|
||||
$filename = 'CA3_' . $declaration->declaration_number . '_' . date('Y-m-d') . '.pdf';
|
||||
|
||||
// Create VAT declarations documents directory structure
|
||||
$vat_declarations_dir = DOL_DATA_ROOT . '/documents/declarationtva/validated/';
|
||||
$vat_declarations_dir = DOL_DATA_ROOT . '/declarationtva/validated/';
|
||||
|
||||
// Create directory if it doesn't exist
|
||||
if (!is_dir($vat_declarations_dir)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user