Skip to content
Snippets Groups Projects
Commit ea58fb0b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix triggered error

parent 01188e4b
No related branches found
No related tags found
No related merge requests found
......@@ -2669,21 +2669,22 @@ class CommandeFournisseur extends CommonOrder
$sql.= " FROM ".MAIN_DB_PREFIX.'c_input_method';
$sql.= " WHERE active=1 AND rowid = ".$db->escape($this->methode_commande_id);
$query = $db->query($sql);
if ($query && $db->num_rows($query))
$resql = $db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($query);
$string = $langs->trans($obj->code);
if ($string == $obj->code)
if ($db->num_rows($query))
{
$string = $obj->label != '-' ? $obj->label : '';
}
return $string;
$obj = $db->fetch_object($query);
$string = $langs->trans($obj->code);
if ($string == $obj->code)
{
$string = $obj->label != '-' ? $obj->label : '';
}
return $string;
}
}
dol_print_error($db);
else dol_print_error($db);
}
return '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment