dolibarr 23.0.3
receipt.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
3 * Copyright (C) 2011-2023 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
5 * Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
6 * Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
7 * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
8 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
9 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
10 * Copyright (C) 202 Ferran Marcet <fmarcet@2byte.es>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 */
25
33// Include the main.inc.php (note: when file is included into send.php, $action is already set and main.inc.php was already loaded)
37if (!isset($action)) {
38 //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Not disabled cause need to load personalized language
39 //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language
40 //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
41 //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1');
42 if (!defined('NOTOKENRENEWAL')) {
43 define('NOTOKENRENEWAL', '1');
44 }
45 if (!defined('NOREQUIREMENU')) {
46 define('NOREQUIREMENU', '1');
47 }
48 if (!defined('NOREQUIREHTML')) {
49 define('NOREQUIREHTML', '1');
50 }
51 if (!defined('NOREQUIREAJAX')) {
52 define('NOREQUIREAJAX', '1');
53 }
54
55 require '../main.inc.php'; // If this file is called from send.php avoid load again
56}
65include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
66include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
67
68$langs->loadLangs(array("main", "bills", "cashdesk", "companies"));
69
70$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant
71
72$facid = GETPOSTINT('facid');
73
74$action = GETPOST('action', 'aZ09');
75$gift = GETPOSTINT('gift');
76
77if (!$user->hasRight('takepos', 'run')) {
79}
80
81
82/*
83 * Actions
84 */
85
86// None
87
88
89/*
90 * View
91 */
92
93top_htmlhead('', '', 2);
94
95if (!$facid && (string) $place != '' && !empty($_SESSION["takeposterminal"])) {
96 $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture";
97 $sql .= " WHERE ref = '(PROV-POS".$db->escape($_SESSION["takeposterminal"]."-".$place).")'";
98 $sql .= " AND entity IN (".getEntity('invoice').")";
99
100 $resql = $db->query($sql);
101 $obj = $db->fetch_object($resql);
102 if ($obj) {
103 $facid = $obj->rowid;
104 }
105}
106$object = new Facture($db);
107if ($facid > 0 && !GETPOST('specimen')) {
108 $object->fetch($facid);
109} else {
110 $object->initAsSpecimen('takepos');
111}
112print '<body>';
113
114
115// Record entry in blocked logs each time we print a receipt
116//
117// This will also increase the counter of printings of the receipt
118// DOL_DOCUMENT_ROOT.'/blockedlog/ajax/block-add.php?id='.$object->id.'&element='.$object->element.'&action=DOC_PREVIEW&token='.newToken();
119
120print "
121<script>
122
123 console.log('Call /blockedlog/ajax/block-add on output of receipt.php.');
124 $.post('".DOL_URL_ROOT."/blockedlog/ajax/block-add.php'
125 , {
126 id: ".((int) $object->id)."
127 , element: '".dol_escape_js($object->element)."'
128 , action: 'DOC_PREVIEW'
129 , token: '".currentToken()."'
130 }
131 );
132</script>";
133
134/*
135 * jQuery(document).ready(function () {
136});
137 */
138
139// Call to external receipt modules factory if it exists and if we can (not allowed in some cases)
141 // If LNE version, we force format. Custom templates is not allowed
142 $conf->global->TAKEPOS_SHOW_HT_RECEIPT = 1;
143 $conf->global->TAKEPOS_TICKET_VAT_GROUPPED = 1;
144} else {
145 $parameters = array();
146 $hookmanager->initHooks(array('takeposfrontend'));
147 $reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object);
148 if (!empty($hookmanager->resPrint)) {
149 print $hookmanager->resPrint;
150 return; // Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
151 }
152}
153
154// IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path.
155?>
156
157<style>
158.right {
159 text-align: right;
160}
161.center {
162 text-align: center;
163}
164.left {
165 text-align: left;
166}
167.centpercent {
168 width: 100%;
169}
170@media only screen and (min-width: 1024px)
171{
172 body {
173 margin-left: 50px;
174 margin-right: 50px;
175 }
176}
177</style>
178<center>
179<div style="font-size: 1.5em">
180<?php
181echo '<b>'.$mysoc->name.'</b>';
182
183if (GETPOST('specimen')) {
184 print '<br>';
185 print '!!!!! SPECIMEN !!!!!';
186}
187?>
188</div>
189</center>
190<br>
191<p class="left">
192<?php
193$constFreeText = 'TAKEPOS_HEADER'.(empty($_SESSION['takeposterminal']) ? '0' : $_SESSION['takeposterminal']);
194if (getDolGlobalString('TAKEPOS_HEADER') || getDolGlobalString($constFreeText)) {
195 $newfreetext = '';
196 $substitutionarray = getCommonSubstitutionArray($langs);
197 complete_substitutions_array($substitutionarray, $langs, $object);
198 if (getDolGlobalString('TAKEPOS_HEADER')) {
199 $newfreetext .= make_substitutions(getDolGlobalString('TAKEPOS_HEADER'), $substitutionarray);
200 }
201 if (getDolGlobalString($constFreeText)) {
202 $newfreetext .= make_substitutions(getDolGlobalString($constFreeText), $substitutionarray);
203 }
204 print nl2br($newfreetext);
205}
206?>
207</p>
208
209<?php
210if ($object->status == Facture::STATUS_DRAFT) {
211 $canprintifnotvalidate = true;
212 if (isALNERunningVersion()) {
213 $canprintifnotvalidate = false;
214 //$orderprinterallowed = false;
215 }
216
217 if (!$canprintifnotvalidate && empty($facid) && !GETPOST('specimen')) {
218 print "Error: Printing ticket is not allowed when invoice is not validated/paid.";
219 exit;
220 }
221}
222?>
223
224<p class="right">
225<?php
226// Invoice Ref
227if (getDolGlobalString('TAKEPOS_RECEIPT_NAME')) {
228 print getDolGlobalString('TAKEPOS_RECEIPT_NAME') . " ";
229} else {
230 print $langs->trans("InvoiceRef")." ";
231}
232if ($object->status == Facture::STATUS_DRAFT || empty($facid) || GETPOST('specimen')) {
233 // Printing ticket is not allowed if invoice not yet validate.
234 // Reaching this code may happen for specimen or if a feature to validate invoice and print it before paying is implemented.
235 if (empty($facid) || GETPOST('specimen')) {
236 print '99999';
237 } else {
238 print $object->ref;
239 }
240} else {
241 print $object->ref;
242}
243// POS terminal
244print '<br>'.$langs->trans("Terminal").' '.(GETPOST('specimen') ? '99' : ($object->pos_source ? $object->pos_source : 'Backoffice'));
245if (getDolGlobalString('TAKEPOS_SHOW_CUSTOMER')) {
246 if ($object->socid != getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"])) {
247 $soc = new Societe($db);
248 if ($object->socid > 0) {
249 $soc->fetch($object->socid);
250 } else {
251 $soc->fetch(getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]));
252 }
253 print "<br>".$langs->trans("Customer").': '.$soc->name;
254 }
255}
256// Date
257print "<br>".$langs->trans('Date').": ".dol_print_date($object->date ? $object->date : dol_now(), 'day');
258// Date of printing
259if (isALNERunningVersion() || !getDolGlobalString('TAKEPOS_HIDE_DATE_OF_PRINTING')) {
260 print "<br>".$langs->trans("DateOfPrinting").': '.dol_print_date(dol_now(), 'dayhour', 'tzuserrel');
261}
262// Transaction ID
263if (isALNERunningVersion() && isModEnabled('blockedlog')) {
264 if ($object->status > $object::STATUS_DRAFT) {
265 $unalterablelogid = 'UNDEFINED';
266 $sql = "SELECT signature FROM ".MAIN_DB_PREFIX."blockedlog";
267 $sql .= " WHERE action = 'BILL_VALIDATE' AND element = 'facture' AND ref_object = '".$db->escape($object->ref)."'";
268 $sql .= $db->order('rowid', 'DESC');
269 $sql .= $db->plimit(1);
270
271 $resql = $db->query($sql);
272 if ($resql) {
273 $obj = $db->fetch_object($resql);
274 if ($obj) {
275 $unalterablelogid = $obj->signature;
276 }
277 }
278
279 print "<br>".$langs->trans("SignatureID").': '.dol_trunc(strtoupper($unalterablelogid), 10);
280 }
281}
282
283// $object->pos_print_counter is current value. It is increased by a parallel process when calling ajax block-add.php that
284// may have finished before or after this page start, so $object->pos_print_counter may be already up to date, but we use the value at begin
285// of this page start and we increase 1 to have correct value we want to show.
286$object->pos_print_counter += 1;
287
288// Show if it is a duplicata
289$isADuplicata = ($object->pos_print_counter >= 2);
290
291if ($object->status == $object::STATUS_CLOSED) {
292 if ($isADuplicata) {
293 print '<br><b>*** DUPLICATA (no '.($object->pos_print_counter - 1).') ***</b>'; // Hard coded string
294 }
295} else {
296 // Not yet paid completely
297 print '<br><b>*** '.strtoupper($langs->trans("TemporaryReceipt")).' ***</b>'; // Hard coded string
298}
299?>
300</p>
301<br>
302
303<table class="centpercent" style="border-top-style: double;">
304 <thead>
305 <tr>
306 <th class="left"><?php print $langs->trans("Label"); ?></th>
307 <th class="right"><?php print $langs->trans("Qty"); ?></th>
308 <th class="right"><?php if ($gift != 1) {
309 print $langs->trans("Price");
310 } ?></th>
311 <?php if (getDolGlobalString('TAKEPOS_SHOW_HT_RECEIPT')) { ?>
312 <th class="right"><?php if ($gift != 1) {
313 print $langs->trans("TotalHT");
314 } ?></th>
315 <?php } ?>
316 <th class="right"><?php if ($gift != 1) {
317 print $langs->trans("TotalTTC");
318 } ?></th>
319 </tr>
320 </thead>
321 <tbody>
322 <?php
323 if ($action == 'without_details') {
324 $qty = GETPOSTINT('qty') > 0 ? GETPOSTINT('qty') : 1;
325 print '<tr>';
326 print '<td>' . GETPOST('label', 'alphanohtml') . '</td>';
327 print '<td class="right">' . $qty . '</td>';
328 print '<td class="right">' . price(price2num($object->total_ttc / $qty, 'MU'), 1) . '</td>';
329 if (getDolGlobalString('TAKEPOS_SHOW_HT_RECEIPT')) {
330 print '<td class="right">' . price($object->total_ht, 1) . '</td>';
331 }
332 print '<td class="right">' . price($object->total_ttc, 1) . '</td>';
333 print '</tr>';
334 } else {
335 foreach ($object->lines as $line) {
336 ?>
337 <tr>
338 <td>
339 <?php if (!empty($line->product_label)) {
340 echo $line->product_label;
341 } else {
342 echo $line->desc;
343 } ?>
344 </td>
345 <td class="right"><?php echo $line->qty; ?></td>
346 <td class="right"><?php if ($gift != 1) {
347 echo price(price2num($line->total_ttc / $line->qty, 'MT'), 1);
348 } ?></td>
349 <?php
350 if (getDolGlobalString('TAKEPOS_SHOW_HT_RECEIPT')) { ?>
351 <td class="right"><?php if ($gift != 1) {
352 echo price($line->total_ht, 1);
353 } ?></td>
354 <?php
355 } ?>
356 <td class="right"><?php if ($gift != 1) {
357 echo price($line->total_ttc, 1);
358 } ?></td>
359 </tr>
360 <?php
361 }
362 }
363 ?>
364 </tbody>
365</table>
366<br>
367<table class="right centpercent">
368<tr>
369 <th class="right"><?php if ($gift != 1) {
370 echo $langs->trans("TotalHT");
371 } ?></th>
372 <td class="right"><?php if ($gift != 1) {
373 echo price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n";
374 } ?></td>
375</tr>
376<?php
377if (getDolGlobalString('TAKEPOS_TICKET_VAT_GROUPPED')) {
378 $vat_groups = array();
379 foreach ($object->lines as $line) {
380 if (!array_key_exists((string) $line->tva_tx, $vat_groups)) {
381 $vat_groups[(string) $line->tva_tx] = 0;
382 }
383 $vat_groups[(string) $line->tva_tx] += $line->total_tva;
384 }
385
386 // Loop on each VAT group
387 foreach ($vat_groups as $key => $val) {
388 ?>
389 <tr>
390 <th align="right"><?php if ($gift != 1) {
391 echo $langs->trans("VAT").' '.vatrate($key, true);
392 } ?></th>
393 <td align="right"><?php if ($gift != 1) {
394 echo price($val, 1, '', 1, - 1, - 1, $conf->currency)."\n";
395 } ?></td>
396 </tr>
397 <?php
398 }
399} else { ?>
400<tr>
401 <th class="right"><?php if ($gift != 1) {
402 echo $langs->trans("TotalVAT").'</th><td class="right">'.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n";
403 } ?></th>
404</tr>
405<?php }
406
407// Now show local taxes if company uses them
408
409// $mysoc->useLocalTax(N) is a country-wide flag (true as soon as the country has a
410// matching c_tva row with a localtaxN_type), so on its own it always prints the line
411// for Spanish companies even when the company is "No sujeto a RE / IRPF". Mirror the
412// pattern used by compta/facture/card.php, card-rec.php and prelevement.php and gate
413// the country check on $mysoc->localtaxN_assuj == "1".
414if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || price2num($object->total_localtax1, 'MU')) { ?>
415<tr>
416 <th class="right"><?php if ($gift != 1) {
417 echo ''.$langs->trans("TotalLT1").'</th><td class="right">'.price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency)."\n";
418 } ?></th>
419</tr>
420<?php } ?>
421<?php if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || price2num($object->total_localtax2, 'MU')) { ?>
422<tr>
423 <th class="right"><?php if ($gift != 1) {
424 echo ''.$langs->trans("TotalLT2").'</th><td class="right">'.price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency)."\n";
425 } ?></th>
426</tr>
427<?php } ?>
428<tr>
429 <th class="right"><?php if ($gift != 1) {
430 echo ''.$langs->trans("TotalTTC").'</th><td class="right">'.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n";
431 } ?></th>
432</tr>
433<?php
434if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
435 //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
436 include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
437 $multicurrency = new MultiCurrency($db);
438 $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
439 echo '<tr><th class="right">';
440 if ($gift != 1) {
441 echo ''.$langs->trans("TotalTTC").' '.$_SESSION["takeposcustomercurrency"].'</th><td class="right">'.price($object->total_ttc * $multicurrency->rate->rate, 1, '', 1, - 1, - 1, $_SESSION["takeposcustomercurrency"])."\n";
442 }
443 echo '</td></tr>';
444}
445
446// We force the feature when LNE is on, whatever is setup. When a payment is done, we always want to see it on receipt.
448 $conf->global->TAKEPOS_PRINT_PAYMENT_METHOD = 1;
449}
450
451if (getDolGlobalString('TAKEPOS_PRINT_PAYMENT_METHOD')) {
452 if (empty($facid)) {
453 // Case of a specimen, we output demo data
454 echo '<tr>';
455 echo '<td class="right">';
456 echo $langs->transnoentitiesnoconv("PaymentTypeShortLIQ");
457 echo '</td>';
458 echo '<td class="right">';
459 $amount_payment = 0;
460 echo price($amount_payment, 1, '', 1, - 1, - 1, $conf->currency);
461 echo '</td>';
462 echo '</tr>';
463 } else {
464 $sql = "SELECT p.pos_change as pos_change, p.datep as date, p.fk_paiement, p.num_paiement as num,";
465 $sql .= " f.multicurrency_code,";
466 $sql .= " pf.amount as amount, pf.multicurrency_amount,";
467 $sql .= " cp.code";
468 $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."paiement as p";
469 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON p.fk_paiement = cp.id";
470 $sql .= " WHERE pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid AND pf.fk_facture = ".((int) $facid);
471 $sql .= " ORDER BY p.datep";
472
473 $resql = $db->query($sql);
474 if ($resql) {
475 $num = $db->num_rows($resql);
476
477 $i = 0;
478 while ($i < $num) {
479 $row = $db->fetch_object($resql);
480
481 echo '<tr>';
482 echo '<td class="right">';
483 echo $langs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
484 echo '</td>';
485 echo '<td class="right">';
486 $amount_payment = (isModEnabled('multicurrency') && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
487 //print "xx ".$row->multicurrency_amount." - ".$row->amount." - ".$amount_payment." - ".$object->multicurrency_tx;
488 if ((!isModEnabled('multicurrency') || $object->multicurrency_tx == 1) && $row->code == "LIQ" && $row->pos_change > 0) {
489 $amount_payment += $row->pos_change; // Show amount with excess received if it's cash payment
490 $currency = $conf->currency;
491 } else {
492 // We do not show change if payment into a different currency because not yet supported
493 $currency = $row->multicurrency_code;
494 }
495 echo price($amount_payment, 1, '', 1, - 1, - 1, $currency);
496 echo '</td>';
497 echo '</tr>';
498 if ((!isModEnabled('multicurrency') || $object->multicurrency_tx == 1) && $row->code == "LIQ" && $row->pos_change > 0) {
499 echo '<tr>';
500 echo '<td class="right">';
501 echo $langs->trans("Change"); // ChangeBack ?
502 echo '</td>';
503 echo '<td class="right">';
504 echo price($row->pos_change, 1, '', 1, - 1, - 1, $currency);
505 echo '</td>';
506 echo '</tr>';
507 }
508 $i++;
509 }
510 }
511 }
512}
513?>
514</table>
515
516<br>
517<br>
518<br>
519<?php
520$constFreeText = 'TAKEPOS_FOOTER'.(empty($_SESSION['takeposterminal']) ? '0' : $_SESSION['takeposterminal']);
521if (getDolGlobalString('TAKEPOS_FOOTER') || getDolGlobalString($constFreeText)) {
522 $newfreetext = '';
523 $substitutionarray = getCommonSubstitutionArray($langs);
524 complete_substitutions_array($substitutionarray, $langs, $object);
525 if (getDolGlobalString($constFreeText)) {
526 $newfreetext .= make_substitutions(getDolGlobalString($constFreeText), $substitutionarray);
527 }
528 if (getDolGlobalString('TAKEPOS_FOOTER')) {
529 $newfreetext .= make_substitutions(getDolGlobalString('TAKEPOS_FOOTER'), $substitutionarray);
530 }
531 print $newfreetext;
532}
533
535 $langs->load("blockedlog");
536 print '<center class="small"><i>';
537 print $langs->trans("LNECertifiedPOSSystem")."<br>";
538 if ($mysoc->idprof2) {
539 $labelidprof = $langs->transcountry("ProfId2Short", $mysoc->country_code);
540 print $labelidprof.': '.$mysoc->idprof2;
541 } elseif ($mysoc->idprof1) {
542 $labelidprof = $langs->transcountry("ProfId1Short", $mysoc->country_code);
543 print $labelidprof.': '.$mysoc->idprof1;
544 } else {
545 print 'ERROR: SIREN/SIRET not defined. Ticket not valid !!!';
546 }
547 if ($mysoc->tva_intra) {
548 $labelidprof = $langs->trans("VATIntra");
549 print ' - '.$labelidprof.': '.$mysoc->tva_intra;
550 }
551 print "</i></center><br>\n";
552}
553
554
555if (!GETPOST('forcenoautoopen')) {
556 ?>
557 <script type="text/javascript">
558 <?php
559 if ($facid) {
560 print 'window.print();';
561 } //Avoid print when is specimen
562 ?>
563 </script>
564 <?php
565}
566
567print "</body>";
568?>
569</html>
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
isALNEQualifiedVersion($ignoredev=0, $ignoremodule=0)
Return if the version is a candidate version to get the LNE certification and if the prerequisites ar...
isALNERunningVersion($blockedlogtestalreadydone=0)
Return if the application is executed with the LNE requirements on.
Class to manage invoices.
const STATUS_DRAFT
Draft status.
Class Currency.
Class to manage third parties objects (customers, suppliers, prospects...)
global $mysoc
dol_now($mode='gmt')
Return date for now.
vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0, $html=0)
Return a string with VAT rate label formatted for view output Used into pdf and HTML pages.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
currentToken()
Return the value of token currently saved into session with name 'token'.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into javascript code.
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
treeview li table
No Email.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
if(getDolGlobalString( 'TAKEPOS_SHOW_CUSTOMER')) print $langs trans('Date')." left Label right Qty right Price right TotalHT right TotalTTC right right right right right right right right right centpercent right TotalHT right n right VAT right n right TotalVAT right n No sujeto a RE IRPF right TotalLT1 right n right TotalLT2 right n right TotalTTC right n takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency right TotalTTC takeposcustomercurrency right takeposcustomercurrency n right PaymentTypeShortLIQ right SELECT p pos_change as p datep as p p num_paiement as f pf amount as amount
Definition receipt.php:466
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
Definition repair.php:125
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.