Fix: Better error management

This commit is contained in:
Laurent Destailleur 2013-04-07 15:16:19 +02:00
parent fafd426903
commit ff3c8ec0be

View File

@ -378,7 +378,13 @@ function getSupplierInvoicesForThirdParty($authentication,$idthirdparty)
$obj=$db->fetch_object($resql);
$invoice=new FactureFournisseur($db);
$invoice->fetch($obj->facid);
$result=$invoice->fetch($obj->facid);
if ($result < 0)
{
$error++;
$errorcode=$result; $errorlabel=$invoice->error;
break;
}
// Define lines of invoice
$linesresp=array();