From 5fd47b34b0544fd38ac2578df561a55853df2174 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Jan 2014 18:30:32 +0100 Subject: [PATCH] Fix: Bad link for download file into documents page of supplier invoices --- htdocs/core/class/html.formfile.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 189cec49f8050..0559c7b56daa2 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -762,7 +762,10 @@ function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownlo { // Define relative path used to store the file if (empty($relativepath)) + { $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; + if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath; + } $var=!$var; print '';