diff --git a/htdocs/product/stock/mouvementstock.class.php b/htdocs/product/stock/mouvementstock.class.php index e49046ed2ed..d5c6bea3583 100644 --- a/htdocs/product/stock/mouvementstock.class.php +++ b/htdocs/product/stock/mouvementstock.class.php @@ -404,7 +404,7 @@ class MouvementStock /** * \brief Decrease stock for product and subproducts - * + * \return int <0 if KO, >0 if OK */ function livraison($user, $fk_product, $entrepot_id, $qty) { @@ -414,7 +414,7 @@ class MouvementStock /** * \brief Increase stock for product and subproducts - * + * \return int <0 if KO, >0 if OK */ function reception($user, $fk_product, $entrepot_id, $qty, $price=0) { diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index ad72a5c904a..6beb05794c0 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -1173,6 +1173,7 @@ class Societe extends CommonObject global $langs; $result=''; + $lien=$lienfin=''; if ($option == 'customer') { @@ -1186,11 +1187,6 @@ class Societe extends CommonObject $lien= ''; $lienfin=''; } - else - { - $lien = ''; - $lienfin=''; - } } if ($option == 'supplier') { @@ -1203,8 +1199,14 @@ class Societe extends CommonObject $lienfin=''; } + if (empty($lien)) + { + $lien = ''; + $lienfin=''; + } if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$this->nom,'company').$lienfin.' '); $result.=$lien.($maxlen?dolibarr_trunc($this->nom,$maxlen):$this->nom).$lienfin; + return $result; }