diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index 9176f054f0d..48f5ab69328 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -137,27 +137,13 @@ else if ($_POST["action"] == 'confirmdeleteline') else if ($_POST["action"] == 'changeproductdesc') { dolibarr_set_const($db, "PRODUIT_CHANGE_PROD_DESC", $_POST["activate_changeproductdesc"]); - dolibarr_set_const($db, "PROPALE_ADD_PROD_DESC", 0); - dolibarr_set_const($db, "COMMANDE_ADD_PROD_DESC", 0); - dolibarr_set_const($db, "FACTURE_ADD_PROD_DESC", 0); + dolibarr_set_const($db, "FORM_ADD_PROD_DESC", 0); Header("Location: produit.php"); exit; } -else if ($_POST["action"] == 'viewProdDescInPropal') +else if ($_POST["action"] == 'viewProdDescInForm') { - dolibarr_set_const($db, "PROPALE_ADD_PROD_DESC", $_POST["activate_viewProdDescInPropal"]); - Header("Location: produit.php"); - exit; -} -else if ($_POST["action"] == 'viewProdDescInOrder') -{ - dolibarr_set_const($db, "COMMANDE_ADD_PROD_DESC", $_POST["activate_viewProdDescInOrder"]); - Header("Location: produit.php"); - exit; -} -else if ($_POST["action"] == 'viewProdDescInInvoice') -{ - dolibarr_set_const($db, "FACTURE_ADD_PROD_DESC", $_POST["activate_viewProdDescInInvoice"]); + dolibarr_set_const($db, "FORM_ADD_PROD_DESC", $_POST["activate_viewProdDescInForm"]); Header("Location: produit.php"); exit; } @@ -268,42 +254,14 @@ print ''; if ($conf->global->PRODUIT_CHANGE_PROD_DESC == 0) { - // Visualiser description produit dans propale activation/desactivation + // Visualiser description produit dans les formulaires activation/desactivation $var=!$var; print "
"; - print ""; + print ""; print ""; - print ''.$langs->trans("ViewProductDescInPropalAbility").''; + print ''.$langs->trans("ViewProductDescInFormAbility").''; print ''; - print $html->selectyesno("activate_viewProdDescInPropal",$conf->global->PROPALE_ADD_PROD_DESC,1); - print ''; - print ''; - print ""; - print ''; - print '
'; - - // Visualiser description produit dans commande activation/desactivation - $var=!$var; - print "
"; - print ""; - print ""; - print ''.$langs->trans("ViewProductDescInOrderAbility").''; - print ''; - print $html->selectyesno("activate_viewProdDescInOrder",$conf->global->COMMANDE_ADD_PROD_DESC,1); - print ''; - print ''; - print ""; - print ''; - print '
'; - - // Visualiser description produit dans facture activation/desactivation - $var=!$var; - print "
"; - print ""; - print ""; - print ''.$langs->trans("ViewProductDescInInvoiceAbility").''; - print ''; - print $html->selectyesno("activate_viewProdDescInInvoice",$conf->global->FACTURE_ADD_PROD_DESC,1); + print $html->selectyesno("activate_viewProdDescInForm",$conf->global->FORM_ADD_PROD_DESC,1); print ''; print ''; print ""; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a628399fd38..3cee83c00ee 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1039,7 +1039,7 @@ if ($conf->expedition->enabled) else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; print ' - '.nl2br($objp->product); - if ($conf->global->PROPALE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) { print '
'.nl2br($objp->product_desc); } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 62f18d01137..3ef0c7db85c 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1257,7 +1257,7 @@ else else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.' - '.nl2br($objp->product); print ($objp->description && $objp->description!=$objp->product)?'
'.nl2br($objp->description):''; - if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) { print '
'.nl2br($objp->product_desc); } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a843bcb9c9f..fa91e6b3caf 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1794,7 +1794,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->FACTURE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) { print '
'.nl2br(stripslashes($objp->product_desc)); } diff --git a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php index 1bb34496258..3f7cbb17c92 100644 --- a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php +++ b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php @@ -218,7 +218,7 @@ class pdf_muscadet extends ModelePDFCommandesSuppliers } // Ajoute description du produit - if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_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 2a34bdce6bd..3062eceaa0f 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -213,7 +213,7 @@ class pdf_einstein extends ModelePDFCommandes } // Ajoute description du produit - if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_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 40d4f7b289b..72ca1095367 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->FACTURE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_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 42a35a1b19b..930715cfb04 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -84,12 +84,6 @@ class modCommande extends DolibarrModules $this->const[1][2] = "mod_commande_marbre"; $this->const[1][3] = 'Nom du gestionnaire de numérotation des commandes'; $this->const[1][4] = 0; - - $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"; - $this->const[2][4] = 1; // Boites $this->boxes = array(); diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php index 155b4fd859e..53312e35ae7 100644 --- a/htdocs/includes/modules/modFacture.class.php +++ b/htdocs/includes/modules/modFacture.class.php @@ -94,13 +94,6 @@ class modFacture extends DolibarrModules $this->const[$r][2] = "0"; $r++; - $this->const[$r][0] = "FACTURE_ADD_PROD_DESC"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "0"; - $this->const[$r][3] = "Mettre à 1 pour voir la description d'un produit dans une facture"; - $this->const[$r][4] = 1; - $r++; - // Boites $this->boxes = array(); $r=0; diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php index 3dc11e1e375..c1970a4df91 100644 --- a/htdocs/includes/modules/modPropale.class.php +++ b/htdocs/includes/modules/modPropale.class.php @@ -83,12 +83,6 @@ class modPropale extends DolibarrModules $this->const[1][2] = "mod_propale_marbre"; $this->const[1][3] = 'Nom du gestionnaire de numérotation des propales'; $this->const[1][4] = 0; - - $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"; - $this->const[2][4] = 1; // Boxes $this->boxes = array(); diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index a0ab52e4402..ed3233743a7 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -238,7 +238,7 @@ class pdf_propale_azur extends ModelePDFPropales } // Ajoute description complète du produit - if ($conf->global->PROPALE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) { if ($propale->lignes[$i]->product_desc && $propale->lignes[$i]->product_desc!=$propale->lignes[$i]->libelle && $propale->lignes[$i]->product_desc!=$propale->lignes[$i]->desc) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b3684bec2f3..059fbc3ae06 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -499,10 +499,8 @@ LDAPFieldMobileExample=Default attribute : mobile ProductSetup=Products module setup NumberOfProductShowInSelect=Max number of products in combos select lists (0=no limit) ConfirmDeleteProductLineAbility=Confirmation of removal of a line produces in the forms -ModifyProductDescAbility= -ViewProductDescInPropalAbility= -ViewProductDescInOrderAbility= -ViewProductDescInInvoiceAbility= +ModifyProductDescAbility=Personalization of descriptions produced in the forms +ViewProductDescInFormAbility=Visualization of descriptions produced in the forms ##### Syslog ##### SyslogSetup=Syslog module setup SyslogOutput=Log output diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index bcf8d249f80..919e92f9dcc 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -500,9 +500,7 @@ ProductSetup=Configuration du module Produits NumberOfProductShowInSelect=Nombre de produits max dans les listes déroulantes (0=aucune limite) ConfirmDeleteProductLineAbility=Confirmation de suppression d'une ligne produit dans les formulaires ModifyProductDescAbility=Personnalisation des descriptions produits dans les formulaires -ViewProductDescInPropalAbility=Visualisation des descriptions produits dans les propales -ViewProductDescInOrderAbility=Visualisation des descriptions produits dans les commandes -ViewProductDescInInvoiceAbility=Visualisation des descriptions produits dans les factures +ViewProductDescInFormAbility=Visualisation des descriptions produits dans les formulaires ##### Syslog ##### SyslogSetup=Configuration du module Syslog SyslogOutput=Sortie des log diff --git a/htdocs/livraison/mods/pdf/pdf_typhon.modules.php b/htdocs/livraison/mods/pdf/pdf_typhon.modules.php index 9a3e928802d..63a6663c5a9 100644 --- a/htdocs/livraison/mods/pdf/pdf_typhon.modules.php +++ b/htdocs/livraison/mods/pdf/pdf_typhon.modules.php @@ -219,7 +219,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder } // Ajoute description du produit - if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + if ($conf->global->FORM_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) { if ($lignesdelivery[$i]->product_desc&&$lignesdelivery[$i]->product_desc!=$lignesdelivery[$i]->libelle&&$lignesdelivery[$i]->product_desc!=$lignesdelivery[$i]->desc) {