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 assets module and depreciation charge on Dolibarr";
 
   66    $this->version = 
'development';
 
   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 360 days",
 
  117    if (!isset($conf->asset) || !isset($conf->asset->enabled)) {
 
  119      $conf->asset->enabled = 0;
 
  124    $this->tabs = array();
 
  153    $this->dictionaries = array();
 
  158    $this->boxes = array(
 
  176    $this->rights = array(); 
 
  177    $this->rights_class = 
'asset';
 
  181    $this->rights[$r][0] = 51001; 
 
  182    $this->rights[$r][1] = 
'Read assets'; 
 
  183    $this->rights[$r][2] = 
'r';
 
  184    $this->rights[$r][3] = 0; 
 
  185    $this->rights[$r][4] = 
'read'; 
 
  186    $this->rights[$r][5] = 
''; 
 
  189    $this->rights[$r][0] = 51002; 
 
  190    $this->rights[$r][1] = 
'Create/Update assets'; 
 
  191    $this->rights[$r][2] = 
'w';
 
  192    $this->rights[$r][3] = 0; 
 
  193    $this->rights[$r][4] = 
'write'; 
 
  194    $this->rights[$r][5] = 
''; 
 
  197    $this->rights[$r][0] = 51003; 
 
  198    $this->rights[$r][1] = 
'Delete assets'; 
 
  199    $this->rights[$r][2] = 
'd';
 
  200    $this->rights[$r][3] = 0; 
 
  201    $this->rights[$r][4] = 
'delete'; 
 
  202    $this->rights[$r][5] = 
''; 
 
  205    $this->rights[$r][0] = 51004; 
 
  206    $this->rights[$r][1] = 
'Read asset models'; 
 
  207    $this->rights[$r][2] = 
'r';
 
  208    $this->rights[$r][3] = 0; 
 
  209    $this->rights[$r][4] = 
'model_advance'; 
 
  210    $this->rights[$r][5] = 
'read'; 
 
  213    $this->rights[$r][0] = 51005; 
 
  214    $this->rights[$r][1] = 
'Create/Update asset models'; 
 
  215    $this->rights[$r][2] = 
'w';
 
  216    $this->rights[$r][3] = 0; 
 
  217    $this->rights[$r][4] = 
'model_advance'; 
 
  218    $this->rights[$r][5] = 
'write'; 
 
  221    $this->rights[$r][0] = 51006; 
 
  222    $this->rights[$r][1] = 
'Delete asset models'; 
 
  223    $this->rights[$r][2] = 
'd';
 
  224    $this->rights[$r][3] = 0; 
 
  225    $this->rights[$r][4] = 
'model_advance'; 
 
  226    $this->rights[$r][5] = 
'delete';