Fix: Missing fields into insert from webservice

This commit is contained in:
Laurent Destailleur 2012-07-19 14:26:02 +02:00
parent 5b3c50dad2
commit f5b58b6f12

View File

@ -277,6 +277,7 @@ class Product extends CommonObject
$sql.= "datec"; $sql.= "datec";
$sql.= ", entity"; $sql.= ", entity";
$sql.= ", ref"; $sql.= ", ref";
$sql.= ", ref_ext";
$sql.= ", price_min"; $sql.= ", price_min";
$sql.= ", price_min_ttc"; $sql.= ", price_min_ttc";
$sql.= ", label"; $sql.= ", label";
@ -292,7 +293,8 @@ class Product extends CommonObject
$sql.= ") VALUES ("; $sql.= ") VALUES (";
$sql.= $this->db->idate($now); $sql.= $this->db->idate($now);
$sql.= ", ".$conf->entity; $sql.= ", ".$conf->entity;
$sql.= ", '".$this->ref."'"; $sql.= ", '".$this->db->escape($this->ref)."'";
$sql.= ", ".($this->ref_ext?"'".$this->db->escape($this->ref_ext)."'":"null");
$sql.= ", ".price2num($price_min_ht); $sql.= ", ".price2num($price_min_ht);
$sql.= ", ".price2num($price_min_ttc); $sql.= ", ".price2num($price_min_ttc);
$sql.= ", ".($this->libelle?"'".$this->db->escape($this->libelle)."'":"null"); $sql.= ", ".($this->libelle?"'".$this->db->escape($this->libelle)."'":"null");