This commit is contained in:
Regis Houssin 2006-02-12 19:30:15 +00:00
parent 6ff32f3e6e
commit cd861bc49f

View File

@ -92,7 +92,7 @@ class Commande
{ {
$CommLigne = new CommandeLigne(); $CommLigne = new CommandeLigne();
$CommLigne->libelle = $propal->lignes[$i]->libelle; $CommLigne->libelle = $propal->lignes[$i]->libelle;
$CommLigne->description = $propal->lignes[$i]->description; $CommLigne->description = $propal->lignes[$i]->desc;
$CommLigne->price = $propal->lignes[$i]->price; $CommLigne->price = $propal->lignes[$i]->price;
$CommLigne->subprice = $propal->lignes[$i]->subprice; $CommLigne->subprice = $propal->lignes[$i]->subprice;
$CommLigne->tva_tx = $propal->lignes[$i]->tva_tx; $CommLigne->tva_tx = $propal->lignes[$i]->tva_tx;
@ -338,16 +338,8 @@ class Commande
$price = $p_price - $remise; $price = $p_price - $remise;
} }
if ($conf->global->CHANGE_PROD_DESC)
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet (fk_commande, fk_product, qty, price, tva_tx, label, description, remise_percent, subprice) VALUES '; $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet (fk_commande, fk_product, qty, price, tva_tx, label, description, remise_percent, subprice) VALUES ';
$sql .= " ('".$this->id."', '$p_product_id','". $p_qty."','". $price."','".$p_tva_tx."','".addslashes($p_desc)."','".addslashes($p_product_desc)."', '$remise_percent', '$subprice') ; "; $sql .= " ('".$this->id."', '$p_product_id','". $p_qty."','". $price."','".$p_tva_tx."','".addslashes($p_desc)."','".addslashes($p_product_desc)."', '$remise_percent', '$subprice') ; ";
}
else
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet (fk_commande, fk_product, qty, price, tva_tx, label, remise_percent, subprice) VALUES ';
$sql .= " ('".$this->id."', '$p_product_id','". $p_qty."','". $price."','".$p_tva_tx."','".addslashes($p_desc)."','$remise_percent', '$subprice') ; ";
}
if ($this->db->query($sql) ) if ($this->db->query($sql) )
{ {