forked from Wavyzz/dolibarr
FIX: dont get empty "Incoterms : - " string if no incoterm
This commit is contained in:
@@ -3073,8 +3073,16 @@ abstract class CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$res = $this->db->fetch_object($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
return 'Incoterm : '.$res->code.' - '.$this->location_incoterms;
|
if ($num > 0)
|
||||||
|
{
|
||||||
|
$res = $this->db->fetch_object($resql);
|
||||||
|
return 'Incoterm : '.$res->code.' - '.$this->location_incoterms;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user