Skip to content

Commit

Permalink
New: Add option SUPPLIER_REF_IN_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 19, 2014
1 parent c7a73e4 commit cbf6e85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -166,8 +166,10 @@ function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=
else
{
$objectref = dol_sanitizeFileName($object->ref);
$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
$dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$objectref;
$file = $dir . "/" . $objectref . ".pdf";
if (! empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir . "/" . $objectref . ($objectrefsupplier?"-".$objectrefsupplier:"").".pdf";
}

if (! file_exists($dir))
Expand Down
Expand Up @@ -174,8 +174,10 @@ function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$
else
{
$objectref = dol_sanitizeFileName($object->ref);
$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
$dir = $conf->fournisseur->commande->dir_output . '/'. $objectref;
$file = $dir . "/" . $objectref . ".pdf";
if (! empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir . "/" . $objectref . ($objectrefsupplier?"-".$objectrefsupplier:"").".pdf";
}

if (! file_exists($dir))
Expand Down

0 comments on commit cbf6e85

Please sign in to comment.