diff --git a/htdocs/core/class/commonincoterm.class.php b/htdocs/core/class/commonincoterm.class.php index e74d1428781..6c707141774 100644 --- a/htdocs/core/class/commonincoterm.class.php +++ b/htdocs/core/class/commonincoterm.class.php @@ -64,7 +64,9 @@ trait CommonIncoterm $result = $this->db->query($sql); if ($result) { $res = $this->db->fetch_object($result); - $out .= $res->code; + if ($res) { + $out .= $res->code; + } } } @@ -76,7 +78,7 @@ trait CommonIncoterm /** * Return incoterms informations for pdf display * - * @return string incoterms info + * @return string|boolean Incoterms info or false */ public function getIncotermsForPDF() { @@ -86,7 +88,11 @@ trait CommonIncoterm $num = $this->db->num_rows($resql); if ($num > 0) { $res = $this->db->fetch_object($resql); - return 'Incoterm : '.$res->code.' - '.$this->location_incoterms; + if ($res) { + return 'Incoterm : '.$res->code.' - '.$this->location_incoterms; + } else { + return $res; + } } else { return ''; } diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index edc263f55b7..fe0308974cf 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -62,6 +62,11 @@ class StockTransfer extends CommonObject */ public $picto = 'stock'; + public $date_prevue_depart; + public $date_prevue_arrivee; + public $date_reelle_depart; + public $date_reelle_arrivee; + const STATUS_DRAFT = 0; const STATUS_VALIDATED = 1;