46 $this->numero = 59000;
48 $this->rights_class =
'margins';
52 $this->family =
"financial";
53 $this->module_position =
'55';
55 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
59 $this->version =
'dolibarr';
61 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
64 $this->picto =
'margin';
67 $this->dirs = array(
'/margin/temp');
70 $this->config_page_url = array(
"margin.php@margin");
73 $this->hidden =
false;
74 $this->depends = array(
"modPropale",
"modProduct");
75 $this->requiredby = array();
76 $this->conflictwith = array();
77 $this->phpmin = array(7, 0);
78 $this->need_dolibarr_version = array(3, 2);
79 $this->langfiles = array(
"margins");
86 $this->
const = array(0 => array(
'MARGIN_TYPE',
'chaine',
'costprice',
'Rule for margin calculation by default', 0,
'current', 0));
90 'product:+margin:Margins:margins:$user->hasRight("margins","liretous"):/margin/tabs/productMargins.php?id=__ID__',
91 'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->hasRight("margins","liretous") && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__'
96 $this->boxes = array();
100 $this->rights = array();
104 $this->menu = array();
108 $this->menu[$r] = array(
109 'fk_menu' =>
'fk_mainmenu=billing',
111 'titre' =>
'Margins',
112 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
113 'mainmenu' =>
'billing',
114 'leftmenu' =>
'margins',
115 'url' =>
'/margin/index.php',
116 'langs' =>
'margins',
118 'enabled' =>
'isModEnabled("margin")',
119 'perms' =>
'$user->hasRight("margins", "liretous")',
126 $this->rights = array();
130 $this->rights[$r][0] = 59001;
131 $this->rights[$r][1] =
'Visualiser les marges';
132 $this->rights[$r][2] =
'r';
133 $this->rights[$r][3] = 0;
134 $this->rights[$r][4] =
'liretous';
137 $this->rights[$r][0] = 59002;
138 $this->rights[$r][1] =
'Définir les marges';
139 $this->rights[$r][2] =
'w';
140 $this->rights[$r][3] = 0;
141 $this->rights[$r][4] =
'creer';
144 $this->rights[$r][0] = 59003;
145 $this->rights[$r][1] =
'Read every user margin';
146 $this->rights[$r][2] =
'r';
147 $this->rights[$r][3] = 0;
148 $this->rights[$r][4] =
'read';
149 $this->rights[$r][5] =
'all';