dolibarr 24.0.0-beta
receiptprinter.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
5 * Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024 Abbes Bahfir <contact@ab1consult.com><bafbes@gmail.com>
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';
38require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
39require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
40require_once DOL_DOCUMENT_ROOT.'/core/lib/receiptprinter.lib.php';
41require_once DOL_DOCUMENT_ROOT.'/takepos/class/dolreceiptprinter.class.php';
42
43// Load translation files required by the page
44$langs->loadLangs(array("admin", "receiptprinter"));
45
46if (!$user->admin) {
48}
49
50$action = GETPOST('action', 'aZ09');
51$mode = GETPOST('mode', 'alpha');
52
53$printername = GETPOST('printername', 'alpha');
54$printerid = GETPOSTINT('printerid');
55$printertypeid = GETPOSTINT('printertypeid');
56$parameter = GETPOST('parameter', 'alpha');
57
58$template = GETPOST('template', 'alphanohtml');
59$templatename = GETPOST('templatename', 'alpha');
60$templateid = GETPOSTINT('templateid');
61
62$printer = new dolReceiptPrinter($db);
63$hookmanager->initHooks(array('receiptPrinter', 'globalcard'));
64if (!$mode) {
65 $mode = 'config';
66}
67
68// used in library escpos maybe useful if php doesn't support gzdecode
69if (!function_exists('gzdecode')) {
77 function gzdecode($data)
78 {
79 return gzinflate(substr($data, 10, -8));
80 }
81}
82
83
84/*
85 * Action
86 */
87
88if ($action == 'addprinter') {
89 $error = 0;
90 if (empty($printername)) {
91 $error++;
92 setEventMessages($langs->trans("PrinterNameEmpty"), null, 'errors');
93 }
94
95 if (empty($parameter) && $printertypeid > 1) {
96 setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings');
97 }
98
99 if (!$error) {
100 $db->begin();
101 $result = $printer->addPrinter($printername, $printertypeid, GETPOSTINT('printerprofileid'), $parameter);
102 if ($result > 0) {
103 $error++;
104 }
105
106 if (!$error) {
107 $db->commit();
108 setEventMessages($langs->trans("PrinterAdded", $printername), null);
109 } else {
110 $db->rollback();
111 setEventMessages($printer->error, $printer->errors, 'errors');
112 }
113 }
114 $action = '';
115}
116
117if ($action == 'deleteprinter') {
118 $error = 0;
119 if (empty($printerid)) {
120 $error++;
121 setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
122 }
123
124 if (!$error) {
125 $db->begin();
126 $result = $printer->deletePrinter($printerid);
127 if ($result > 0) {
128 $error++;
129 }
130
131 if (!$error) {
132 $db->commit();
133 setEventMessages($langs->trans("PrinterDeleted", $printername), null);
134 } else {
135 $db->rollback();
137 }
138 }
139 $action = '';
140}
141
142if ($action == 'updateprinter') {
143 $error = 0;
144 if (empty($printerid)) {
145 $error++;
146 setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
147 }
148
149 if (!$error) {
150 $db->begin();
151 $result = $printer->updatePrinter($printername, GETPOSTINT('printertypeid'), GETPOSTINT('printerprofileid'), $parameter, $printerid);
152 if ($result > 0) {
153 $error++;
154 }
155
156 if (!$error) {
157 $db->commit();
158 setEventMessages($langs->trans("PrinterUpdated", $printername), null);
159 } else {
160 $db->rollback();
162 }
163 }
164 $action = '';
165}
166
167if ($action == 'testprinter') {
168 $error = 0;
169 if (empty($printerid)) {
170 $error++;
171 setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
172 }
173
174 if (!$error) {
175 // test
176 $ret = $printer->sendTestToPrinter($printerid);
177 if ($ret == 0) {
178 setEventMessages($langs->trans("TestSentToPrinter", $printername), null);
179 } else {
180 setEventMessages($printer->error, $printer->errors, 'errors');
181 }
182 }
183 $action = '';
184}
185
186if ($action == 'testprinter2') {
187 $error = 0;
188 if (empty($printerid)) {
189 $error++;
190 setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
191 }
192
193 if (!$error) {
194 // test
195 $ret = $printer->sendTestToPrinter($printerid, 1);
196 if ($ret == 0) {
197 setEventMessages($langs->trans("TestSentToPrinter", $printername), null);
198 } else {
199 setEventMessages($printer->error, $printer->errors, 'errors');
200 }
201 }
202 $action = '';
203}
204
205if ($action == 'testtemplate') {
206 $error = 0;
207 // if (empty($printerid)) {
208 // $error++;
209 // setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
210 // }
211
212 // if (! $error) {
213 // test
214 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
215 $object = new Facture($db);
216 $object->initAsSpecimen();
217 //$object->fetch(18);
218 //var_dump($object->lines);
219 $ret = $printer->sendToPrinter($object, $templateid, 1);
220 if ($ret == 0) {
221 setEventMessages($langs->trans("TestTemplateToPrinter", $printername), null);
222 } else {
223 setEventMessages($printer->error, $printer->errors, 'errors');
224 }
225 //}
226 $action = '';
227}
228
229if ($action == 'updatetemplate') {
230 $error = 0;
231 if (empty($templateid)) {
232 $error++;
233 setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors');
234 }
235
236 if (!$error) {
237 $db->begin();
238 $result = $printer->updateTemplate($templatename, $template, $templateid);
239 if ($result > 0) {
240 $error++;
241 }
242
243 if (!$error) {
244 $db->commit();
245 setEventMessages($langs->trans("TemplateUpdated", $templatename), null);
246 } else {
247 $db->rollback();
249 }
250 }
251 $action = '';
252}
253
254if ($action == 'addtemplate') {
255 $error = 0;
256 if (empty($templatename)) {
257 $error++;
258 setEventMessages($langs->trans("TemplateNameEmpty"), null, 'errors');
259 }
260
261 if (!$error) {
262 $db->begin();
263 $result = $printer->addTemplate($templatename, $template);
264 if ($result > 0) {
265 $error++;
266 }
267
268 if (!$error) {
269 $db->commit();
270 setEventMessages($langs->trans("TemplateAdded", $templatename), null);
271 } else {
272 $db->rollback();
274 }
275 }
276 $action = '';
277}
278
279if ($action == 'deletetemplate') {
280 $error = 0;
281 if (empty($templateid)) {
282 $error++;
283 setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors');
284 }
285
286 if (!$error) {
287 $db->begin();
288 $result = $printer->deleteTemplate($templateid);
289 if ($result > 0) {
290 $error++;
291 }
292
293 if (!$error) {
294 $db->commit();
295 setEventMessages($langs->trans("TemplateDeleted", $templatename), null);
296 } else {
297 $db->rollback();
299 }
300 }
301 $action = '';
302}
303
304
305/*
306 * View
307 */
308
309$form = new Form($db);
310
311llxHeader('', $langs->trans("ReceiptPrinterSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-receiptprinter');
312
313$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>';
314
315print load_fiche_titre($langs->trans("ReceiptPrinterSetup"), $linkback, 'title_setup');
316
318$line = -1;
319
320// mode = config
321if ($mode == 'config') {
322 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=config" autocomplete="off">';
323 print '<input type="hidden" name="token" value="'.newToken().'">';
324 if ($action != 'editprinter') {
325 print '<input type="hidden" name="action" value="addprinter">';
326 } else {
327 print '<input type="hidden" name="action" value="updateprinter">';
328 }
329
330
331 print dol_get_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic');
332
333 //print info_admin($langs->trans("ThisFeatureIsForESCPOSPrintersOnly"));
334
335 print load_fiche_titre($langs->trans("ReceiptPrinterDesc"), '', '')."\n";
336
337 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
338 print '<table class="noborder centpercent">'."\n";
339 print '<tr class="liste_titre">';
340 print '<th>'.$langs->trans("Name").'</th>';
341 print '<th>'.$langs->trans("Type").'</th>';
342 /* Profiles not used, so disabled
343 print '<th>';
344 $htmltext = $langs->trans("PROFILE_DEFAULT").' = '.$langs->trans("PROFILE_DEFAULT_HELP").'<br>';
345 $htmltext .= $langs->trans("PROFILE_SIMPLE").' = '.$langs->trans("PROFILE_SIMPLE_HELP").'<br>';
346 $htmltext .= $langs->trans("PROFILE_EPOSTEP").' = '.$langs->trans("PROFILE_EPOSTEP_HELP").'<br>';
347 $htmltext .= $langs->trans("PROFILE_P822D").' = '.$langs->trans("PROFILE_P822D_HELP").'<br>';
348 $htmltext .= $langs->trans("PROFILE_STAR").' = '.$langs->trans("PROFILE_STAR_HELP").'<br>';
349
350 print $form->textwithpicto($langs->trans("Profile"), $htmltext);
351 print '</th>';
352 */
353 print '<th>'.$langs->trans("Parameters").'</th>';
354 print '<th></th>';
355 print "</tr>\n";
356
357 $ret = $printer->listprinters();
358 $nbofprinters = count($printer->listprinters);
359
360 if ($action != 'editprinter') {
361 print '<tr>';
362 print '<td><input class="minwidth100" type="text" name="printername"></td>';
363 $ret = $printer->selectTypePrinter();
364 print '<td>'.$printer->resprint.'</td>';
365 /* Profiles not used, so disabled
366 $ret = $printer->selectProfilePrinter();
367 print '<td>'.$printer->profileresprint.'</td>';
368 */
369 print '<td><input class="minwidth150" type="text" name="parameter"></td>';
370 print '<td class="right">';
371 if ($action != 'editprinter') {
372 print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'"></div>';
373 }
374 print '</td>';
375 print '</tr>';
376 }
377
378 if ($ret > 0) {
379 setEventMessages($printer->error, $printer->errors, 'errors');
380 } else {
381 for ($line = 0; $line < $nbofprinters; $line++) {
382 print '<tr class="oddeven">';
383 if ($action == 'editprinter' && $printer->listprinters[$line]['rowid'] == $printerid) {
384 print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
385 print '<td><input type="text" class="minwidth200" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
386 $ret = $printer->selectTypePrinter((string) $printer->listprinters[$line]['fk_type']);
387 print '<td>'.$printer->resprint.'</td>';
388 /* Profiles not used, so disabled
389 $ret = $printer->selectProfilePrinter((string) $printer->listprinters[$line]['fk_profile']);
390 print '<td>'.$printer->profileresprint.'</td>';
391 */
392 print '<td><input class="minwidth150" type="text" name="parameter" value="'.$printer->listprinters[$line]['parameter'].'"></td>';
393 print '<td>';
394 print $form->buttonsSaveCancel("Save", '');
395 print '</td>';
396 print '</tr>';
397 } else {
398 print '<td>'.$printer->listprinters[$line]['name'].'</td>';
399 print '<td>'.$langs->trans($printer->listprinters[$line]['fk_type_name']).'</td>';
400 /* Profiles not used, so disabled
401 print '<td>'.$langs->trans($printer->listprinters[$line]['fk_profile_name']).'</td>';
402 */
403 print '<td>'.$printer->listprinters[$line]['parameter'].'</td>';
404 // edit icon
405 print '<td class="center">';
406 print '<a class="editfielda marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=editprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'">';
407 print img_picto($langs->trans("Edit"), 'edit', 'class="paddingright"');
408 print '</a>';
409 // delete icon
410 print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=deleteprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
411 print img_picto($langs->trans("Delete"), 'delete', 'class="paddingright"');
412 print '</a>';
413 // test icon
414 print '<a class="marginrightonly nowraponall" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
415 print img_picto($langs->trans("TestPrinterDesc"), 'printer', 'class="paddingright paddingleft"').'TXT';
416 print '</a>';
417 // test icon
418 print '<a class="marginrightonly nowraponall" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter2&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
419 print img_picto($langs->trans("TestPrinterDesc2"), 'printer', 'class="paddingright paddingleft"').'IMG';
420 print '</a>';
421 print '</td>';
422 print '</tr>';
423 }
424 }
425 }
426
427 print '</table>';
428 print '</div>';
429
430 print dol_get_fiche_end();
431
432 print '</form>';
433
434 print '<br>';
435
436
437 print '<span class="opacitymedium">'.$langs->trans("ReceiptPrinterTypeDesc").'...</span><br><br>'."\n";
438
439 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
440 print '<table class="noborder centpercent">'."\n";
441 print '<tr class="oddeven"><td class="minwidth100">'.$langs->trans("CONNECTOR_DUMMY").'</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>';
442 print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("CONNECTOR_FILE_PRINT"), $langs->trans("FromServerPointOfView")).'</td><td>'.$langs->trans("CONNECTOR_FILE_PRINT_HELP").'</td></tr>';
443 print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("CONNECTOR_WINDOWS_PRINT"), $langs->trans("FromServerPointOfView")).'</td><td>'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'</td></tr>';
444 print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("CONNECTOR_NETWORK_PRINT"), $langs->trans("FromServerPointOfView")).'</td><td>'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'</td></tr>';
445 print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("CONNECTOR_CUPS_PRINT"), $langs->trans("FromServerPointOfView")).'</td><td>'.$langs->trans("CONNECTOR_CUPS_PRINT_HELP").'</td></tr>';
446 print '</table>';
447 print '</div>';
448
449 print '<br>';
450}
451
452// mode = template
453if ($mode == 'template') {
454 print dol_get_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic');
455
456 //print info_admin($langs->trans("ThisFeatureIsForESCPOSPrintersOnly"));
457
458 print '<br>';
459
460 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=template" autocomplete="off">';
461 print '<input type="hidden" name="token" value="'.newToken().'">';
462 if ($action != 'edittemplate') {
463 print '<input type="hidden" name="action" value="addtemplate">';
464 } else {
465 print '<input type="hidden" name="action" value="updatetemplate">';
466 }
467
468 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
469 print '<table class="noborder centpercent">'."\n";
470 print '<tr class="liste_titre">';
471 print '<th>'.$langs->trans("Name").'</th>';
472 print '<th>'.$langs->trans("Template").'</th>';
473 print '<th></th>';
474 print "</tr>\n";
475 $ret = $printer->listPrintersTemplates();
476 //print '<pre>'.print_r($printer->listprinterstemplates, true).'</pre>';
477 if ($ret > 0) {
478 setEventMessages($printer->error, $printer->errors, 'errors');
479 } else {
480 $max = count($printer->listprinterstemplates);
481 for ($line = 0; $line < $max; $line++) {
482 print '<tr class="oddeven">';
483 if (!is_array($printer->listprinterstemplates[$line])) {
484 continue;
485 }
486 if ($action == 'edittemplate' && !empty($printer->listprinterstemplates[$line]) && !empty($printer->listprinterstemplates[$line]['rowid']) && $printer->listprinterstemplates[$line]['rowid'] == $templateid) {
487 print '<input type="hidden" name="templateid" value="'.($printer->listprinterstemplates[$line]['rowid'] ?? '').'">';
488 print '<td><input type="text" class="minwidth200" name="templatename" value="'.($printer->listprinterstemplates[$line]['name'] ?? '').'"></td>';
489 print '<td class="wordbreak">';
490 print '<textarea name="template" wrap="soft" cols="90" rows="12">'.($printer->listprinterstemplates[$line]['template'] ?? '').'</textarea>';
491 print '</td>';
492 print '<td>';
493 print $form->buttonsSaveCancel("Save", '');
494 print '</td>';
495 } else {
496 print '<td>'.($printer->listprinterstemplates[$line]['name'] ?? '').'</td>';
497 print '<td class="wordbreak">'.dol_htmlentitiesbr($printer->listprinterstemplates[$line]['template'] ?? '').'</td>';
498 // edit icon
499 print '<td class="center"><a class="editfielda paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=edittemplate&token='.newToken().'&templateid='.($printer->listprinterstemplates[$line]['rowid'] ?? '').'">';
500 print img_picto($langs->trans("Edit"), 'edit');
501 print '</a>';
502 // delete icon
503 print '<a class="paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=deletetemplate&token='.newToken().'&templateid='.($printer->listprinterstemplates[$line]['rowid'] ?? '').'&templatename='.urlencode($printer->listprinterstemplates[$line]['name'] ?? '').'">';
504 print img_picto($langs->trans("Delete"), 'delete');
505 print '</a>';
506 // test icon
507 print '<a class="paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=testtemplate&token='.newToken().'&templateid='.($printer->listprinterstemplates[$line]['rowid'] ?? '').'&templatename='.urlencode($printer->listprinterstemplates[$line]['name'] ?? '').'">';
508 print img_picto($langs->trans("TestPrinterTemplate"), 'printer');
509 print '</a></td>';
510 }
511 print '</tr>';
512 }
513 }
514
515 if ($action != 'edittemplate') {
516 print '<tr>';
517 print '<td><input type="text" class="minwidth200" name="templatename" value="'.($printer->listprinterstemplates[$line]['name'] ?? '').'"></td>';
518 print '<td class="wordbreak">';
519 print '<textarea name="template" wrap="soft" cols="90" rows="12">';
520 print '</textarea>';
521 print '</td>';
522 print '<td>';
523 print '<input type="hidden" name="templateid" value="'.($printer->listprinterstemplates[$line]['rowid'] ?? '').'">';
524 print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
525 print '</td>';
526 print '</tr>';
527 }
528
529 print '</table>';
530 print '</div>';
531
532 print '</form>';
533
534 print dol_get_fiche_end();
535
536 print '<br>';
537
538 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
539 print '<table class="noborder centpercent">'."\n";
540 print '<tr class="liste_titre">';
541 print '<th>'.$langs->trans("Tag").'</th>';
542 print '<th>'.$langs->trans("Description").'</th>';
543 print "</tr>\n";
544
545 $langs->loadLangs(array("bills", "companies"));
546 foreach ($printer->tags as $key => $val) {
547 print '<tr class="oddeven">';
548 print '<td>{'.$key.'}</td><td>'.$langs->trans($val).'</td>';
549 print '</tr>';
550 }
551 $reshook = $hookmanager->executeHooks('listReceiptPrinterTags', array(), $printer, $action); // Note that $action and $object may have been modified by some hooks
552 if ($reshook < 0) {
553 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
554 }
555 print '</table>';
556 print '</div>';
557}
558
559// End of page
560llxFooter();
561$db->close();
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
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 Receipt Printers.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
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)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
receiptprinteradmin_prepare_head($mode)
Define head array for tabs of receipt printer setup pages.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.