29include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
47 $this->numero = 39000;
49 $this->family =
"products";
50 $this->module_position =
'45';
52 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
53 $this->
description =
"Batch number, eat-by and sell-by date management module";
55 $this->rights_class =
'productbatch';
57 $this->version =
'dolibarr';
59 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
63 $this->module_parts = array();
66 $this->dirs = array();
69 $this->config_page_url = array(
"product_lot.php@product");
72 $this->hidden =
false;
73 $this->depends = array(
"modProduct",
"modStock",
"modExpedition",
"modFournisseur");
74 $this->requiredby = array();
75 $this->conflictwith = array();
76 $this->phpmin = array(7, 0);
77 $this->need_dolibarr_version = array(3, 0);
78 $this->langfiles = array(
"productbatch");
82 $this->
const = array();
85 $this->
const[$r][0] =
"PRODUCTBATCH_LOT_ADDON";
86 $this->
const[$r][1] =
"chaine";
87 $this->
const[$r][2] =
"mod_lot_free";
88 $this->
const[$r][3] =
'Module to control lot number';
89 $this->
const[$r][4] = 0;
92 $this->
const[$r][0] =
"PRODUCTBATCH_SN_ADDON";
93 $this->
const[$r][1] =
"chaine";
94 $this->
const[$r][2] =
"mod_sn_free";
95 $this->
const[$r][3] =
'Module to control serial number';
96 $this->
const[$r][4] = 0;
99 $this->tabs = array();
102 if (!isset($conf->productbatch->enabled)) {
103 $conf->productbatch =
new stdClass();
104 $conf->productbatch->enabled = 0;
106 $this->dictionaries = array();
109 $this->boxes = array();
112 $this->rights = array();
133 public function init($options =
'')
139 if (!empty($conf->cashdesk->enabled)) {
141 include_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
142 $res =
dolibarr_set_const($db,
"CASHDESK_NO_DECREASE_STOCK", 1,
'chaine', 0,
'', $conf->entity);
146 return $this->
_init($sql, $options);
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
_init($array_sql, $options='')
Enables a module.
Description and activation class for module productdluo.
__construct($db)
Constructor.
init($options='')
Function called when module is enabled.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
$conf db name
Only used if Module[ID]Name translation string is not found.