Add patch from patrick raguin to support barcode on third parties

This commit is contained in:
Laurent Destailleur 2008-08-28 00:07:52 +00:00
parent 2bbfa2a5a1
commit 2819aa1ed2
7 changed files with 12 additions and 7 deletions

View File

@ -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 '</tr>';
print '</form>';
}
*/
print '</table>';
/*
//EAN13
$var=!$var;

View File

@ -277,7 +277,7 @@ print '</tr>';
print '</form>';
// Barcode
if ($conf->barcode->enabled && $conf->global->PRODUIT_USE_BARCODE)
if ($conf->global->MAIN_MODULE_BARCODE)
{
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";

View File

@ -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';

View File

@ -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");

View File

@ -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)
{

View File

@ -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);

View File

@ -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;