Fix: Better error management

This commit is contained in:
Laurent Destailleur 2013-07-31 11:27:56 +02:00
parent 8fed036c92
commit 378842e05f

View File

@ -916,20 +916,14 @@ else
if ($id > 0 || ! empty($ref))
{
$result=$object->fetch($id,$ref);
if ($result > 0)
{
$result=$object->fetch_lines();
}
if ($result < 0)
{
dol_print_error($db,$object->error);
exit;
}
if ($result < 0) dol_print_error($db,$object->error);
$result=$object->fetch_lines();
if ($result < 0) dol_print_error($db,$object->error);
$result=$object->fetch_thirdparty();
if ($result < 0) dol_print_error($db,$object->error);
dol_htmloutput_errors($mesg,'');
$object->fetch_thirdparty();
$nbofservices=count($object->lines);
$author = new User($db);