From 0f5c1817ad705fa59325e31e57b589b5ff737958 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 9 Feb 2006 16:30:32 +0000 Subject: [PATCH] =?UTF-8?q?ajout=20description=20du=20produit=20dans=20la?= =?UTF-8?q?=20fiche=20commande=20si=20constante=20PROP=5FADD=5FPROD=5FDESC?= =?UTF-8?q?=20=20=E0=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/fiche.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 32411f907f8..6ef273d06c4 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -663,6 +663,12 @@ 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->PROP_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; @@ -704,6 +710,12 @@ 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->PROP_ADD_PROD_DESC) + { + print '
'.nl2br(stripslashes($objp->product_desc)); + } + print ''; } else