diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index bda82a25a59..e094a507fcb 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -50,13 +50,14 @@ else if ($_POST["action"] == 'setgenbarcodelocation') Header("Location: barcode.php"); exit; } +/* else if ($_POST["action"] == 'setproductusebarcode') { dolibarr_set_const($db, "PRODUIT_USE_BARCODE",$_POST["value"]); Header("Location: barcode.php"); exit; } - +*/ $html = new Form($db); @@ -212,6 +213,7 @@ if (!isset($_ENV['windir']) && !file_exists($_ENV['windir'])) } // Module produits +/* if ($conf->produit->enabled) { $var=!$var; @@ -226,8 +228,10 @@ if ($conf->produit->enabled) print ''; print ''; } +*/ print ''; + /* //EAN13 $var=!$var; diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index aedcf8c193e..90062ebbd57 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -277,7 +277,7 @@ print ''; print ''; // Barcode -if ($conf->barcode->enabled && $conf->global->PRODUIT_USE_BARCODE) +if ($conf->global->MAIN_MODULE_BARCODE) { $var=!$var; print "
"; diff --git a/htdocs/includes/modules/modBarcode.class.php b/htdocs/includes/modules/modBarcode.class.php index 7bc57728855..360e9267c8a 100644 --- a/htdocs/includes/modules/modBarcode.class.php +++ b/htdocs/includes/modules/modBarcode.class.php @@ -52,7 +52,7 @@ class modBarcode extends DolibarrModules $this->family = "other"; $this->name = "Codes barres"; $this->description = "Gestion des codes barres"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_BARCODE'; $this->special = 2; $this->picto='barcode'; diff --git a/htdocs/lib/product.lib.php b/htdocs/lib/product.lib.php index c9f82ee1974..a78edc4a55b 100644 --- a/htdocs/lib/product.lib.php +++ b/htdocs/lib/product.lib.php @@ -55,7 +55,7 @@ function product_prepare_head($product, $user) } // Affichage onglet code barre - if ($product->isproduct() && $conf->barcode->enabled && $user->rights->barcode->lire && $conf->global->PRODUIT_USE_BARCODE) + if ($conf->global->MAIN_MODULE_BARCODE && $product->isproduct() && $user->rights->barcode->lire) { $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; $head[$h][1] = $langs->trans("BarCode"); diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 4886f2cff05..8c18949f0d1 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -959,7 +959,7 @@ class Product extends CommonObject if ($conf->global->MAIN_MULTILANGS) $this->getMultiLangs(); // Barcode - if ($conf->barcode->enabled && $conf->global->PRODUIT_USE_BARCODE) + if ($conf->global->MAIN_MODULE_BARCODE) { if ($this->barcode_type == 0) { diff --git a/mysql/migration/2.4.0-2.5.0.sql b/mysql/migration/2.4.0-2.5.0.sql index 0f6b70d0f23..cd9b3f7ecb5 100644 --- a/mysql/migration/2.4.0-2.5.0.sql +++ b/mysql/migration/2.4.0-2.5.0.sql @@ -11,6 +11,6 @@ alter table llx_product add column price_min_ttc double(24,8) DEFAULT 0; alter table llx_product_price add column price_min double(24,8) default NULL; alter table llx_product_price add column price_min_ttc double(24,8) default NULL; - +alter table llx_societe add column gencod varchar(255); diff --git a/mysql/tables/llx_societe.sql b/mysql/tables/llx_societe.sql index 23417cdb07d..e8235a7d67e 100644 --- a/mysql/tables/llx_societe.sql +++ b/mysql/tables/llx_societe.sql @@ -68,5 +68,6 @@ create table llx_societe remise_client real DEFAULT 0, -- remise systématique pour le client mode_reglement tinyint, -- mode de réglement cond_reglement tinyint, -- condition de réglement - tva_assuj tinyint DEFAULT 1 -- assujéti ou non à la TVA + tva_assuj tinyint DEFAULT 1, -- assujeti ou non à la TVA + gencod varchar(255) -- )type=innodb;