modification de la description produit
This commit is contained in:
parent
366c83e9b9
commit
4993c5e84b
@ -684,7 +684,7 @@ if ($_GET['propalid'] > 0)
|
|||||||
$sql = 'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice,';
|
$sql = 'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice,';
|
||||||
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
|
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
|
||||||
|
|
||||||
if ($conf->global->PROP_ADD_PROD_DESC)
|
if ($conf->global->PROP_ADD_PROD_DESC && $conf->global->CHANGE_PROD_DESC=0)
|
||||||
{
|
{
|
||||||
$sql.= ', p.description as product_desc';
|
$sql.= ', p.description as product_desc';
|
||||||
}
|
}
|
||||||
@ -730,7 +730,7 @@ if ($_GET['propalid'] > 0)
|
|||||||
print ' '.$objp->ref.'</a>';
|
print ' '.$objp->ref.'</a>';
|
||||||
print ' - '.nl2br(stripslashes($objp->product));
|
print ' - '.nl2br(stripslashes($objp->product));
|
||||||
|
|
||||||
if ($conf->global->PROP_ADD_PROD_DESC)
|
if ($conf->global->PROP_ADD_PROD_DESC && $conf->global->CHANGE_PROD_DESC=0)
|
||||||
{
|
{
|
||||||
print '<br>'.nl2br(stripslashes($objp->product_desc));
|
print '<br>'.nl2br(stripslashes($objp->product_desc));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -683,6 +683,12 @@ else
|
|||||||
*/
|
*/
|
||||||
$sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice,';
|
$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';
|
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
|
||||||
|
|
||||||
|
if ($conf->global->COM_ADD_PROD_DESC && $conf->global->CHANGE_PROD_DESC=0)
|
||||||
|
{
|
||||||
|
$sql.= ', p.description as product_desc';
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid';
|
||||||
$sql.= ' WHERE l.fk_commande = '.$commande->id;
|
$sql.= ' WHERE l.fk_commande = '.$commande->id;
|
||||||
@ -724,6 +730,12 @@ else
|
|||||||
else print img_object($langs->trans('ShowProduct'),'product');
|
else print img_object($langs->trans('ShowProduct'),'product');
|
||||||
print ' '.$objp->ref.'</a> - '.stripslashes(nl2br($objp->product));
|
print ' '.$objp->ref.'</a> - '.stripslashes(nl2br($objp->product));
|
||||||
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
||||||
|
|
||||||
|
if ($conf->global->COM_ADD_PROD_DESC && $conf->global->CHANGE_PROD_DESC=0)
|
||||||
|
{
|
||||||
|
print '<br>'.nl2br(stripslashes($objp->product_desc));
|
||||||
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user