Fix: Incorrect document link on supplier invoices's list
This commit is contained in:
parent
d78eb4495e
commit
e4a2b5abb3
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -716,9 +717,6 @@ class FormFile
|
|||||||
if ($modulepart == 'export') {
|
if ($modulepart == 'export') {
|
||||||
$relativepath = $file["name"];
|
$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
|
// Show file name with link to download
|
||||||
$out.= '<a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
$out.= '<a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
||||||
|
|||||||
@ -342,7 +342,8 @@ if ($resql)
|
|||||||
print $facturestatic->getNomUrl(1);
|
print $facturestatic->getNomUrl(1);
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$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);
|
$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";
|
print "</td>\n";
|
||||||
|
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user