Fix: suppression définitive 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"]); 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') else if ($_POST["action"] == 'viewProdDescInForm')
{ {
dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", $_POST["activate_viewProdDescInForm"]); dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", $_POST["activate_viewProdDescInForm"]);
@ -232,23 +228,6 @@ else
print '</tr>'; print '</tr>';
print '</form>'; 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 // Visualiser description produit dans les formulaires activation/desactivation
$var=!$var; $var=!$var;
print "<form method=\"post\" action=\"produit.php\">"; print "<form method=\"post\" action=\"produit.php\">";

View File

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

View File

@ -1502,8 +1502,6 @@ if ($_GET['propalid'] > 0)
} }
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>'; if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
if (! $conf->global->PRODUIT_CHANGE_PROD_DESC)
{
// éditeur wysiwyg // éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{ {
@ -1515,7 +1513,6 @@ if ($_GET['propalid'] > 0)
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>'; print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
} }
}
print '</td>'; print '</td>';
print '<td align="right"><input type="text" size="2" name="qty" value="1"></td>'; print '<td align="right"><input type="text" size="2" name="qty" value="1"></td>';

View File

@ -1622,8 +1622,6 @@ else
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>'; if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
if (! $conf->global->PRODUIT_CHANGE_PROD_DESC)
{
// éditeur wysiwyg // éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{ {
@ -1635,7 +1633,6 @@ else
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>'; print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
} }
}
print '</td>'; print '</td>';
print '<td align="right"><input type="text" size="2" name="qty" value="1"></td>'; print '<td align="right"><input type="text" size="2" name="qty" value="1"></td>';

View File

@ -2638,8 +2638,6 @@ else
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>'; if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
if (! $conf->global->PRODUIT_CHANGE_PROD_DESC)
{
// éditeur wysiwyg // éditeur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
{ {
@ -2651,7 +2649,6 @@ else
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>'; print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
} }
}
print '</td>'; print '</td>';
print '<td align="right"><input type="text" name="qty" value="'.($fac->type==2?'-1':'1').'" size="2"></td>'; print '<td align="right"><input type="text" name="qty" value="'.($fac->type==2?'-1':'1').'" size="2"></td>';

View File

@ -241,15 +241,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$libelleproduitservice=$outputlangs->transnoentities("Product")." ".$com->lignes[$i]->ref_fourn." - ".$libelleproduitservice; $libelleproduitservice=$outputlangs->transnoentities("Product")." ".$com->lignes[$i]->ref_fourn." - ".$libelleproduitservice;
// Ajoute description du produit // 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"; if ($libelleproduitservice) $libelleproduitservice.="\n";
$libelleproduitservice.=$com->lignes[$i]->product_desc; $libelleproduitservice.=$com->lignes[$i]->product_desc;
} }
} }
}
if ($com->lignes[$i]->date_start && $com->lignes[$i]->date_end) if ($com->lignes[$i]->date_start && $com->lignes[$i]->date_end)
{ {
// Affichage durée si il y en a une // Affichage durée si il y en a une

View File

@ -81,13 +81,6 @@ class modProduit extends DolibarrModules
$this->const = array(); $this->const = array();
$r=0; $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][0] = "MAIN_SEARCHFORM_PRODUITSERVICE";
$this->const[$r][1] = "yesno"; $this->const[$r][1] = "yesno";
$this->const[$r][2] = "1"; $this->const[$r][2] = "1";

View File

@ -143,15 +143,7 @@ class Propal extends CommonObject
$prod=new Product($this->db); $prod=new Product($this->db);
$prod->fetch($idproduct); $prod->fetch($idproduct);
// on ajoute la description du produit si l'option est active
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
{
$productdesc = $prod->description; $productdesc = $prod->description;
}
else
{
$productdesc = '';
}
$tva_tx = get_default_tva($mysoc,$this->client,$prod->tva_tx); $tva_tx = get_default_tva($mysoc,$this->client,$prod->tva_tx);
// multiprix // 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_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 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)'; -- V4.1 delete from llx_facturedet where description = '(CREDIT_NOTE)';
DELETE FROM llx_const WHERE name = 'PRODUIT_CHANGE_PROD_DESC';