diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index ec463c650a9..88ad6cbd7a6 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -857,7 +857,7 @@ if ($_GET['propalid'] > 0)
print ' '.$objp->ref.'';
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 '
'.nl2br(stripslashes($objp->product_desc));
}
diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php
index 530ff9c83c2..10a195b6db3 100644
--- a/htdocs/commande/commande.class.php
+++ b/htdocs/commande/commande.class.php
@@ -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)."') ;";
}
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 8f1d3009fed..831786ae58c 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -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.' - '.stripslashes(nl2br($objp->product));
print ($objp->description && $objp->description!=$objp->product)?'
'.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 '
'.nl2br(stripslashes($objp->product_desc));
}
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index f7e3562e18c..9d91d8f0988 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -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)?'
'.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 '
'.nl2br(stripslashes($objp->product_desc));
}
diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php
index fe9d7b93800..3f0e88c6b28 100644
--- a/htdocs/facture.class.php
+++ b/htdocs/facture.class.php
@@ -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',";
}
diff --git a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php
index 921ebf13703..a25f1edb80e 100644
--- a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php
+++ b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php
@@ -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)
{
diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php
index 4d4757f3fc8..fbdd6e18cb0 100644
--- a/htdocs/includes/modules/commande/pdf_einstein.modules.php
+++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php
@@ -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)
{
diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php
index ee3705ac73e..05521b543e8 100644
--- a/htdocs/includes/modules/facture/pdf_crabe.modules.php
+++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php
@@ -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)
{
diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php
index 8f2a0b158d0..6f04b9414bc 100644
--- a/htdocs/includes/modules/modCommande.class.php
+++ b/htdocs/includes/modules/modCommande.class.php
@@ -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";
diff --git a/htdocs/includes/modules/modProduit.class.php b/htdocs/includes/modules/modProduit.class.php
index 62ff3703eaa..e54e15b2450 100644
--- a/htdocs/includes/modules/modProduit.class.php
+++ b/htdocs/includes/modules/modProduit.class.php
@@ -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";
diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php
index e327750a629..409a2a04173 100644
--- a/htdocs/includes/modules/modPropale.class.php
+++ b/htdocs/includes/modules/modPropale.class.php
@@ -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";
diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php
index 398435328c4..965d37676e4 100644
--- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php
+++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php
@@ -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)
{
diff --git a/htdocs/livraison/mods/pdf/pdf_typhon.modules.php b/htdocs/livraison/mods/pdf/pdf_typhon.modules.php
index ff802c0dbd2..6d16ba0aa72 100644
--- a/htdocs/livraison/mods/pdf/pdf_typhon.modules.php
+++ b/htdocs/livraison/mods/pdf/pdf_typhon.modules.php
@@ -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)
{
diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php
index 0b5c03a4fc1..08089deff75 100644
--- a/htdocs/propal.class.php
+++ b/htdocs/propal.class.php
@@ -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)."')";
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index 5aa0259639e..096d9c2e9f4 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -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';