Fix: suppression définitive de la constante PRODUIT_CHANGE_PROD_DESC
This commit is contained in:
parent
6bfdcca995
commit
6224f42ed8
@ -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\">";
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -1502,19 +1502,16 @@ 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
|
||||||
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
|
||||||
{
|
{
|
||||||
// éditeur wysiwyg
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
|
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
|
||||||
{
|
$doleditor->Create();
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
}
|
||||||
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
|
else
|
||||||
$doleditor->Create();
|
{
|
||||||
}
|
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -1622,20 +1622,17 @@ 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
|
||||||
{
|
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');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
$doleditor->Create();
|
||||||
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
|
}
|
||||||
$doleditor->Create();
|
else
|
||||||
}
|
{
|
||||||
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>';
|
||||||
|
|||||||
@ -2638,19 +2638,16 @@ 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
|
||||||
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
|
||||||
{
|
{
|
||||||
// éditeur wysiwyg
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO)
|
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
|
||||||
{
|
$doleditor->Create();
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
}
|
||||||
$doleditor=new DolEditor('np_desc','',100,'dolibarr_details');
|
else
|
||||||
$doleditor->Create();
|
{
|
||||||
}
|
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat"></textarea>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -241,13 +241,10 @@ 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";
|
||||||
{
|
$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)
|
if ($com->lignes[$i]->date_start && $com->lignes[$i]->date_end)
|
||||||
|
|||||||
@ -81,19 +81,12 @@ 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";
|
||||||
$this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche";
|
$this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche";
|
||||||
$this->const[$r][4] = 0;
|
$this->const[$r][4] = 0;
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
// Boxes
|
// Boxes
|
||||||
$this->boxes = array();
|
$this->boxes = array();
|
||||||
|
|||||||
@ -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
|
$productdesc = $prod->description;
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
|
||||||
{
|
|
||||||
$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
|
||||||
|
|||||||
@ -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';
|
||||||
Loading…
Reference in New Issue
Block a user