From d174dcbb2ef90008b54d0ee57b7ee64efc31abdd Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 11 Feb 2006 17:36:14 +0000 Subject: [PATCH] modification de la description produit --- htdocs/commande/commande.class.php | 4 ++-- htdocs/commande/fiche.php | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index d21b0c667cc..43eed91ce5c 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -379,8 +379,8 @@ class Commande $prod = new Product($this->db, $fk_product); if ($prod->fetch($fk_product) > 0) { - $desc = nl2br(stripslashes($prod->libelle)); - $product_desc = $product_desc?$product_desc:$prod->description; + $desc = $desc?$desc:$prod->libelle; + $product_desc = nl2br(stripslashes($prod->description)); // multiprix if($conf->global->PRODUIT_MULTIPRICES == 1) { diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 6dde0851d4e..f5fdc4b0b4f 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -683,12 +683,6 @@ else */ $sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice,'; $sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid'; - - if ($conf->global->COM_ADD_PROD_DESC) - { - $sql.= ', p.description as product_desc'; - } - $sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid'; $sql.= ' WHERE l.fk_commande = '.$commande->id; @@ -730,12 +724,6 @@ else else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.' - '.stripslashes(nl2br($objp->product)); print ($objp->description && $objp->description!=$objp->product)?'
'.$objp->description:''; - - if ($conf->global->COM_ADD_PROD_DESC) - { - print '
'.nl2br(stripslashes($objp->product_desc)); - } - print ''; } else