Fix: If object already loaded, the url was not returned.

This commit is contained in:
Laurent Destailleur 2012-09-11 15:49:46 +02:00
parent bf9b8657c3
commit a249061017

View File

@ -3765,11 +3765,10 @@ class Form
if (empty($object->barcode_type_code) || empty($object->barcode_type_coder))
{
$result = $object->fetch_barcode();
//Check if fetch_barcode() failed
if ($result < 1) return '<!-- ErrorFetchBarcode -->';
}
//Check if fetch_barcode() failed
if ($result < 1) return '';
// Barcode image
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($object->barcode_type_coder).'&code='.urlencode($object->barcode).'&encoding='.urlencode($object->barcode_type_code);
$out ='<!-- url barcode = '.$url.' -->';