dolibarr 23.0.3
setup.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
4 * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
5 * Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
29// Load Dolibarr environment
30require '../../main.inc.php'; // Load $user and permissions
38require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
39require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
40require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
41require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
42require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
43require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
44
45// If socid provided by ajax company selector
46if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
47 $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
48 $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
49 $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
50}
51
52// Security check
53if (!$user->admin) {
55}
56
57$langs->loadLangs(array("admin", "cashdesk"));
58
59global $db, $mysoc;
60
61$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
62$sql .= " WHERE entity IN (".getEntity('c_paiement').")";
63$sql .= " AND active = 1";
64$sql .= " ORDER BY libelle";
65$resql = $db->query($sql);
66$paiements = array();
67if ($resql) {
68 while ($obj = $db->fetch_object($resql)) {
69 array_push($paiements, $obj);
70 }
71}
72
73$action = GETPOST('action', 'aZ09');
74
75
76/*
77 * Actions
78 */
79
80$error = 0;
81
82if ($action == 'set') {
83 $db->begin();
84
85 $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
86 $res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
87 $res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
88 $res = dolibarr_set_const($db, "TAKEPOS_SORTPRODUCTFIELD", GETPOST('TAKEPOS_SORTPRODUCTFIELD', 'alpha'), 'chaine', 0, '', $conf->entity);
89 $res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity);
90 $res = dolibarr_set_const($db, "TAKEPOS_ADDON", GETPOST('TAKEPOS_ADDON', 'alpha'), 'int', 0, '', $conf->entity);
91 $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity);
92 if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) {
93 $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
94 $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
95 }
96 if (isModEnabled('barcode')) {
97 $res = dolibarr_set_const($db, 'TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT', GETPOST('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT', 'alpha'), 'chaine', 0, '', $conf->entity);
98 }
99
100 dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
101
102 if (!($res > 0)) {
103 $error++;
104 }
105
106 if (!$error) {
107 $db->commit();
108 } else {
109 $db->rollback();
110 }
111} elseif ($action == 'updateMask') {
112 $maskconst = GETPOST('maskconst', 'aZ09');
113 $maskvalue = GETPOST('maskvalue', 'alpha');
114 if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
115 $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
116 }
117 if (!($res > 0)) {
118 $error++;
119 }
120} elseif ($action == 'setrefmod') {
121 $value = GETPOST('value', 'alpha');
122 dolibarr_set_const($db, "TAKEPOS_REF_ADDON", $value, 'chaine', 0, '', $conf->entity);
123}
124
125if ($action != '') {
126 if (!$error) {
127 setEventMessage($langs->trans('SetupSaved'));
128 } else {
129 setEventMessages($langs->trans('Error'), null, 'errors');
130 }
131}
132
133
134/*
135 * View
136 */
137
138$form = new Form($db);
139
140$help_url = 'EN:Module_Point_of_sale_(TakePOS)';
141
142llxHeader('', $langs->trans("CashDeskSetup"), $help_url, '', 0, 0, '', '', '', 'mod-takepos page-admin_setup');
143
144$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
145
146print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
147
148
149if (in_array($mysoc->country_code, array('FR'))) {
150 $htmltext = $langs->trans("CashRegisterAlertFR", $langs->transnoentitiesnoconv("Bank"), $langs->transnoentitiesnoconv("CashControl")).' ';
151 $htmltext .= $langs->trans("CashRegisterAlertFR2").'<br>';
152 print info_admin($htmltext, 0, 0, 'warning');
153}
154
155
157print dol_get_fiche_head($head, 'setup', 'TakePOS', -1, 'cash-register');
158
159// Numbering modules
160$now = dol_now();
161$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
162
163print load_fiche_titre($langs->trans('CashDeskRefNumberingModules'), '', '');
164
165print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
166print '<table class="noborder centpercent">';
167print '<tr class="liste_titre">';
168print '<td>'.$langs->trans("Name")."</td>\n";
169print '<td>'.$langs->trans("Description")."</td>\n";
170print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
171print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
172print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
173print '</tr>'."\n";
174
175clearstatcache();
176
177foreach ($dirmodels as $reldir) {
178 $dir = dol_buildpath($reldir."core/modules/takepos/");
179
180 if (is_dir($dir)) {
181 $handle = opendir($dir);
182 if (is_resource($handle)) {
183 while (($file = readdir($handle)) !== false) {
184 if (substr($file, 0, 16) == 'mod_takepos_ref_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
185 $file = substr($file, 0, dol_strlen($file) - 4);
186
187 require_once $dir.$file.'.php';
188
189 $module = new $file();
190 '@phan-var-force ModeleNumRefTakepos $module';
191
192 // Show modules according to features level
193 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
194 continue;
195 }
196 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
197 continue;
198 }
199
200 if ($module->isEnabled()) {
201 print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
202 print $module->info($langs);
203 print '</td>';
204
205 // Show example of numbering module
206 print '<td class="nowrap">';
207 $tmp = $module->getExample();
208 if (preg_match('/^Error/', $tmp)) {
209 $langs->load("errors");
210 print '<div class="error">'.$langs->trans($tmp).'</div>';
211 } elseif ($tmp == 'NotConfigured') {
212 print $langs->trans($tmp);
213 } else {
214 print $tmp;
215 }
216 print '</td>'."\n";
217
218 print '<td class="center">';
219 if (getDolGlobalString('TAKEPOS_REF_ADDON', 'mod_takepos_ref_simple') == $file) {
220 print img_picto($langs->trans("Activated"), 'switch_on');
221 } else {
222 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setrefmod&token='.newToken().'&value='.urlencode($file).'">';
223 print img_picto($langs->trans("Disabled"), 'switch_off');
224 print '</a>';
225 }
226 print '</td>';
227
228 // example for next value
229 $invoice = new Facture($db);
230 $invoice->date = $now;
231 $invoice->module_source = 'takepos';
232 $invoice->pos_source = '1';
233
234 // Info
235 $htmltooltip = '';
236 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
237 $nextval = $module->getNextValue($mysoc, $invoice);
238 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
239 $htmltooltip .= ''.$langs->trans("NextValue").': ';
240 if ($nextval) {
241 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
242 $nextval = $langs->trans($nextval);
243 }
244 $htmltooltip .= $nextval.'<br>';
245 } else {
246 $htmltooltip .= $langs->trans($module->error).'<br>';
247 }
248 }
249
250 print '<td align="center">';
251 print $form->textwithpicto('', $htmltooltip, 1, 'info');
252 print '</td>';
253
254 print "</tr>\n";
255 }
256 }
257 }
258 closedir($handle);
259 }
260 }
261}
262print "</table>\n";
263print '</div>';
264print "\n";
265
266print '<br>';
267
268
269print load_fiche_titre($langs->trans('Options'), '', '');
270
271// Mode
272print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
273print '<input type="hidden" name="token" value="'.newToken().'">';
274print '<input type="hidden" name="action" value="set">';
275
276print '<div class="div-table-responsive-no-min">';
277print '<table class="noborder centpercent">';
278
279print '<tr class="liste_titre">';
280print '<td class="notitlefield">'.$langs->trans("Parameters").'</td><td></td>';
281print "</tr>\n";
282
283// Terminals
284print '<tr class="oddeven"><td>';
285print $langs->trans("NumberOfTerminals");
286print '<td>';
287print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" class="width50" value="' . getDolGlobalString('TAKEPOS_NUM_TERMINALS', '1') . '">';
288print "</td></tr>\n";
289
290// Services
291if (isModEnabled("service")) {
292 print '<tr class="oddeven"><td>';
293 print $langs->trans("CashdeskShowServices");
294 print '<td>';
295 print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0);
296 //print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
297 print "</td></tr>\n";
298}
299
300// Root category for products
301print '<tr class="oddeven"><td>';
302print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
303print '<td>';
304//print $form->selectCategories(Categorie::TYPE_PRODUCT, 'TAKEPOS_ROOT_CATEGORY_ID', null);
305print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID'), 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0, 0, 'maxwidth500 widthcentpercentminusx');
306print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
307print "</td></tr>\n";
308
309// Sort product
310print '<tr class="oddeven"><td>';
311print $langs->trans("SortProductField");
312print '<td>';
313$array = array('rowid' => 'ID', 'ref' => 'Ref', 'label' => 'Label', 'datec' => 'DateCreation', 'tms' => 'DateModification');
314print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD', 'rowid'), 0, 0, 0, '', 1);
315print "</td></tr>\n";
316
317print '<tr class="oddeven"><td>';
318print $langs->trans('TakeposGroupSameProduct');
319print '<td>';
320print ajax_constantonoff("TAKEPOS_GROUP_SAME_PRODUCT", array(), $conf->entity, 0, 0, 1, 0);
321print "</td></tr>\n";
322
323$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
324$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
325$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
326foreach ($substitutionarray as $key => $val) {
327 $htmltext .= $key.'<br>';
328}
329$htmltext .= '</i>';
330
331// Payment numpad
332print '<tr class="oddeven"><td>';
333print $langs->trans("Paymentnumpad");
334print '<td>';
335$array = array(0 => $langs->trans("Numberspad"), 1 => $langs->trans("BillsCoinsPad"));
336print $form->selectarray('TAKEPOS_NUMPAD', $array, (!getDolGlobalString('TAKEPOS_NUMPAD') ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
337print "</td></tr>\n";
338
339// Numpad use payment icons
340/*print '<tr class="oddeven"><td>';
341print $langs->trans('TakeposNumpadUsePaymentIcon');
342print '<td colspan="2">';
343print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0);
344print "</td></tr>\n";
345*/
346
347// Direct Payment
348print '<tr class="oddeven"><td>';
349print $langs->trans('DirectPaymentButton');
350print '<td>';
351print ajax_constantonoff("TAKEPOS_DIRECT_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
352//print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
353print "</td></tr>\n";
354
355// Head Bar
356/*print '<tr class="oddeven"><td>';
357print $langs->trans('HeadBar');
358print '<td colspan="2">';
359print $form->selectyesno("TAKEPOS_HEAD_BAR", $conf->global->TAKEPOS_HEAD_BAR, 1);
360print "</td></tr>\n";
361*/
362
363// Email template for send invoice
364print '<tr class="oddeven"><td>';
365print $langs->trans('EmailTemplate');
366print '<td>';
367include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
368$formmail = new FormMail($db);
369$formmail->fetchAllEMailTemplate('facture_send', $user, null, -1); // We set lang=null to get in priority record with no lang
370$arrayofmessagename = array();
371if (is_array($formmail->lines_model)) {
372 foreach ($formmail->lines_model as $modelmail) {
373 //var_dump($modelmail);
374 $moreonlabel = '';
375 if (!empty($arrayofmessagename[$modelmail->label])) {
376 $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
377 }
378 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\‍(|\‍)/', '', $modelmail->topic)).$moreonlabel;
379 }
380}
381//var_dump($arraydefaultmessage);
382//var_dump($arrayofmessagename);
383print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, getDolGlobalString('TAKEPOS_EMAIL_TEMPLATE_INVOICE'), 'None', 1, 0, '', 0, 0, 0, '', 'maxwidth500 widthcentpercentminusx', 1);
384print "</td></tr>\n";
385
386// Control cash box at opening pos
387print '<tr class="oddeven"><td>';
388print $langs->trans('ControlCashOpening');
389print '<td>';
390print ajax_constantonoff("TAKEPOS_CONTROL_CASH_OPENING", array(), $conf->entity, 0, 0, 1, 0);
391print "</td></tr>\n";
392
393// Delayed Pay Button
394print '<tr class="oddeven"><td>';
395print $langs->trans('AllowDelayedPayment');
396print '<td>';
397print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
398print "</td></tr>\n";
399
400// Show price without vat
401print '<tr class="oddeven"><td>';
402print $langs->trans('ShowPriceHT');
403print '<td>';
404print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0);
405print "</td></tr>\n";
406
407// Use price excl. taxes (HT) and not price incl. taxes (TTC)
408print '<tr class="oddeven"><td>';
409print $langs->trans('UsePriceHT');
410print '</td><td>';
411print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0);
412print "</td></tr>\n";
413
414// Barcode rule to insert product
415if (isModEnabled('barcode')) {
416 print '<tr class="oddeven"><td>';
417 print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"), 1, 'help', '', 0, 3, 'barcoderuleonsmartphone');
418 print '<td>';
419 print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="' . (getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')) . '">';
420 print "</td></tr>\n";
421}
422
423// Numbering module
424//print '<tr class="oddeven"><td>';
425//print $langs->trans("BillsNumberingModule");
426//print '<td colspan="2">';
427//$array = array(0=>$langs->trans("Default"), "terminal"=>$langs->trans("ByTerminal"));
428//$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
429//foreach ($dirmodels as $reldir)
430//{
431// $dir = dol_buildpath($reldir."core/modules/facture/");
432// if (is_dir($dir))
433// {
434// $handle = opendir($dir);
435// if (is_resource($handle))
436// {
437// while (($file = readdir($handle)) !== false)
438// {
439// if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
440// {
441// $filebis = $file;
442// $classname = preg_replace('/\.php$/', '', $file);
443// // For compatibility
444// if (!is_file($dir.$filebis))
445// {
446// $filebis = $file."/".$file.".modules.php";
447// $classname = "mod_facture_".$file;
448// }
449// // Check if there is a filter on country
450// preg_match('/\-(.*)_(.*)$/', $classname, $reg);
451// if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue;
452//
453// $classname = preg_replace('/\-.*$/', '', $classname);
454// if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php')
455// {
456// // Charging the numbering class
457// require_once $dir.$filebis;
458//
459// $module = new $classname($db);
460//
461// // Show modules according to features level
462// if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
463// if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
464//
465// if ($module->isEnabled())
466// {
467// $array[preg_replace('/\-.*$/', '', preg_replace('/\.php$/', '', $file))] = preg_replace('/\-.*$/', '', preg_replace('/mod_facture_/', '', preg_replace('/\.php$/', '', $file)));
468// }
469// }
470// }
471// }
472// closedir($handle);
473// }
474// }
475//}
476//
477//print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0);
478//print "</td></tr>\n";
479
480print '</table>';
481print '</div>';
482
483
484// Sumup options
485if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) {
486 print '<br>';
487
488 print '<div class="div-table-responsive-no-min">';
489 print '<table class="noborder centpercent">';
490
491 print '<tr class="liste_titre">';
492 print '<td class="titlefield">'.$langs->trans("Sumup").'</td><td></td>';
493 print "</tr>\n";
494
495 print '<tr class="oddeven"><td>';
496 print $langs->trans("SumupAffiliate");
497 print '<td colspan="2">';
498 print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="' . getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE').'"></input>';
499 print "</td></tr>\n";
500 print '<tr class="oddeven"><td>';
501 print $langs->trans("SumupAppId");
502 print '<td colspan="2">';
503 print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="' . getDolGlobalString('TAKEPOS_SUMUP_APPID').'"></input>';
504 print "</td></tr>\n";
505
506 print '</table>';
507 print '</div>';
508}
509
510print $form->buttonsSaveCancel("Save", '');
511
512print "</form>\n";
513
514llxFooter();
515$db->close();
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).
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $idforemptyvalue='-1', $morecss='')
Convert a html select field into an ajax combobox.
Definition ajax.lib.php:475
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage invoices.
Class to manage generation of HTML components Only common components must be here.
Class permettant la generation du formulaire html d'envoi de mail unitaire Usage: $formail = new Form...
global $mysoc
dol_now($mode='gmt')
Return date for now.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
setEventMessage($mesgs, $style='mesgs', $noduplicate=0, $attop=0)
Set event message in dol_events session object.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0, $include=null)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition pdf.lib.php:824
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
takepos_admin_prepare_head()
Prepare array with list of tabs.