Merge pull request #10404 from atm-john/6.0_fix_supplier_order_line_fetch

Fix fetch test
This commit is contained in:
Laurent Destailleur 2019-02-01 15:56:26 +01:00 committed by GitHub
commit bff2f33022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3018,6 +3018,10 @@ class CommandeFournisseurLigne extends CommonOrderLine
{ {
$objp = $this->db->fetch_object($result); $objp = $this->db->fetch_object($result);
if (!empty($objp))
{
$this->rowid = $objp->rowid; $this->rowid = $objp->rowid;
$this->id = $objp->rowid; $this->id = $objp->rowid;
$this->fk_commande = $objp->fk_commande; $this->fk_commande = $objp->fk_commande;
@ -3061,6 +3065,13 @@ class CommandeFournisseurLigne extends CommonOrderLine
return 1; return 1;
} }
else else
{
$this->error='Supplier order line with id='.$rowid.' not found';
dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR);
return 0;
}
}
else
{ {
dol_print_error($this->db); dol_print_error($this->db);
return -1; return -1;