25 include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
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(5, 4);
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 'mainmenu'=>
'billing',
111 'leftmenu'=>
'margins',
112 'url'=>
'/margin/index.php',
115 'enabled'=>
'$conf->margin->enabled',
116 'perms'=>
'$user->rights->margins->liretous',
122 $this->rights = array();
126 $this->rights[$r][0] = 59001;
127 $this->rights[$r][1] =
'Visualiser les marges';
128 $this->rights[$r][2] =
'r';
129 $this->rights[$r][3] = 0;
130 $this->rights[$r][4] =
'liretous';
133 $this->rights[$r][0] = 59002;
134 $this->rights[$r][1] =
'Définir les marges';
135 $this->rights[$r][2] =
'w';
136 $this->rights[$r][3] = 0;
137 $this->rights[$r][4] =
'creer';
140 $this->rights[$r][0] = 59003;
141 $this->rights[$r][1] =
'Read every user margin';
142 $this->rights[$r][2] =
'r';
143 $this->rights[$r][3] = 0;
144 $this->rights[$r][4] =
'read';
145 $this->rights[$r][5] =
'all';
</td > param sortfield sortorder printFieldListOption< tdclass="liste_titremaxwidthsearchright"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration center DesiredStock p desiredstock right StockLimitShort p seuil_stock_alerte right stock_physique right stock_real_warehouse right Ordered right StockToBuy right SupplierRef right param sortfield sortorder printFieldListTitle warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow StockTooLow help help help< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"> stock</td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Class to describe module Margin.
$conf db name
Only used if Module[ID]Name translation string is not found.
$conf db
API class for accounts.
__construct($db)
Constructor.