45 $this->numero = 59000;
47 $this->rights_class =
'margins';
51 $this->family =
"financial";
52 $this->module_position =
'55';
54 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
58 $this->version =
'dolibarr';
60 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
63 $this->picto =
'margin';
66 $this->dirs = array(
'/margin/temp');
69 $this->config_page_url = array(
"margin.php@margin");
72 $this->hidden =
false;
73 $this->depends = array(
"modPropale",
"modProduct");
74 $this->requiredby = array();
75 $this->conflictwith = array();
76 $this->phpmin = array(7, 0);
77 $this->need_dolibarr_version = array(3, 2);
78 $this->langfiles = array(
"margins");
85 $this->
const = array(0 => array(
'MARGIN_TYPE',
'chaine',
'costprice',
'Rule for margin calculation by default', 0,
'current', 0));
89 'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__',
90 'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__'
95 $this->boxes = array();
99 $this->rights = array();
103 $this->menu = array();
107 $this->menu[$r] = array(
108 'fk_menu' =>
'fk_mainmenu=billing',
110 'titre' =>
'Margins',
111 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
112 'mainmenu' =>
'billing',
113 'leftmenu' =>
'margins',
114 'url' =>
'/margin/index.php',
115 'langs' =>
'margins',
117 'enabled' =>
'isModEnabled("margin")',
118 'perms' =>
'$user->rights->margins->liretous',
125 $this->rights = array();
129 $this->rights[$r][0] = 59001;
130 $this->rights[$r][1] =
'Visualiser les marges';
131 $this->rights[$r][2] =
'r';
132 $this->rights[$r][3] = 0;
133 $this->rights[$r][4] =
'liretous';
136 $this->rights[$r][0] = 59002;
137 $this->rights[$r][1] =
'Définir les marges';
138 $this->rights[$r][2] =
'w';
139 $this->rights[$r][3] = 0;
140 $this->rights[$r][4] =
'creer';
143 $this->rights[$r][0] = 59003;
144 $this->rights[$r][1] =
'Read every user margin';
145 $this->rights[$r][2] =
'r';
146 $this->rights[$r][3] = 0;
147 $this->rights[$r][4] =
'read';
148 $this->rights[$r][5] =
'all';