Add patch from patrick raguin to support barcode on third parties
This commit is contained in:
parent
2bbfa2a5a1
commit
2819aa1ed2
@ -50,13 +50,14 @@ else if ($_POST["action"] == 'setgenbarcodelocation')
|
|||||||
Header("Location: barcode.php");
|
Header("Location: barcode.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
else if ($_POST["action"] == 'setproductusebarcode')
|
else if ($_POST["action"] == 'setproductusebarcode')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "PRODUIT_USE_BARCODE",$_POST["value"]);
|
dolibarr_set_const($db, "PRODUIT_USE_BARCODE",$_POST["value"]);
|
||||||
Header("Location: barcode.php");
|
Header("Location: barcode.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
@ -212,6 +213,7 @@ if (!isset($_ENV['windir']) && !file_exists($_ENV['windir']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Module produits
|
// Module produits
|
||||||
|
/*
|
||||||
if ($conf->produit->enabled)
|
if ($conf->produit->enabled)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -226,8 +228,10 @@ if ($conf->produit->enabled)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//EAN13
|
//EAN13
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -277,7 +277,7 @@ print '</tr>';
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if ($conf->barcode->enabled && $conf->global->PRODUIT_USE_BARCODE)
|
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<form method=\"post\" action=\"produit.php\">";
|
print "<form method=\"post\" action=\"produit.php\">";
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class modBarcode extends DolibarrModules
|
|||||||
$this->family = "other";
|
$this->family = "other";
|
||||||
$this->name = "Codes barres";
|
$this->name = "Codes barres";
|
||||||
$this->description = "Gestion des 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->const_name = 'MAIN_MODULE_BARCODE';
|
||||||
$this->special = 2;
|
$this->special = 2;
|
||||||
$this->picto='barcode';
|
$this->picto='barcode';
|
||||||
|
|||||||
@ -55,7 +55,7 @@ function product_prepare_head($product, $user)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affichage onglet code barre
|
// 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][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id;
|
||||||
$head[$h][1] = $langs->trans("BarCode");
|
$head[$h][1] = $langs->trans("BarCode");
|
||||||
|
|||||||
@ -959,7 +959,7 @@ class Product extends CommonObject
|
|||||||
if ($conf->global->MAIN_MULTILANGS) $this->getMultiLangs();
|
if ($conf->global->MAIN_MULTILANGS) $this->getMultiLangs();
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if ($conf->barcode->enabled && $conf->global->PRODUIT_USE_BARCODE)
|
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||||
{
|
{
|
||||||
if ($this->barcode_type == 0)
|
if ($this->barcode_type == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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 double(24,8) default NULL;
|
||||||
alter table llx_product_price add column price_min_ttc 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);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -68,5 +68,6 @@ create table llx_societe
|
|||||||
remise_client real DEFAULT 0, -- remise systématique pour le client
|
remise_client real DEFAULT 0, -- remise systématique pour le client
|
||||||
mode_reglement tinyint, -- mode de réglement
|
mode_reglement tinyint, -- mode de réglement
|
||||||
cond_reglement tinyint, -- condition 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;
|
)type=innodb;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user