Skip to content
Snippets Groups Projects
Commit 317134c2 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1467 from grandoc/3.5

fix : display specimen
parents 561a1a1a f9c48be2
Branches
Tags
No related merge requests found
......@@ -116,15 +116,24 @@ class pdf_strato extends ModelePDFContract
$outputlangs->load("dict");
$outputlangs->load("companies");
$outputlangs->load("contracts");
$outputlangs->load("interventions");
if ($conf->contrat->dir_output)
{
$object->fetch_thirdparty();
$objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->contrat->dir_output;
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf";
// Definition of $dir and $file
if ($object->specimen)
{
$dir = $conf->contrat->dir_output;
$file = $dir . "/SPECIMEN.pdf";
}
else
{
$objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->contrat->dir_output . "/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf";
}
if (! file_exists($dir))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment