Fix PDF download URL path construction
- Removed duplicate /documents from URL path - Changed from DOL_URL_ROOT + /documents + relative_path - To DOL_URL_ROOT + relative_path - Should now generate correct URLs like /dolibarr/documents/declarationtva/ - Instead of incorrect /dolibarr/documents/documents/declarationtva/
This commit is contained in:
parent
edfab45d9e
commit
ea891e5c31
@ -155,7 +155,7 @@ if (empty($declarations)) {
|
||||
if ($pdf_path) {
|
||||
// Create a download link
|
||||
$relative_path = str_replace(DOL_DATA_ROOT, '', $pdf_path);
|
||||
$download_url = DOL_URL_ROOT . '/documents' . $relative_path;
|
||||
$download_url = DOL_URL_ROOT . $relative_path;
|
||||
print '<a href="' . $download_url . '" target="_blank" title="' . $langs->trans("DownloadPDF") . '" style="color: #28a745; text-decoration: none; font-weight: bold;">';
|
||||
print '<i class="fa fa-file-pdf" style="font-size: 16px; color: #dc3545;"></i> PDF';
|
||||
print '</a>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user