Fix: suppression dfinitive de la constante PRODUIT_CHANGE_PROD_DESC

This commit is contained in:
Regis Houssin 2007-12-14 16:01:10 +00:00
parent 6bfdcca995
commit 6224f42ed8
9 changed files with 39 additions and 85 deletions

View File

@ -99,10 +99,6 @@ else if ($_POST["action"] == 'sousproduits')
dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $_POST["activate_sousproduits"]);
}
}
else if ($_POST["action"] == 'changeproductdesc')
{
dolibarr_set_const($db, "PRODUIT_CHANGE_PROD_DESC", $_POST["activate_changeproductdesc"]);
}
else if ($_POST["action"] == 'viewProdDescInForm')
{
dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", $_POST["activate_viewProdDescInForm"]);
@ -232,23 +228,6 @@ else
print '</tr>';
print '</form>';
// Modification description produit activation/desactivation
/* Cet option ne doit pas exister. Les description de lignes doivent toujours etre modifiable.
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print "<input type=\"hidden\" name=\"action\" value=\"changeproductdesc\">";
print "<tr ".$bc[$var].">";
print '<td>'.$langs->trans("ModifyProductDescAbility").'</td>';
print '<td width="60" align="right">';
print $html->selectyesno("activate_changeproductdesc",$conf->global->PRODUIT_CHANGE_PROD_DESC,1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</tr>';
print '</form>';
*/
// Visualiser description produit dans les formulaires activation/desactivation
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1502,19 +1502,16 @@ if ($_GET['propalid'] > 0)
}
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
if (! $conf->global->PRODUIT_CHANGE_PROD_DESC)
// éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{
// éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
$doleditor->Create();
}
else
{
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
}
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
$doleditor->Create();
}
else
{
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
}
print '</td>';

View File

@ -1621,21 +1621,18 @@ else
}
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
if (! $conf->global->PRODUIT_CHANGE_PROD_DESC)
{
// éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
$doleditor->Create();
}
else
{
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
}
}
// éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
$doleditor->Create();
}
else
{
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
}
print '</td>';
print '<td align="right"><input type="text" size="2" name="qty" value="1"></td>';

View File

@ -2638,19 +2638,16 @@ else
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
if (! $conf->global->PRODUIT_CHANGE_PROD_DESC)
// éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{
// éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
$doleditor->Create();
}
else
{
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
}
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
$doleditor->Create();
}
else
{
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
}
print '</td>';

View File

@ -241,13 +241,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$libelleproduitservice=$outputlangs->transnoentities("Product")." ".$com->lignes[$i]->ref_fourn." - ".$libelleproduitservice;
// Ajoute description du produit
if ($conf->global->PRODUIT_DESC_IN_FORM && !$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)
{
if ($com->lignes[$i]->product_desc&&$com->lignes[$i]->product_desc!=$fac->lignes[$i]->libelle&&$com->lignes[$i]->product_desc!=$com->lignes[$i]->desc)
{
if ($libelleproduitservice) $libelleproduitservice.="\n";
$libelleproduitservice.=$com->lignes[$i]->product_desc;
}
if ($libelleproduitservice) $libelleproduitservice.="\n";
$libelleproduitservice.=$com->lignes[$i]->product_desc;
}
}
if ($com->lignes[$i]->date_start && $com->lignes[$i]->date_end)

View File

@ -80,20 +80,13 @@ class modProduit extends DolibarrModules
// Constantes
$this->const = array();
$r=0;
$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";
$this->const[$r][4] = 1;
$r++;
$this->const[$r][0] = "MAIN_SEARCHFORM_PRODUITSERVICE";
$this->const[$r][1] = "yesno";
$this->const[$r][2] = "1";
$this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche";
$this->const[$r][4] = 0;
$r++;
$r++;
// Boxes
$this->boxes = array();

View File

@ -142,16 +142,8 @@ class Propal extends CommonObject
{
$prod=new Product($this->db);
$prod->fetch($idproduct);
// on ajoute la description du produit si l'option est active
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$productdesc = $prod->description;
}
else
{
$productdesc = '';
}
$productdesc = $prod->description;
$tva_tx = get_default_tva($mysoc,$this->client,$prod->tva_tx);
// multiprix

View File

@ -1162,3 +1162,5 @@ ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_factur
-- V4.1 update llx_facture set total_ttc = NULL where rowid in (select fk_facture from llx_facturedet where description = '(CREDIT_NOTE)');
-- V4.1 update llx_societe_remise_except as re set re.fk_facture = (select fk_facture from llx_facturedet as fd where fd.rowid = re.fk_facture_line), re.fk_facture_line = NULL where re.fk_facture_line in (select rowid from llx_facturedet where description = '(CREDIT_NOTE)');
-- V4.1 delete from llx_facturedet where description = '(CREDIT_NOTE)';
DELETE FROM llx_const WHERE name = 'PRODUIT_CHANGE_PROD_DESC';