27 include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
48 $this->numero = 50150;
50 $this->rights_class =
'takepos';
54 $this->family =
"portal";
56 $this->module_position =
'60';
61 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
63 $this->
description =
"Point of sales module (Touch Screen POS)";
65 $this->descriptionlong =
"Point Of Sales (compliant with touch screen)";
68 $this->version =
'dolibarr';
70 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
74 $this->picto =
'cash-register';
80 $this->module_parts = array(
94 $this->dirs = array();
97 $this->config_page_url = array(
"setup.php@takepos");
100 $this->hidden =
false;
101 $this->depends = array(
'always1'=>
"modBanque",
'always2'=>
"modFacture",
'always3'=>
"modProduct",
'always4'=>
'modCategorie',
'FR1'=>
'modBlockedLog');
102 $this->requiredby = array();
103 $this->conflictwith = array();
104 $this->langfiles = array(
"cashdesk");
105 $this->phpmin = array(7, 0);
106 $this->need_dolibarr_version = array(4, 0);
107 $this->warnings_activation = array(
'FR'=>
'WarningNoteModulePOSForFrenchLaw');
108 $this->warnings_activation_ext = array();
117 $this->
const = array(
122 if (!isset($conf->takepos) || !isset($conf->takepos->enabled)) {
123 $conf->takepos =
new stdClass();
124 $conf->takepos->enabled = 0;
129 $this->tabs = array();
158 $this->dictionaries = array();
163 $this->boxes = array(
172 $this->cronjobs = array(
181 $this->rights = array();
186 $this->rights[$r][0] = 50151;
187 $this->rights[$r][1] =
'Use Point Of Sale (record a sale, add products, record payment)';
188 $this->rights[$r][2] =
'a';
189 $this->rights[$r][3] = 0;
190 $this->rights[$r][4] =
'run';
193 $this->rights[$r][0] = 50152;
194 $this->rights[$r][1] =
'Can modify added sales lines (prices, discount)';
195 $this->rights[$r][2] =
'a';
196 $this->rights[$r][3] = 0;
197 $this->rights[$r][4] =
'editlines';
200 $this->rights[$r][0] = 50153;
201 $this->rights[$r][1] =
'Edit ordered sales lines (useful only when option "Order printers" has been enabled). Allow to edit sales lines even after the order has been printed';
202 $this->rights[$r][2] =
'a';
203 $this->rights[$r][3] = 0;
204 $this->rights[$r][4] =
'editorderedlines';
208 $this->menu = array();
214 $this->menu[$r++] = array(
'fk_menu'=>
'',
216 'titre'=>
'PointOfSaleShort',
217 'mainmenu'=>
'takepos',
219 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
220 'url'=>
'/takepos/index.php',
222 'position'=>1000 + $r,
223 'enabled'=>
'$conf->takepos->enabled',
224 'perms'=>
'$user->rights->takepos->run',
266 public function init($options =
'')
270 dolibarr_set_const($db,
"TAKEPOS_PRINT_METHOD",
"browser",
'chaine', 0,
'', $conf->entity);
275 $this->
remove($options);
277 return $this->
_init($sql, $options);
288 public function remove($options =
'')
292 return $this->
_remove($sql, $options);
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
_init($array_sql, $options='')
Enables a module.
_remove($array_sql, $options='')
Disable function.
Class to describe and enable module TakePos.
init($options='')
Function called when module is enabled.
__construct($db)
Constructor.
print *****$script_file(".$version.") pid cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
$conf db name
Only used if Module[ID]Name translation string is not found.
$conf db
API class for accounts.