Qual: Uniformisation nommage parametre de table des constantes

This commit is contained in:
Laurent Destailleur 2006-05-21 22:34:15 +00:00
parent cea1cad688
commit 4c2b2d3181
15 changed files with 21 additions and 18 deletions

View File

@ -857,7 +857,7 @@ if ($_GET['propalid'] > 0)
print ' '.$objp->ref.'</a>';
print ' - '.nl2br(stripslashes($objp->product));
if ($conf->global->PROP_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->PROP_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
print '<br>'.nl2br(stripslashes($objp->product_desc));
}

View File

@ -436,7 +436,7 @@ class Commande
// Bugfix
/*
if ($conf->global->CHANGE_PROD_DESC)
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$sql .= " ('".$this->id."', '$p_product_id','". $p_qty."','".price2num($price)."','".$p_tva_tx."','".addslashes($p_desc)."','".addslashes($p_product_desc)."', '$remise_percent', '$subprice') ; ";
}
@ -523,7 +523,7 @@ class Commande
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet (fk_commande,label,description,fk_product, price,qty,tva_tx, remise_percent, subprice, remise)';
if ($conf->global->CHANGE_PROD_DESC)
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$sql .= " VALUES ($this->id, '" . addslashes($desc) . "','" . addslashes($product_desc) . "',$fk_product,".price2num($price).", '$qty', $txtva, $remise_percent,'".price2num($subprice)."','".price2num( $remise)."') ;";
}

View File

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

View File

@ -1529,7 +1529,7 @@ 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 && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->FAC_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$sql.= ', p.description as product_desc';
}
@ -1582,7 +1582,7 @@ else
print_date_range($objp->date_start,$objp->date_end);
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
if ($conf->global->FAC_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->FAC_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
print '<br>'.nl2br(stripslashes($objp->product_desc));
}

View File

@ -999,7 +999,7 @@ class Facture
$rangmax = $row[0];
}
if ($conf->global->CHANGE_PROD_DESC)
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
if (!$product_desc)
{
@ -1014,7 +1014,7 @@ class Facture
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facturedet ';
$sql.= ' (fk_facture, description, price, qty, tva_taux, fk_product, remise_percent, subprice, remise, date_start, date_end, fk_code_ventilation, rang)';
if ($conf->global->CHANGE_PROD_DESC)
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$sql.= " VALUES ($facid, '".addslashes($product_desc)."','$price','$qty','$txtva',";
}

View File

@ -220,7 +220,7 @@ class pdf_muscadet extends ModelePDFCommandesSuppliers
}
// Ajoute description du produit
if ($conf->global->COM_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_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

@ -218,7 +218,7 @@ class pdf_einstein extends ModelePDFCommandes
}
// Ajoute description du produit
if ($conf->global->COM_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_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

@ -237,7 +237,7 @@ class pdf_crabe extends ModelePDFFactures
}
// Ajoute description du produit
if ($conf->global->FAC_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->FAC_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
if ($fac->lignes[$i]->product_desc&&$fac->lignes[$i]->product_desc!=$fac->lignes[$i]->libelle&&$fac->lignes[$i]->product_desc!=$fac->lignes[$i]->desc)
{

View File

@ -85,7 +85,7 @@ class modCommande extends DolibarrModules
$this->const[1][3] = 'Nom du gestionnaire de numérotation des commandes';
$this->const[1][4] = 0;
$this->const[2][0] = "COM_ADD_PROD_DESC";
$this->const[2][0] = "COMMANDE_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 commande";

View File

@ -76,7 +76,7 @@ class modProduit extends DolibarrModules
$this->const = array();
$r=0;
$this->const[$r][0] = "CHANGE_PROD_DESC";
$this->const[$r][0] = "PRODUIT_CHANGE_PROD_DESC";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "0";
$this->const[$r][3] = "Mettre à 1 pour permettre modification de description d'un produit dans une propale, commande et facture";

View File

@ -84,7 +84,7 @@ class modPropale extends DolibarrModules
$this->const[1][3] = 'Nom du gestionnaire de numérotation des propales';
$this->const[1][4] = 0;
$this->const[2][0] = "PROP_ADD_PROD_DESC";
$this->const[2][0] = "PROPALE_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";

View File

@ -246,7 +246,7 @@ class pdf_propale_azur extends ModelePDFPropales
}
// Ajoute description du produit
if ($conf->global->PROP_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->PROP_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
if ($prop->lignes[$i]->product_desc&&$prop->lignes[$i]->product_desc!=$fac->lignes[$i]->libelle&&$prop->lignes[$i]->product_desc!=$prop->lignes[$i]->desc)
{

View File

@ -218,7 +218,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
// Ajoute description du produit
if ($conf->global->COM_ADD_PROD_DESC && !$conf->global->CHANGE_PROD_DESC)
if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
if ($delivery->lignes[$i]->product_desc&&$delivery->lignes[$i]->product_desc!=$fac->lignes[$i]->libelle&&$delivery->lignes[$i]->product_desc!=$delivery->lignes[$i]->desc)
{

View File

@ -189,7 +189,7 @@ class Propal
$price = $prod->price - $remise;
}
if ($conf->global->CHANGE_PROD_DESC)
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propaldet (fk_propal, fk_product, qty, price, tva_tx, description, remise_percent, subprice) VALUES ";
$sql .= " (".$this->id.",". $idproduct.",'". $qty."','". $price."','".$txtva."','".addslashes($p_product_desc)."','".price2num($remise_percent)."','".price2num($subprice)."')";

View File

@ -98,6 +98,9 @@ drop table if exists llx_avoir_model_pdf;
drop table if exists llx_soc_recontact;
update llx_const set name='PRODUIT_CHANGE_PROD_DESC' where name='CHANGE_PROD_DESC';
update llx_const set name='COMMANDE_ADD_PROD_DESC' where name='COM_ADD_PROD_DESC';
update llx_const set name='PROPALE_ADD_PROD_DESC' where name='PROP_ADD_PROD_DESC';
update llx_const set name='DON_FORM' where name='DONS_FORM';
update llx_const set name='MAIN_SIZE_LISTE_LIMIT' where name='SIZE_LISTE_LIMIT';
update llx_const set name='SOCIETE_FISCAL_MONTH_START' where name='FISCAL_MONTH_START';