From a76638ebf9d78658ec0877854fc07ab422219002 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 6 Dec 2007 21:11:11 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20ajout=20du=20libelle=20produit=20=E0=20l?= =?UTF-8?q?a=20cr=E9ation=20en=20base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 6d87dfcb457..0c00f3b0f69 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -163,6 +163,7 @@ class Product extends CommonObject // Clean parameters $this->ref = trim(sanitize_string($this->ref)); + $this->libelle = trim($this->libelle); if ($this->tva_tx=='') $this->tva_tx = 0; if ($this->price=='') $this->price = 0; if ($this->status=='') $this->status = 0; @@ -201,9 +202,11 @@ class Product extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."product"; $sql.= " (datec, "; if ($this->ref) $sql.= "ref, "; + if ($this->libelle) $sql.= "label, "; $sql.= "fk_user_author, fk_product_type, price, price_ttc, price_base_type, canvas)"; $sql.= " VALUES (now(), "; if ($this->ref) $sql.= "'".$this->ref."', "; + if ($this->libelle) $sql.= "'".$this->libelle."', "; $sql.= $user->id.","; $sql.= " ".$this->type.","; $sql.= ($price_ht?price2num($price_ht):"null").",";