48 $this->numero = 51000;
52 $this->family =
"financial";
54 $this->module_position =
'70';
59 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
63 $this->descriptionlong =
"Asset module to manage fixed asset module and depreciation charge";
66 $this->version =
'experimental';
68 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
72 $this->picto =
'asset';
78 $this->module_parts = array();
82 $this->dirs = array(
"/asset/temp");
85 $this->config_page_url = array(
"setup.php@asset");
88 $this->hidden =
false;
89 $this->depends = array();
90 $this->requiredby = array();
91 $this->conflictwith = array();
92 $this->langfiles = array(
"assets");
93 $this->phpmin = array(7, 0);
94 $this->need_dolibarr_version = array(7, 0);
95 $this->warnings_activation = array();
96 $this->warnings_activation_ext = array();
105 $this->
const = array();
106 $this->
const[1] = array(
107 "ASSET_DEPRECIATION_DURATION_PER_YEAR",
110 "Duration per year to calculate depreciation. In some case, can be 365 days",
116 $this->
const[2] = array(
119 "mod_asset_standard",
120 "Name of numbering rules for fixed asset",
127 if (!isModEnabled(
'asset')) {
129 $conf->asset->enabled = 0;
134 $this->tabs = array();
163 $this->dictionaries = array();
168 $this->boxes = array(
186 $this->rights = array();
187 $this->rights_class =
'asset';
191 $this->rights[$r][0] = 51001;
192 $this->rights[$r][1] =
'Read assets';
193 $this->rights[$r][2] =
'r';
194 $this->rights[$r][3] = 0;
195 $this->rights[$r][4] =
'read';
196 $this->rights[$r][5] =
'';
199 $this->rights[$r][0] = 51002;
200 $this->rights[$r][1] =
'Create/Update assets';
201 $this->rights[$r][2] =
'w';
202 $this->rights[$r][3] = 0;
203 $this->rights[$r][4] =
'write';
204 $this->rights[$r][5] =
'';
207 $this->rights[$r][0] = 51003;
208 $this->rights[$r][1] =
'Delete assets';
209 $this->rights[$r][2] =
'd';
210 $this->rights[$r][3] = 0;
211 $this->rights[$r][4] =
'delete';
212 $this->rights[$r][5] =
'';
215 $this->rights[$r][0] = 51004;
216 $this->rights[$r][1] =
'Read asset models';
217 $this->rights[$r][2] =
'r';
218 $this->rights[$r][3] = 0;
219 $this->rights[$r][4] =
'model_advance';
220 $this->rights[$r][5] =
'read';
223 $this->rights[$r][0] = 51005;
224 $this->rights[$r][1] =
'Create/Update asset models';
225 $this->rights[$r][2] =
'w';
226 $this->rights[$r][3] = 0;
227 $this->rights[$r][4] =
'model_advance';
228 $this->rights[$r][5] =
'write';
231 $this->rights[$r][0] = 51006;
232 $this->rights[$r][1] =
'Delete asset models';
233 $this->rights[$r][2] =
'd';
234 $this->rights[$r][3] = 0;
235 $this->rights[$r][4] =
'model_advance';
236 $this->rights[$r][5] =
'delete';