modification de la description produit

This commit is contained in:
Regis Houssin 2006-02-11 18:02:29 +00:00
parent 8b659dde53
commit dce5a20172
2 changed files with 14 additions and 1 deletions

View File

@ -406,7 +406,15 @@ class Commande
}
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet (fk_commande,label,description,fk_product, price,qty,tva_tx, remise_percent, subprice, remise)';
$sql .= " VALUES ($this->id, '" . addslashes($desc) . "','" . nl2br(addslashes($product_desc)) . "',$fk_product,".price2num($price).", '$qty', $txtva, $remise_percent,'".price2num($subprice)."','".price2num( $remise)."') ;";
if ($conf->global->CHANGE_PROD_DESC)
{
$sql .= " VALUES ($this->id, '" . addslashes($desc) . "','" . nl2br(addslashes($product_desc)) . "',$fk_product,".price2num($price).", '$qty', $txtva, $remise_percent,'".price2num($subprice)."','".price2num( $remise)."') ;";
}
else
{
$sql .= " VALUES ($this->id, '" . addslashes($desc) . "','" . addslashes($desc) . "',$fk_product,".price2num($price).", '$qty', $txtva, $remise_percent,'".price2num($subprice)."','".price2num( $remise)."') ;";
}
if ( $this->db->query( $sql) )
{

View File

@ -74,6 +74,11 @@ class modProduit extends DolibarrModules
// Constantes
$this->const = array();
$this->const[1][0] = "CHANGE_PROD_DESC";
$this->const[1][1] = "chaine";
$this->const[1][2] = "0";
$this->const[1][3] = "Mettre à 1 pour modifier la description d\'un produit dans une propale, commande et facture";
$this->const[1][4] = 1;
// Boxes
$this->boxes = array();