44 $this->numero = 59000;
46 $this->rights_class =
'margins';
50 $this->family =
"financial";
51 $this->module_position =
'55';
53 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
57 $this->version =
'dolibarr';
59 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
62 $this->picto =
'margin';
65 $this->dirs = array(
'/margin/temp');
68 $this->config_page_url = array(
"margin.php@margin");
71 $this->hidden =
false;
72 $this->depends = array(
"modPropale",
"modProduct");
73 $this->requiredby = array();
74 $this->conflictwith = array();
75 $this->phpmin = array(7, 0);
76 $this->need_dolibarr_version = array(3, 2);
77 $this->langfiles = array(
"margins");
84 $this->
const = array(0=>array(
'MARGIN_TYPE',
'chaine',
'costprice',
'Rule for margin calculation by default', 0,
'current', 0));
88 'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__',
89 'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__'
94 $this->boxes = array();
98 $this->rights = array();
102 $this->menu = array();
106 $this->menu[$r] = array(
107 'fk_menu'=>
'fk_mainmenu=billing',
110 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
111 'mainmenu'=>
'billing',
112 'leftmenu'=>
'margins',
113 'url'=>
'/margin/index.php',
116 'enabled'=>
'isModEnabled("margin")',
117 'perms'=>
'$user->rights->margins->liretous',
124 $this->rights = array();
128 $this->rights[$r][0] = 59001;
129 $this->rights[$r][1] =
'Visualiser les marges';
130 $this->rights[$r][2] =
'r';
131 $this->rights[$r][3] = 0;
132 $this->rights[$r][4] =
'liretous';
135 $this->rights[$r][0] = 59002;
136 $this->rights[$r][1] =
'Définir les marges';
137 $this->rights[$r][2] =
'w';
138 $this->rights[$r][3] = 0;
139 $this->rights[$r][4] =
'creer';
142 $this->rights[$r][0] = 59003;
143 $this->rights[$r][1] =
'Read every user margin';
144 $this->rights[$r][2] =
'r';
145 $this->rights[$r][3] = 0;
146 $this->rights[$r][4] =
'read';
147 $this->rights[$r][5] =
'all';