dolibarr 24.0.0-beta
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 * Copyright (C) 2026 Charlene Benke <charlene@patas-monkey.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
30// Load Dolibarr environment
31require '../../main.inc.php'; // Load $user and permissions
39require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
40require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
41require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
42require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
43require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
44require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
45
46// If socid provided by ajax company selector
47if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
48 $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
49 $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
50 $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
51}
52
53// Security check
54if (!$user->admin) {
56}
57
58$langs->loadLangs(array("admin", "cashdesk"));
59
60global $db, $mysoc;
61
62$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
63$sql .= " WHERE entity IN (".getEntity('c_paiement').")";
64$sql .= " AND active = 1";
65$sql .= " ORDER BY libelle";
66$resql = $db->query($sql);
67$paiements = array();
68if ($resql) {
69 while ($obj = $db->fetch_object($resql)) {
70 array_push($paiements, $obj);
71 }
72}
73
74$action = GETPOST('action', 'aZ09');
75
76$error = 0;
77
78
79/*
80 * Actions
81 */
82
83if ($action == 'set') {
84 $db->begin();
85
86 $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
87 $res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
88 $res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
89 $res = dolibarr_set_const($db, "TAKEPOS_SORTPRODUCTFIELD", GETPOST('TAKEPOS_SORTPRODUCTFIELD', 'alpha'), 'chaine', 0, '', $conf->entity);
90 $res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity);
91 $res = dolibarr_set_const($db, "TAKEPOS_ADDON", GETPOST('TAKEPOS_ADDON', 'alpha'), 'int', 0, '', $conf->entity);
92 $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity);
93 if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) {
94 $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
95 $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
96 }
97 if (isModEnabled('barcode')) {
98 $res = dolibarr_set_const($db, 'TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT', GETPOST('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT', 'alpha'), 'chaine', 0, '', $conf->entity);
99 }
100
101 dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
102
103 if ($res <= 0) {
104 $error++;
105 }
106
107 if (!$error) {
108 $db->commit();
109 } else {
110 $db->rollback();
111 }
112} elseif ($action == 'updateMask') {
113 $maskconst = GETPOST('maskconst', 'aZ09');
114 $maskvalue = GETPOST('maskvalue', 'alpha');
115 $res = 1;
116 if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
117 $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
118 }
119 if ($res <= 0) {
120 $error++;
121 }
122} elseif ($action == 'setrefmod') {
123 $value = GETPOST('value', 'alpha');
124 dolibarr_set_const($db, "TAKEPOS_REF_ADDON", $value, 'chaine', 0, '', $conf->entity);
125}
126
127if ($action != '') {
128 if (!$error) {
129 setEventMessage($langs->trans('SetupSaved'));
130 } else {
131 setEventMessages($langs->trans('Error'), null, 'errors');
132 }
133}
134
135
136/*
137 * View
138 */
139
140$form = new Form($db);
141
142$help_url = 'EN:Module_Point_of_sale_(TakePOS)';
143
144llxHeader('', $langs->trans("CashDeskSetup"), $help_url, '', 0, 0, '', '', '', 'mod-takepos page-admin_setup');
145
146$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>';
147
148print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
149
150
151if (in_array($mysoc->country_code, array('FR'))) {
152 $htmltext = $langs->trans("CashRegisterAlertFR", $langs->transnoentitiesnoconv("Bank"), $langs->transnoentitiesnoconv("CashControl")).' ';
153 $htmltext .= $langs->trans("CashRegisterAlertFR2").'<br>';
154 print info_admin($htmltext, 0, 0, 'warning');
155}
156
157
159print dol_get_fiche_head($head, 'setup', 'TakePOS', -1, 'cash-register');
160
161// Numbering modules
162$now = dol_now();
163$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
164
165print load_fiche_titre($langs->trans('CashDeskRefNumberingModules'), '', '');
166
167print '<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
168print '<table class="noborder centpercent">';
169print '<tr class="liste_titre">';
170print '<td>'.$langs->trans("Name")."</td>\n";
171print '<td>'.$langs->trans("Description")."</td>\n";
172print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
173print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
174print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
175print '</tr>'."\n";
176
177clearstatcache();
178
179foreach ($dirmodels as $reldir) {
180 $dir = dol_buildpath($reldir."core/modules/takepos/");
181
182 if (is_dir($dir)) {
183 $handle = opendir($dir);
184 if (is_resource($handle)) {
185 while (($file = readdir($handle)) !== false) {
186 if (substr($file, 0, 16) == 'mod_takepos_ref_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
187 $file = substr($file, 0, dol_strlen($file) - 4);
188
189 require_once $dir.$file.'.php';
190
191 $module = new $file();
192 '@phan-var-force ModeleNumRefTakepos $module';
193
194 // Show modules according to features level
195 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
196 continue;
197 }
198 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
199 continue;
200 }
201
202 if ($module->isEnabled()) {
203 print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
204 print $module->info($langs);
205 print '</td>';
206
207 // Show example of numbering module
208 print '<td class="nowrap">';
209 $tmp = $module->getExample();
210 if (preg_match('/^Error/', $tmp)) {
211 $langs->load("errors");
212 print '<div class="error">'.$langs->trans($tmp).'</div>';
213 } elseif ($tmp == 'NotConfigured') {
214 print $langs->trans($tmp);
215 } else {
216 print $tmp;
217 }
218 print '</td>'."\n";
219
220 print '<td class="center">';
221 if (getDolGlobalString('TAKEPOS_REF_ADDON', 'mod_takepos_ref_simple') == $file) {
222 print img_picto($langs->trans("Activated"), 'switch_on');
223 } else {
224 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setrefmod&token='.newToken().'&value='.urlencode($file).'">';
225 print img_picto($langs->trans("Disabled"), 'switch_off');
226 print '</a>';
227 }
228 print '</td>';
229
230 // example for next value
231 $invoice = new Facture($db);
232 $invoice->date = $now;
233 $invoice->module_source = 'takepos';
234 $invoice->pos_source = '1';
235
236 // Info
237 $htmltooltip = '';
238 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
239 $nextval = $module->getNextValue($mysoc, $invoice);
240 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
241 $htmltooltip .= ''.$langs->trans("NextValue").': ';
242 if ($nextval) {
243 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
244 $nextval = $langs->trans($nextval);
245 }
246 $htmltooltip .= $nextval.'<br>';
247 } else {
248 $htmltooltip .= $langs->trans($module->error).'<br>';
249 }
250 }
251
252 print '<td align="center">';
253 print $form->textwithpicto('', $htmltooltip, 1, 'info');
254 print '</td>';
255
256 print "</tr>\n";
257 }
258 }
259 }
260 closedir($handle);
261 }
262 }
263}
264print "</table>\n";
265print '</div>';
266print "\n";
267
268print '<br>';
269
270
271print load_fiche_titre($langs->trans('Options'), '', '');
272
273// Mode
274print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
275print '<input type="hidden" name="token" value="'.newToken().'">';
276print '<input type="hidden" name="action" value="set">';
277
278print '<div class="div-table-responsive-no-min">';
279print '<table class="noborder centpercent">';
280
281print '<tr class="liste_titre">';
282print '<td class="notitlefield">'.$langs->trans("Parameters").'</td><td></td>';
283print "</tr>\n";
284
285// Terminals
286print '<tr class="oddeven"><td>';
287print $langs->trans("NumberOfTerminals");
288print '<td>';
289print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" class="width50" value="' . getDolGlobalString('TAKEPOS_NUM_TERMINALS', '1') . '">';
290print "</td></tr>\n";
291
292// Services
293if (isModEnabled("service")) {
294 print '<tr class="oddeven"><td>';
295 print $langs->trans("CashdeskShowServices");
296 print '<td>';
297 print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0);
298 //print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
299 print "</td></tr>\n";
300}
301
302// Root category for products
303print '<tr class="oddeven"><td>';
304print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
305print '<td>';
306//print $form->selectCategories(Categorie::TYPE_PRODUCT, 'TAKEPOS_ROOT_CATEGORY_ID', null);
307print 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');
308print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
309print "</td></tr>\n";
310
311// Sort product
312print '<tr class="oddeven"><td>';
313print $langs->trans("SortProductField");
314print '<td>';
315$array = array('rowid' => 'ID', 'ref' => 'Ref', 'label' => 'Label', 'datec' => 'DateCreation', 'tms' => 'DateModification');
316print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD', 'rowid'), 0, 0, 0, '', 1);
317print "</td></tr>\n";
318
319print '<tr class="oddeven"><td>';
320print $langs->trans('TakeposGroupSameProduct');
321print '<td>';
322print ajax_constantonoff("TAKEPOS_GROUP_SAME_PRODUCT", array(), $conf->entity, 0, 0, 1, 0);
323print "</td></tr>\n";
324
325$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
326$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
327$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
328foreach ($substitutionarray as $key => $val) {
329 $htmltext .= $key.'<br>';
330}
331$htmltext .= '</i>';
332
333// Payment numpad
334print '<tr class="oddeven"><td>';
335print $langs->trans("Paymentnumpad");
336print '<td>';
337$array = array(0 => $langs->trans("Numberspad"), 1 => $langs->trans("BillsCoinsPad"));
338print $form->selectarray('TAKEPOS_NUMPAD', $array, (!getDolGlobalString('TAKEPOS_NUMPAD') ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
339print "</td></tr>\n";
340
341// Numpad use payment icons
342/*print '<tr class="oddeven"><td>';
343print $langs->trans('TakeposNumpadUsePaymentIcon');
344print '<td colspan="2">';
345print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0);
346print "</td></tr>\n";
347*/
348
349// Direct Payment
350print '<tr class="oddeven"><td>';
351print $langs->trans('DirectPaymentButton');
352print '<td>';
353print ajax_constantonoff("TAKEPOS_DIRECT_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
354//print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
355print "</td></tr>\n";
356
357// Head Bar
358/*print '<tr class="oddeven"><td>';
359print $langs->trans('HeadBar');
360print '<td colspan="2">';
361print $form->selectyesno("TAKEPOS_HEAD_BAR", $conf->global->TAKEPOS_HEAD_BAR, 1);
362print "</td></tr>\n";
363*/
364
365// Email template for send invoice
366print '<tr class="oddeven"><td>';
367print $langs->trans('EmailTemplate');
368print '<td>';
369include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
370$formmail = new FormMail($db);
371$formmail->fetchAllEMailTemplate('facture_send', $user, null, -1); // We set lang=null to get in priority record with no lang
372$arrayofmessagename = array();
373if (is_array($formmail->lines_model)) {
374 foreach ($formmail->lines_model as $modelmail) {
375 //var_dump($modelmail);
376 $moreonlabel = '';
377 if (!empty($arrayofmessagename[$modelmail->label])) {
378 $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
379 }
380 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\‍(|\‍)/', '', $modelmail->topic)).$moreonlabel;
381 }
382}
383//var_dump($arraydefaultmessage);
384//var_dump($arrayofmessagename);
385print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, getDolGlobalString('TAKEPOS_EMAIL_TEMPLATE_INVOICE'), $langs->transnoentitiesnoconv('NoneOrChooseAnEmailTemplateForInvoice'), 1, 0, '', 0, 0, 0, '', 'maxwidth500 widthcentpercentminusx', 1);
386// TODO Add link to go to email templates
387print "</td></tr>\n";
388
389// Control cash box at opening pos
390print '<tr class="oddeven"><td>';
391print $langs->trans('ControlCashOpening');
392print '<td>';
393print ajax_constantonoff("TAKEPOS_CONTROL_CASH_OPENING", array(), $conf->entity, 0, 0, 1, 0);
394print "</td></tr>\n";
395
396// Delayed Pay Button
397print '<tr class="oddeven"><td>';
398print $langs->trans('AllowDelayedPayment');
399print '<td>';
400print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
401print "</td></tr>\n";
402
403// Show price without vat
404print '<tr class="oddeven"><td>';
405print $langs->trans('ShowPriceHT');
406print '<td>';
407print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0);
408print "</td></tr>\n";
409
410// Use price excl. taxes (HT) and not price incl. taxes (TTC)
411print '<tr class="oddeven"><td>';
412print $langs->trans('UsePriceHT');
413print '</td><td>';
414print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0);
415print "</td></tr>\n";
416
417// disable freezone product
418print '<tr class="oddeven"><td>';
419print $form->textwithpicto($langs->trans('NoFreeZoneProduct'), $langs->trans('NoFreeZoneProductDesc'));
420print '</td><td>';
421print ajax_constantonoff("TAKEPOS_NO_FREE_ZONE_PRODUCT", array(), $conf->entity, 0, 0, 1, 0);
422print "</td></tr>\n";
423
424// Barcode rule to insert product
425if (isModEnabled('barcode')) {
426 print '<tr class="oddeven"><td>';
427 print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"), 1, 'help', '', 0, 3, 'barcoderuleonsmartphone');
428 print '<td>';
429 print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="' . (getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')) . '">';
430 print "</td></tr>\n";
431}
432
433// Numbering module
434//print '<tr class="oddeven"><td>';
435//print $langs->trans("BillsNumberingModule");
436//print '<td colspan="2">';
437//$array = array(0=>$langs->trans("Default"), "terminal"=>$langs->trans("ByTerminal"));
438//$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
439//foreach ($dirmodels as $reldir)
440//{
441// $dir = dol_buildpath($reldir."core/modules/facture/");
442// if (is_dir($dir))
443// {
444// $handle = opendir($dir);
445// if (is_resource($handle))
446// {
447// while (($file = readdir($handle)) !== false)
448// {
449// if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
450// {
451// $filebis = $file;
452// $classname = preg_replace('/\.php$/', '', $file);
453// // For compatibility
454// if (!is_file($dir.$filebis))
455// {
456// $filebis = $file."/".$file.".modules.php";
457// $classname = "mod_facture_".$file;
458// }
459// // Check if there is a filter on country
460// preg_match('/\-(.*)_(.*)$/', $classname, $reg);
461// if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue;
462//
463// $classname = preg_replace('/\-.*$/', '', $classname);
464// if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php')
465// {
466// // Charging the numbering class
467// require_once $dir.$filebis;
468//
469// $module = new $classname($db);
470//
471// // Show modules according to features level
472// if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
473// if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
474//
475// if ($module->isEnabled())
476// {
477// $array[preg_replace('/\-.*$/', '', preg_replace('/\.php$/', '', $file))] = preg_replace('/\-.*$/', '', preg_replace('/mod_facture_/', '', preg_replace('/\.php$/', '', $file)));
478// }
479// }
480// }
481// }
482// closedir($handle);
483// }
484// }
485//}
486//
487//print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0);
488//print "</td></tr>\n";
489
490print '</table>';
491print '</div>';
492
493
494// Sumup options
495if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) {
496 print '<br>';
497
498 print '<div class="div-table-responsive-no-min">';
499 print '<table class="noborder centpercent">';
500
501 print '<tr class="liste_titre">';
502 print '<td class="titlefield">'.$langs->trans("Sumup").'</td><td></td>';
503 print "</tr>\n";
504
505 print '<tr class="oddeven"><td>';
506 print $langs->trans("SumupAffiliate");
507 print '<td colspan="2">';
508 print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="' . getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE').'"></input>';
509 print "</td></tr>\n";
510 print '<tr class="oddeven"><td>';
511 print $langs->trans("SumupAppId");
512 print '<td colspan="2">';
513 print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="' . getDolGlobalString('TAKEPOS_SUMUP_APPID').'"></input>';
514 print "</td></tr>\n";
515
516 print '</table>';
517 print '</div>';
518}
519
520print $form->buttonsSaveCancel("Save", '');
521
522print "</form>\n";
523
524llxFooter();
525$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:476
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 to manage a HTML form to send a unitary email Usage: $formail = new FormMail($db) $formmail->pr...
global $mysoc
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
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)
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='')
Show information in HTML for admin users or standard users.
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.
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.
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:1135
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.