Ajout constante COM_ADD_PROD_DESC , mettre 1 pour afficher la description produit

dans les commandes
This commit is contained in:
Regis Houssin 2006-02-11 16:24:55 +00:00
parent ecaa6eb84d
commit b24261692d
6 changed files with 34 additions and 16 deletions

View File

@ -683,7 +683,7 @@ 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)
if ($conf->global->COM_ADD_PROD_DESC)
{
$sql.= ', p.description as product_desc';
}
@ -730,7 +730,7 @@ else
print ' '.$objp->ref.'</a> - '.stripslashes(nl2br($objp->product));
print ($objp->description && $objp->description!=$objp->product)?'<br>'.$objp->description:'';
if ($conf->global->PROP_ADD_PROD_DESC)
if ($conf->global->COM_ADD_PROD_DESC)
{
print '<br>'.nl2br(stripslashes($objp->product_desc));
}

View File

@ -1370,6 +1370,12 @@ else
$sql .= ' '.$db->pdate('l.date_start').' as date_start,';
$sql .= ' '.$db->pdate('l.date_end').' as date_end, ';
$sql .= ' p.ref, p.fk_product_type, p.label as product';
if ($conf->global->FAC_ADD_PROD_DESC)
{
$sql.= ', p.description as product_desc';
}
$sql .= ' FROM '.MAIN_DB_PREFIX.'facturedet as l ';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON l.fk_product=p.rowid';
$sql .= ' WHERE l.fk_facture = '.$fac->id;
@ -1413,6 +1419,12 @@ else
print ' - '.nl2br(stripslashes($objp->product));
print_date_range($objp->date_start,$objp->date_end);
print ($objp->description && $objp->description!=$objp->product)?'<br>'.$objp->description:'';
if ($conf->global->FAC_ADD_PROD_DESC)
{
print '<br>'.nl2br(stripslashes($objp->product_desc));
}
print '</td>';
}
else

View File

@ -219,7 +219,7 @@ class pdf_azur extends ModelePDFCommandes
}
// Ajoute description du produit
if ($conf->global->PROP_ADD_PROD_DESC)
if ($conf->global->COM_ADD_PROD_DESC)
{
if ($com->lignes[$i]->product_desc&&$com->lignes[$i]->product_desc!=$fac->lignes[$i]->libelle&&$com->lignes[$i]->product_desc!=$com->lignes[$i]->desc)
{

View File

@ -73,9 +73,15 @@ class modCommande extends DolibarrModules
// Constantes
$this->const = array();
$this->const[0][0] = "COMMANDE_ADDON_PDF";
$this->const[0][0] = "COMMANDE_ADDON_PDF";
$this->const[0][1] = "chaine";
$this->const[0][2] = "azur";
$this->const[1][0] = "COM_ADD_PROD_DESC";
$this->const[1][1] = "chaine";
$this->const[1][2] = "0";
$this->const[1][3] = "Mettre à 1 pour voir la description d\'un produit dans une commande";
$this->const[1][4] = 1;
// Boites
$this->boxes = array();

View File

@ -118,19 +118,19 @@ class modFacture extends DolibarrModules
$this->const[7][1] = "chaine";
$this->const[7][2] = "bulot";
$this->const[7][0] = "FACTURE_ADDON";
$this->const[7][1] = "chaine";
$this->const[7][2] = "pluton";
$this->const[8][0] = "FACTURE_ADDON";
$this->const[8][1] = "chaine";
$this->const[8][2] = "pluton";
$this->const[8][0] = "FAC_FORCE_DATE_VALIDATION";
$this->const[8][1] = "yesno";
$this->const[8][2] = "0";
$this->const[9][0] = "FAC_ADD_PROD_DESC";
$this->const[9][1] = "chaine";
$this->const[9][0] = "FAC_FORCE_DATE_VALIDATION";
$this->const[9][1] = "yesno";
$this->const[9][2] = "0";
$this->const[9][3] = "Mettre à 1 pour voir la description d'un produit dans une facture";
$this->const[9][4] = 1;
$this->const[10][0] = "FAC_ADD_PROD_DESC";
$this->const[10][1] = "chaine";
$this->const[10][2] = "0";
$this->const[10][3] = "Mettre à 1 pour voir la description d\'un produit dans une facture";
$this->const[10][4] = 1;
// Boites
$this->boxes = array();

View File

@ -87,7 +87,7 @@ class modPropale extends DolibarrModules
$this->const[2][0] = "PROP_ADD_PROD_DESC";
$this->const[2][1] = "chaine";
$this->const[2][2] = "0";
$this->const[2][3] = "Mettre à 1 pour voir la description d'un produit dans une propale";
$this->const[2][3] = "Mettre à 1 pour voir la description d\'un produit dans une propale";
$this->const[2][4] = 1;
// Boxes