Skip to content
Snippets Groups Projects
Commit c9300bae authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #5415 from fmarcet/3.8

Fix: Incorrect document link on supplier invoices's list
parents 5c11192c e4a2b5ab
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -716,9 +717,6 @@ class FormFile
if ($modulepart == 'export') {
$relativepath = $file["name"];
}
if ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_fournisseur') {
$relativepath = get_exdir($modulesubdir, 2,0,0,null,'invoice_supplier'). $modulesubdir. "/" . $file["name"];
}
// Show file name with link to download
$out.= '<a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'"';
......
......@@ -342,7 +342,8 @@ if ($resql)
print $facturestatic->getNomUrl(1);
$filename=dol_sanitizeFileName($obj->ref);
$filedir=$conf->fournisseur->facture->dir_output.'/'.get_exdir($obj->facid,2,0,0,$facturestatic,'invoice_supplier').dol_sanitizeFileName($obj->ref);
print $formfile->getDocumentsLink('facture_fournisseur', $filename, $filedir);
$subdir = get_exdir($obj->facid,2,0,0,$facturestatic,'invoice_supplier').dol_sanitizeFileName($obj->ref);
print $formfile->getDocumentsLink('facture_fournisseur', $subdir, $filedir);
print "</td>\n";
// Ref supplier
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment