31require
'../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/cashcontrol/class/cashcontrol.class.php';
36$langs->loadLangs(array(
"install",
"cashdesk",
"admin",
"banks"));
40$action =
GETPOST(
'action',
'aZ09');
49$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
50$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
51$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
52$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
53if (empty($page) || $page == -1) {
56$offset = $limit * $page;
65$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'thirdpartylist';
67if ($contextpage ==
'takepos') {
68 $_GET[
'optioncss'] =
'print';
71$arrayofpaymentmode = array(
'cash'=>
'Cash',
'cheque'=>
'Cheque',
'card'=>
'CreditCard');
73$arrayofposavailable = array();
74if (isModEnabled(
'cashdesk')) {
75 $arrayofposavailable[
'cashdesk'] = $langs->trans(
'CashDesk').
' (cashdesk)';
77if (isModEnabled(
'takepos')) {
78 $arrayofposavailable[
'takepos'] = $langs->trans(
'TakePOS').
' (takepos)';
86$extrafields->fetch_name_optionals_label($object->table_element);
89$hookmanager->initHooks(array(
'cashcontrolcard',
'globalcard'));
92include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
95if ($user->socid > 0) {
99if (!$user->hasRight(
"cashdesk",
"run") && !$user->hasRight(
"takepos",
"run")) {
108$permissiontoadd = ($user->hasRight(
"cashdesk",
"run") || $user->hasRight(
"takepos",
"run"));
109$permissiontodelete = ($user->hasRight(
"cashdesk",
"run") || $user->hasRight(
"takepos",
"run")) || ($permissiontoadd && $object->status == 0);
110if (empty($backtopage)) {
111 $backtopage = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_card.php?id='.(!empty($id) && $id > 0 ? $id :
'__ID__');
113$backurlforlist = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_list.php';
114$triggermodname =
'CACHCONTROL_MODIFY';
116if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH1)) {
117 setEventMessages($langs->trans(
"CashDesk").
" - ".$langs->trans(
"NotConfigured"),
null,
'errors');
121if (
GETPOST(
'cancel',
'alpha')) {
122 if ($action ==
'valid') {
129if ($action ==
"reopen") {
130 $result = $object->setStatut($object::STATUS_DRAFT,
null,
'',
'CASHFENCE_REOPEN');
138if ($action ==
"start") {
140 if (!
GETPOST(
'posmodule',
'alpha') ||
GETPOST(
'posmodule',
'alpha') ==
'-1') {
141 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Module")),
null,
'errors');
145 if (
GETPOST(
'posnumber',
'alpha') ==
'') {
146 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CashDesk")),
null,
'errors');
150 if (!
GETPOST(
'closeyear',
'alpha') ||
GETPOST(
'closeyear',
'alpha') ==
'-1') {
151 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Year")),
null,
'errors');
155} elseif ($action ==
"add") {
156 if (
GETPOST(
'opening',
'alpha') ==
'') {
157 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"InitialBankBalance")),
null,
'errors');
162 foreach ($arrayofpaymentmode as $key => $val) {
167 $object->day_close =
GETPOST(
'closeday',
'int');
168 $object->month_close =
GETPOST(
'closemonth',
'int');
169 $object->year_close =
GETPOST(
'closeyear',
'int');
172 $object->posmodule =
GETPOST(
'posmodule',
'alpha');
173 $object->posnumber =
GETPOST(
'posnumber',
'alpha');
177 $id = $object->create($user);
187 if ($contextpage ==
'takepos') {
190 parent.location.href='../../takepos/index.php?place='+parent.place;
196if ($action ==
"valid") {
211 $result = $object->update($user);
213 $result = $object->valid($user);
223 if ($contextpage ==
'takepos') {
226 parent.location.href='../../takepos/index.php?place='+parent.place;
234if ($action ==
'confirm_delete' && !empty($permissiontodelete)) {
237 if (!($object->id > 0)) {
238 dol_print_error(
'',
'Error, object must be fetched before being deleted');
242 $result = $object->delete($user);
247 header(
"Location: ".$backurlforlist);
250 if (!empty($object->errors)) {
263$form =
new Form($db);
265$initialbalanceforterminal = array();
266$theoricalamountforterminal = array();
267$theoricalnbofinvoiceforterminal = array();
270llxHeader(
'', $langs->trans(
"CashControl"));
273if ($action ==
"create" || $action ==
"start" || $action ==
'close') {
274 if ($action ==
'close') {
275 $posmodule = $object->posmodule;
276 $terminalid = $object->posnumber;
277 $terminaltouse = $terminalid;
279 $syear = $object->year_close;
280 $smonth = $object->month_close;
281 $sday = $object->day_close;
282 } elseif (
GETPOST(
'posnumber',
'alpha') !=
'' &&
GETPOST(
'posnumber',
'alpha') !=
'' &&
GETPOST(
'posnumber',
'alpha') !=
'-1') {
283 $posmodule =
GETPOST(
'posmodule',
'alpha');
284 $terminalid =
GETPOST(
'posnumber',
'alpha');
285 $terminaltouse = $terminalid;
287 if ($terminaltouse ==
'1' && $posmodule ==
'cashdesk') {
291 if ($posmodule ==
'cashdesk' && $terminaltouse !=
'' && $terminaltouse !=
'1') {
293 setEventMessages($langs->trans(
"OnlyTerminal1IsAvailableForCashDeskModule"),
null,
'errors');
298 if (isset($terminalid) && $terminalid !=
'') {
300 foreach ($arrayofpaymentmode as $key => $val) {
301 if ($key !=
'cash') {
302 $initialbalanceforterminal[$terminalid][$key] = 0;
307 $vartouse =
'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse;
311 $sql =
"SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX.
"bank";
312 $sql .=
" WHERE fk_account = ".((int) $bankid);
313 if ($syear && !$smonth) {
315 } elseif ($syear && $smonth && !$sday) {
317 } elseif ($syear && $smonth && $sday) {
318 $sql .=
" AND dateo < '".$db->idate(
dol_mktime(0, 0, 0, $smonth, $sday, $syear)).
"'";
323 $resql = $db->query($sql);
325 $obj = $db->fetch_object($resql);
327 $initialbalanceforterminal[$terminalid][$key] = $obj->total;
333 setEventMessages($langs->trans(
"SetupOfTerminalNotComplete", $terminaltouse),
null,
'errors');
339 foreach ($arrayofpaymentmode as $key => $val) {
340 $sql =
"SELECT SUM(pf.amount) as total, COUNT(*) as nb";
341 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiement_facture as pf, ".MAIN_DB_PREFIX.
"facture as f, ".MAIN_DB_PREFIX.
"paiement as p, ".MAIN_DB_PREFIX.
"c_paiement as cp";
342 $sql .=
" WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement";
343 $sql .=
" AND f.module_source = '".$db->escape($posmodule).
"'";
344 $sql .=
" AND f.pos_source = '".$db->escape($terminalid).
"'";
345 $sql .=
" AND f.paye = 1";
346 $sql .=
" AND p.entity IN (".getEntity(
'facture').
")";
347 if ($key ==
'cash') {
348 $sql .=
" AND cp.code = 'LIQ'";
349 } elseif ($key ==
'cheque') {
350 $sql .=
" AND cp.code = 'CHQ'";
351 } elseif ($key ==
'card') {
352 $sql .=
" AND cp.code = 'CB'";
357 if ($syear && !$smonth) {
359 } elseif ($syear && $smonth && !$sday) {
361 } elseif ($syear && $smonth && $sday) {
362 $sql .=
" AND datef BETWEEN '".$db->idate(
dol_mktime(0, 0, 0, $smonth, $sday, $syear)).
"' AND '".$db->idate(
dol_mktime(23, 59, 59, $smonth, $sday, $syear)).
"'";
367 $resql = $db->query($sql);
369 $theoricalamountforterminal[$terminalid][$key] = $initialbalanceforterminal[$terminalid][$key];
371 $obj = $db->fetch_object($resql);
373 $theoricalamountforterminal[$terminalid][$key] =
price2num($theoricalamountforterminal[$terminalid][$key] + $obj->total);
374 $theoricalnbofinvoiceforterminal[$terminalid][$key] = $obj->nb;
383 if ($action !=
'close') {
384 print
load_fiche_titre($langs->trans(
"CashControl").
" - ".$langs->trans(
"New"),
'',
'cash-register');
386 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
387 print
'<input type="hidden" name="token" value="'.newToken().
'">';
388 if ($contextpage ==
'takepos') {
389 print
'<input type="hidden" name="contextpage" value="takepos">';
391 if ($action ==
'start' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'-1') {
392 print
'<input type="hidden" name="action" value="add">';
393 } elseif ($action ==
'close') {
394 print
'<input type="hidden" name="action" value="valid">';
395 print
'<input type="hidden" name="id" value="'.$id.
'">';
397 print
'<input type="hidden" name="action" value="start">';
400 print
'<div class="div-table-responsive-no-min">';
401 print
'<table class="noborder centpercent">';
402 print
'<tr class="liste_titre">';
403 print
'<td>'.$langs->trans(
"Module").
'</td>';
404 print
'<td>'.$langs->trans(
"Terminal").
'</td>';
405 print
'<td>'.$langs->trans(
"Year").
'</td>';
406 print
'<td>'.$langs->trans(
"Month").
'</td>';
407 print
'<td>'.$langs->trans(
"Day").
'</td>';
414 print
'<tr class="oddeven">';
415 print
'<td>'.$form->selectarray(
'posmodule', $arrayofposavailable,
GETPOST(
'posmodule',
'alpha'), (count($arrayofposavailable) > 1 ? 1 : 0)).
'</td>';
419 $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
420 for ($i = 1; $i <= $numterminals; $i++) {
423 $selectedposnumber = 0;
425 if ($conf->global->TAKEPOS_NUM_TERMINALS ==
'1') {
426 $selectedposnumber = 1;
429 print $form->selectarray(
'posnumber', $array, GETPOSTISSET(
'posnumber') ?
GETPOST(
'posnumber',
'int') : $selectedposnumber, $showempty);
434 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth75imp" id="'.$prefix.
'year" name="'.$prefix.
'year">';
435 for ($year = $syear - 10; $year < $syear + 10; $year++) {
436 $retstring .=
'<option value="'.$year.
'"'.($year == $syear ?
' selected' :
'').
'>'.$year.
'</option>';
438 $retstring .=
"</select>\n";
443 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth75imp" id="'.$prefix.
'month" name="'.$prefix.
'month">';
444 $retstring .=
'<option value="0"></option>';
445 for ($month = 1; $month <= 12; $month++) {
446 $retstring .=
'<option value="'.$month.
'"'.($month == $smonth ?
' selected' :
'').
'>';
447 $retstring .=
dol_print_date(mktime(12, 0, 0, $month, 1, 2000),
"%b");
448 $retstring .=
"</option>";
450 $retstring .=
"</select>";
455 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth50imp" id="'.$prefix.
'day" name="'.$prefix.
'day">';
456 $retstring .=
'<option value="0" selected> </option>';
457 for ($day = 1; $day <= 31; $day++) {
458 $retstring .=
'<option value="'.$day.
'"'.($day == $sday ?
' selected' :
'').
'>'.$day.
'</option>';
460 $retstring .=
"</select>";
465 if ($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') {
468 print
'<input type="submit" name="add" class="button" value="'.$langs->trans(
"Start").
'">';
475 if (($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') || $action ==
'close') {
476 $posmodule =
GETPOST(
'posmodule',
'alpha');
477 $terminalid =
GETPOST(
'posnumber',
'alpha');
481 print
'<div class="div-table-responsive-no-min">';
482 print
'<table class="noborder centpercent">';
484 print
'<tr class="liste_titre">';
486 print
'<td class="center">'.$langs->trans(
"InitialBankBalance");
498 print
'<tr class="liste_titre">';
500 print
'<td class="center">'.$langs->trans(
"Cash");
536 print
'<td>'.$langs->trans(
"TheoricalAmount").
'</td>';
537 print
'<td class="center">';
538 print
price($initialbalanceforterminal[$terminalid][
'cash']).
'<br>';
554 print
'<td>'.$langs->trans(
"RealAmount").
'</td>';
556 print
'<td class="center">';
558 if ($action ==
'close') {
561 print
'name="opening" type="text" class="maxwidth100 center" value="';
562 if ($action ==
'close') {
564 print $object->opening;
566 print (GETPOSTISSET(
'opening') ?
price2num(
GETPOST(
'opening',
'alpha')) :
price($initialbalanceforterminal[$terminalid][
'cash']));
582 print
'<td class="center">';
583 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
584 if ($action ==
'start') {
585 print
'<input type="submit" name="add" class="button button-save" value="'.$langs->trans(
"Save").
'">';
586 } elseif ($action ==
'close') {
587 print
'<input type="submit" name="valid" class="button" value="'.$langs->trans(
"Validate").
'">';
600if (empty($action) || $action ==
"view" || $action ==
"close") {
601 $result = $object->fetch($id);
604 print $langs->trans(
"ErrorRecordNotFound");
607 $head[0][0] = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id;
608 $head[0][1] = $langs->trans(
"CashControl");
609 $head[0][2] =
'cashcontrol';
611 print
dol_get_fiche_head($head,
'cashcontrol', $langs->trans(
"CashControl"), -1,
'account');
613 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
615 $morehtmlref =
'<div class="refidno">';
616 $morehtmlref .=
'</div>';
619 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
621 print
'<div class="fichecenter">';
622 print
'<div class="fichehalfleft">';
623 print
'<div class="underbanner clearboth"></div>';
624 print
'<table class="border tableforfield" width="100%">';
626 print
'<tr><td class="titlefield nowrap">';
627 print $langs->trans(
"Ref");
632 print
'<tr><td valign="middle">'.$langs->trans(
"Module").
'</td><td>';
633 print $object->posmodule;
636 print
'<tr><td valign="middle">'.$langs->trans(
"Terminal").
'</td><td>';
637 print $object->posnumber;
640 print
'<tr><td class="nowrap">';
641 print $langs->trans(
"Period");
643 print $object->year_close;
644 print ($object->month_close ?
"-" :
"").$object->month_close;
645 print ($object->day_close ?
"-" :
"").$object->day_close;
651 print
'<div class="fichehalfright">';
652 print
'<div class="underbanner clearboth"></div>';
654 print
'<table class="border tableforfield centpercent">';
656 print
'<tr><td class="titlefield nowrap">';
657 print $langs->trans(
"DateCreationShort");
662 print
'<tr><td valign="middle">'.$langs->trans(
"InitialBankBalance").
' - '.$langs->trans(
"Cash").
'</td><td>';
663 print
'<span class="amount">'.price($object->opening, 0, $langs, 1, -1, -1, $conf->currency).
'</span>';
665 foreach ($arrayofpaymentmode as $key => $val) {
666 print
'<tr><td valign="middle">'.$langs->trans($val).
'</td><td>';
667 print
'<span class="amount">'.price($object->$key, 0, $langs, 1, -1, -1, $conf->currency).
'</span>';
673 print
'</div></div>';
674 print
'<div class="clearboth"></div>';
678 if ($action !=
'close') {
679 print
'<div class="tabsAction">';
681 print
'<div class="inline-block divButAction"><a target="_blank" rel="noopener noreferrer" class="butAction" href="report.php?id='.((int) $id).
'">'.$langs->trans(
'PrintTicket').
'</a></div>';
683 if ($object->status == CashControl::STATUS_DRAFT) {
684 print
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.((int) $id).
'&action=close&token='.newToken().
'&contextpage='.$contextpage.
'">'.$langs->trans(
'Close').
'</a></div>';
686 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER[
"PHP_SELF"].
'?id='.((int) $id).
'&action=confirm_delete&token='.newToken().
'">'.$langs->trans(
'Delete').
'</a></div>';
688 print
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.((int) $id).
'&action=reopen&token='.newToken().
'">'.$langs->trans(
'ReOpen').
'</a></div>';
693 if ($contextpage !=
'takepos') {
694 print
'<center><iframe src="report.php?id='.$id.
'" width="60%" height="800"></iframe></center>';
697 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="formclose">';
698 print
'<input type="hidden" name="token" value="'.newToken().
'">';
699 if ($contextpage ==
'takepos') {
700 print
'<input type="hidden" name="contextpage" value="takepos">';
702 if ($action ==
'start' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'-1') {
703 print
'<input type="hidden" name="action" value="add">';
704 } elseif ($action ==
'close') {
705 print
'<input type="hidden" name="action" value="valid">';
706 print
'<input type="hidden" name="id" value="'.$id.
'">';
708 print
'<input type="hidden" name="action" value="start">';
763 if (($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') || $action ==
'close') {
764 $posmodule = $object->posmodule;
765 $terminalid = $object->posnumber;
769 print
'<div class="div-table-responsive-no-min">';
770 print
'<table class="noborder centpercent">';
772 print
'<tr class="liste_titre">';
774 print
'<td class="center">'.$langs->trans(
"InitialBankBalance");
778 print
'<td align="center" class="hide0" colspan="'.count($arrayofpaymentmode).
'">';
779 print $langs->trans(
"AmountAtEndOfPeriod");
784 print
'<tr class="liste_titre">';
786 print
'<td class="center">'.$langs->trans(
"Cash");
790 foreach ($arrayofpaymentmode as $key => $val) {
791 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>'.$langs->trans($val);
801 print
'<td>'.$langs->trans(
"NbOfInvoices").
'</td>';
802 print
'<td class="center">';
806 foreach ($arrayofpaymentmode as $key => $val) {
807 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
808 print $theoricalnbofinvoiceforterminal[$terminalid][$key];
813 print
'<td align="center"></td>';
818 print
'<td>'.$langs->trans(
"TheoricalAmount").
'</td>';
819 print
'<td class="center">';
820 print
price($initialbalanceforterminal[$terminalid][
'cash']).
'<br>';
824 foreach ($arrayofpaymentmode as $key => $val) {
825 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
826 if ($key ==
'cash') {
827 $deltaforcash = ($object->opening - $initialbalanceforterminal[$terminalid][
'cash']);
828 print
price($theoricalamountforterminal[$terminalid][$key] + $deltaforcash).
'<br>';
830 print
price($theoricalamountforterminal[$terminalid][$key]).
'<br>';
836 print
'<td align="center"></td>';
840 print
'<td>'.$langs->trans(
"RealAmount").
'</td>';
842 print
'<td class="center">';
844 if ($action ==
'close') {
847 print
'name="opening" type="text" class="maxwidth100 center" value="';
848 if ($action ==
'close') {
850 print $object->opening;
852 print (GETPOSTISSET(
'opening') ?
price2num(
GETPOST(
'opening',
'alpha')) :
price($initialbalanceforterminal[$terminalid][
'cash']));
858 foreach ($arrayofpaymentmode as $key => $val) {
859 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
861 if ($action ==
'start') {
864 print
'name="'.$key.
'_amount" type="text"'.($key ==
'cash' ?
' autofocus' :
'').
' class="maxwidth100 center" value="'.
GETPOST($key.
'_amount',
'alpha').
'">';
869 print
'<td class="center">';
870 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
871 if ($action ==
'start') {
872 print
'<input type="submit" name="add" class="button button-save" value="'.$langs->trans(
"Save").
'">';
873 } elseif ($action ==
'close') {
874 print
'<input type="submit" name="valid" class="button" value="'.$langs->trans(
"Close").
'">';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage cash fence.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return 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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.