Fix: [ bug #248 ] Send by mail doesn't find the files in provider's

invoices
This commit is contained in:
Laurent Destailleur 2011-12-21 17:33:57 +01:00
parent 4fd76605e4
commit 28b1249ff0

View File

@ -664,7 +664,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile']
if ($result > 0)
{
$ref = dol_sanitizeFileName($facturefourn->ref);
$file = $conf->fournisseur->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf';
$file = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facturefourn->id,2).$ref.'/'.$ref.'.pdf';
if (is_readable($file))
{
@ -1879,7 +1879,7 @@ else
if ($_GET['action'] == 'presend')
{
$ref = dol_sanitizeFileName($fac->ref);
$file = $conf->fournisseur->facture->dir_output.'/'.get_exdir($fac->id,2).$ref.'.pdf';
$file = $conf->fournisseur->facture->dir_output.'/'.get_exdir($fac->id,2).$ref.'/'.$ref.'.pdf';
print '<br>';
print_titre($langs->trans('SendBillByMail'));