Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE

This commit is contained in:
Laurent Destailleur 2013-07-14 18:43:58 +02:00
parent 6a1446f4dd
commit 001072d34c

View File

@ -285,27 +285,13 @@ class pdf_azur extends ModelePDFPropales
$dir = $conf->product->dir_output.'/'.$pdir; $dir = $conf->product->dir_output.'/'.$pdir;
$realpath=''; $realpath='';
if ($object->ref == 'SPECIMEN' && $i == 1)
{
$realpath = DOL_DOCUMENT_ROOT.'/theme/common/nophoto.jpg';
}
else
{
foreach ($objphoto->liste_photos($dir,1) as $key => $obj) foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
{
if ($obj['photo_vignette'])
{
$filename='thumbs/'.$obj['photo_vignette'];
}
else
{ {
$filename=$obj['photo']; $filename=$obj['photo'];
} //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette'];
$realpath = $dir.$filename; $realpath = $dir.$filename;
break; break;
} }
}
if (!empty($realpath)) $imglinesize=pdf_getSizeForImage($realpath); if (!empty($realpath)) $imglinesize=pdf_getSizeForImage($realpath);
} }