From 2ba6e65feb6c29b4cbdf409629ff5fb9069e4cc6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 20:03:41 +0200 Subject: [PATCH] Fix label --- htdocs/product/stock/class/entrepot.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 5f98de4993b..9f764f7d412 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -272,6 +272,7 @@ class Entrepot extends CommonObject $error = 0; if (empty($id)) $id = $this->id; + if (empty($this->label)) $this->label = $this->libelle; // For backward compatibility // Check if new parent is already a child of current warehouse if (!empty($this->fk_parent)) @@ -285,7 +286,7 @@ class Entrepot extends CommonObject } } - $this->libelle = trim($this->libelle); + $this->label = trim($this->label); $this->description = trim($this->description); $this->lieu = trim($this->lieu); @@ -296,7 +297,7 @@ class Entrepot extends CommonObject $this->country_id = ($this->country_id > 0 ? $this->country_id : 0); $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; - $sql .= " SET ref = '".$this->db->escape($this->libelle)."'"; + $sql .= " SET ref = '".$this->db->escape($this->label)."'"; $sql .= ", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent : "NULL"); $sql .= ", description = '".$this->db->escape($this->description)."'"; $sql .= ", statut = ".$this->statut;