30 require
'../../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/compta/cashcontrol/class/cashcontrol.class.php';
35 $langs->loadLangs(array(
"install",
"cashdesk",
"admin",
"banks"));
39 $action =
GETPOST(
'action',
'aZ09');
48 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
49 $sortfield =
GETPOST(
"sortfield",
'alpha');
50 $sortorder =
GETPOST(
"sortorder",
'alpha');
52 if (empty($page) || $page == -1) { $page = 0; }
53 $offset = $limit * $page;
54 $pageprev = $page - 1;
55 $pagenext = $page + 1;
56 if (!$sortfield) $sortfield =
'rowid';
57 if (!$sortorder) $sortorder =
'ASC';
58 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'thirdpartylist';
60 if ($contextpage ==
'takepos')
62 $_GET[
'optioncss'] =
'print';
66 if (!$user->rights->cashdesk->run && !$user->rights->takepos->run)
71 $arrayofpaymentmode = array(
'cash'=>
'Cash',
'cheque'=>
'Cheque',
'card'=>
'CreditCard');
73 $arrayofposavailable = array();
74 if (!empty($conf->cashdesk->enabled)) $arrayofposavailable[
'cashdesk'] = $langs->trans(
'CashDesk').
' (cashdesk)';
75 if (!empty($conf->takepos->enabled)) $arrayofposavailable[
'takepos'] = $langs->trans(
'TakePOS').
' (takepos)';
82 $extrafields->fetch_name_optionals_label($object->table_element);
85 $hookmanager->initHooks(array(
'cashcontrolcard',
'globalcard'));
88 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
95 $permissiontoadd = ($user->rights->cashdesk->run || $user->rights->takepos->run);
96 $permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run) || ($permissiontoadd && $object->status == 0);
97 if (empty($backtopage)) $backtopage =
dol_buildpath(
'/compta/cashcontrol/cashcontrol_card.php', 1).
'?id='.($id > 0 ? $id :
'__ID__');
98 $backurlforlist =
dol_buildpath(
'/compta/cashcontrol/cashcontrol_list.php', 1);
99 $triggermodname =
'CACHCONTROL_MODIFY';
101 if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH1))
103 setEventMessages($langs->trans(
"CashDesk").
" - ".$langs->trans(
"NotConfigured"), null,
'errors');
107 if (
GETPOST(
'cancel',
'alpha'))
109 if ($action ==
'valid') {
116 if ($action ==
"reopen")
118 $result = $object->setStatut($object::STATUS_DRAFT, null,
'',
'CASHFENCE_REOPEN');
126 if ($action ==
"start")
129 if (!
GETPOST(
'posmodule',
'alpha') ||
GETPOST(
'posmodule',
'alpha') ==
'-1')
131 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Module")), null,
'errors');
135 if (
GETPOST(
'posnumber',
'alpha') ==
'')
137 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CashDesk")), null,
'errors');
141 if (!
GETPOST(
'closeyear',
'alpha') ||
GETPOST(
'closeyear',
'alpha') ==
'-1')
143 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Year")), null,
'errors');
147 } elseif ($action ==
"add")
149 if (
GETPOST(
'opening',
'alpha') ==
'')
151 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"InitialBankBalance")), null,
'errors');
156 foreach ($arrayofpaymentmode as $key=>$val)
163 $object->day_close =
GETPOST(
'closeday',
'int');
164 $object->month_close =
GETPOST(
'closemonth',
'int');
165 $object->year_close =
GETPOST(
'closeyear',
'int');
168 $object->posmodule =
GETPOST(
'posmodule',
'alpha');
169 $object->posnumber =
GETPOST(
'posnumber',
'alpha');
173 $id = $object->create($user);
184 if ($contextpage ==
'takepos') {
187 parent.location.href='../../takepos/index.php?place='+parent.place;
193 if ($action ==
"valid")
209 $result = $object->update($user);
211 $result = $object->valid($user);
222 if ($contextpage ==
'takepos') {
225 parent.location.href='../../takepos/index.php?place='+parent.place;
233 if ($action ==
'confirm_delete' && !empty($permissiontodelete))
237 if (!($object->id > 0))
239 dol_print_error(
'',
'Error, object must be fetched before being deleted');
243 $result = $object->delete($user);
249 header(
"Location: ".$backurlforlist);
252 if (!empty($object->errors))
setEventMessages(null, $object->errors,
'errors');
262 $form =
new Form($db);
264 $initialbalanceforterminal = array();
265 $theoricalamountforterminal = array();
266 $theoricalnbofinvoiceforterminal = array();
268 if ($action ==
"create" || $action ==
"start" || $action ==
'close')
270 if ($action ==
'close') {
271 $posmodule = $object->posmodule;
272 $terminalid = $object->posnumber;
273 $terminaltouse = $terminalid;
275 $syear = $object->year_close;
276 $smonth = $object->month_close;
277 $sday = $object->day_close;
278 } elseif (
GETPOST(
'posnumber',
'alpha') !=
'' &&
GETPOST(
'posnumber',
'alpha') !=
'' &&
GETPOST(
'posnumber',
'alpha') !=
'-1')
280 $posmodule =
GETPOST(
'posmodule',
'alpha');
281 $terminalid =
GETPOST(
'posnumber',
'alpha');
282 $terminaltouse = $terminalid;
284 if ($terminaltouse ==
'1' && $posmodule ==
'cashdesk') $terminaltouse =
'';
286 if ($posmodule ==
'cashdesk' && $terminaltouse !=
'' && $terminaltouse !=
'1') {
288 setEventMessages($langs->trans(
"OnlyTerminal1IsAvailableForCashDeskModule"), null,
'errors');
293 if ($terminalid !=
'')
296 foreach ($arrayofpaymentmode as $key => $val)
300 $initialbalanceforterminal[$terminalid][$key] = 0;
305 $vartouse =
'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse;
306 $bankid = $conf->global->$vartouse;
310 $sql =
"SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX.
"bank";
311 $sql .=
" WHERE fk_account = ".$bankid;
312 if ($syear && !$smonth) $sql .=
" AND dateo < '".$db->idate(
dol_get_first_day($syear, 1)).
"'";
313 elseif ($syear && $smonth && !$sday) $sql .= " AND dateo < '".$db->idate(
dol_get_first_day($syear, $smonth))."'";
314 elseif ($syear && $smonth && $sday) $sql .= " AND dateo < '".$db->idate(
dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
317 $resql = $db->query($sql);
320 $obj = $db->fetch_object($resql);
321 if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total;
324 setEventMessages($langs->trans(
"SetupOfTerminalNotComplete", $terminaltouse), null,
'errors');
330 foreach ($arrayofpaymentmode as $key => $val)
332 $sql =
"SELECT SUM(pf.amount) as total, COUNT(*) as nb";
333 $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";
334 $sql .=
" WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement";
335 $sql .=
" AND f.module_source = '".$db->escape($posmodule).
"'";
336 $sql .=
" AND f.pos_source = '".$db->escape($terminalid).
"'";
337 $sql .=
" AND f.paye = 1";
338 $sql .=
" AND p.entity IN (".getEntity(
'facture').
")";
339 if ($key ==
'cash') $sql .=
" AND cp.code = 'LIQ'";
340 elseif ($key ==
'cheque') $sql .= " AND cp.
code = 'CHQ'";
341 elseif ($key == 'card') $sql .= " AND cp.
code = 'CB'";
347 elseif ($syear && $smonth && !$sday) $sql .= " AND datef BETWEEN '".$db->idate(
dol_get_first_day($syear, $smonth))."' AND '".$db->idate(
dol_get_last_day($syear, $smonth))."'";
348 elseif ($syear && $smonth && $sday) $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))."'";
349 else dol_print_error('', 'Year not defined');
351 $resql = $db->query($sql);
354 $theoricalamountforterminal[$terminalid][$key] = $initialbalanceforterminal[$terminalid][$key];
356 $obj = $db->fetch_object($resql);
359 $theoricalamountforterminal[$terminalid][$key] =
price2num($theoricalamountforterminal[$terminalid][$key] + $obj->total);
360 $theoricalnbofinvoiceforterminal[$terminalid][$key] = $obj->nb;
367 if ($action !=
'close') {
370 print load_fiche_titre($langs->trans(
"CashControl").
" - ".$langs->trans(
"New"),
'',
'cash-register');
372 print '<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
373 print '<input type="hidden" name="token" value="'.newToken().
'">';
374 if ($contextpage ==
'takepos')
print '<input type="hidden" name="contextpage" value="takepos">';
375 if ($action ==
'start' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'-1')
377 print '<input type="hidden" name="action" value="add">';
378 } elseif ($action ==
'close')
380 print '<input type="hidden" name="action" value="valid">';
381 print '<input type="hidden" name="id" value="'.$id.
'">';
383 print '<input type="hidden" name="action" value="start">';
386 print '<div class="div-table-responsive-no-min">';
387 print '<table class="noborder centpercent">';
388 print '<tr class="liste_titre">';
389 print '<td>'.$langs->trans(
"Module").
'</td>';
390 print '<td>'.$langs->trans(
"Terminal").
'</td>';
391 print '<td>'.$langs->trans(
"Year").
'</td>';
392 print '<td>'.$langs->trans(
"Month").
'</td>';
393 print '<td>'.$langs->trans(
"Day").
'</td>';
400 print '<tr class="oddeven">';
401 print '<td>'.$form->selectarray(
'posmodule', $arrayofposavailable,
GETPOST(
'posmodule',
'alpha'), (count($arrayofposavailable) > 1 ? 1 : 0)).
'</td>';
405 $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
406 for ($i = 1; $i <= $numterminals; $i++) {
409 $selectedposnumber = 0; $showempty = 1;
410 if ($conf->global->TAKEPOS_NUM_TERMINALS ==
'1')
412 $selectedposnumber = 1; $showempty = 0;
414 print $form->selectarray(
'posnumber', $array,
GETPOSTISSET(
'posnumber') ?
GETPOST(
'posnumber',
'int') : $selectedposnumber, $showempty);
419 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth75imp" id="'.$prefix.
'year" name="'.$prefix.
'year">';
420 for ($year = $syear - 10; $year < $syear + 10; $year++)
422 $retstring .=
'<option value="'.$year.
'"'.($year == $syear ?
' selected' :
'').
'>'.$year.
'</option>';
424 $retstring .=
"</select>\n";
429 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth75imp" id="'.$prefix.
'month" name="'.$prefix.
'month">';
430 $retstring .=
'<option value="0"></option>';
431 for ($month = 1; $month <= 12; $month++)
433 $retstring .=
'<option value="'.$month.
'"'.($month == $smonth ?
' selected' :
'').
'>';
434 $retstring .=
dol_print_date(mktime(12, 0, 0, $month, 1, 2000),
"%b");
435 $retstring .=
"</option>";
437 $retstring .=
"</select>";
442 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth50imp" id="'.$prefix.
'day" name="'.$prefix.
'day">';
443 $retstring .=
'<option value="0" selected> </option>';
444 for ($day = 1; $day <= 31; $day++)
446 $retstring .=
'<option value="'.$day.
'"'.($day == $sday ?
' selected' :
'').
'>'.$day.
'</option>';
448 $retstring .=
"</select>";
453 if ($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1')
457 print '<input type="submit" name="add" class="button" value="'.$langs->trans(
"Start").
'">';
464 if (($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') || $action ==
'close')
466 $posmodule =
GETPOST(
'posmodule',
'alpha');
467 $terminalid =
GETPOST(
'posnumber',
'alpha');
471 print '<div class="div-table-responsive-no-min">';
472 print '<table class="noborder centpercent">';
474 print '<tr class="liste_titre">';
476 print '<td class="center">'.$langs->trans(
"InitialBankBalance");
488 print '<tr class="liste_titre">';
490 print '<td class="center">'.$langs->trans(
"Cash");
526 print '<td>'.$langs->trans(
"TheoricalAmount").
'</td>';
527 print '<td class="center">';
528 print price($initialbalanceforterminal[$terminalid][
'cash']).
'<br>';
544 print '<td>'.$langs->trans(
"RealAmount").
'</td>';
546 print '<td class="center">';
548 if ($action ==
'close')
print 'disabled ';
549 print 'name="opening" type="text" class="maxwidth100 center" value="';
550 if ($action ==
'close')
553 print $object->opening;
569 print '<td class="center">';
570 print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
571 if ($action ==
'start')
print '<input type="submit" name="add" class="button button-save" value="'.$langs->trans(
"Save").
'">';
572 elseif ($action ==
'close')
print '<input
type="submit"
name="valid" class="button" value="'.$langs->trans("Validate").'">';
584 if (empty($action) || $action == "view" || $action == "close")
586 $result = $object->fetch($id);
588 llxHeader(
'', $langs->trans(
"CashControl"));
591 print $langs->trans(
"ErrorRecordNotFound");
594 $head[0][0] = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id;
595 $head[0][1] = $langs->trans(
"CashControl");
596 $head[0][2] =
'cashcontrol';
600 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
602 $morehtmlref =
'<div class="refidno">';
603 $morehtmlref .=
'</div>';
606 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
608 print '<div class="fichecenter">';
609 print '<div class="fichehalfleft">';
610 print '<div class="underbanner clearboth"></div>';
611 print '<table class="border tableforfield" width="100%">';
613 print '<tr><td class="titlefield nowrap">';
614 print $langs->trans(
"Ref");
619 print '<tr><td valign="middle">'.$langs->trans(
"Module").
'</td><td>';
620 print $object->posmodule;
623 print '<tr><td valign="middle">'.$langs->trans(
"Terminal").
'</td><td>';
624 print $object->posnumber;
627 print '<tr><td class="nowrap">';
628 print $langs->trans(
"Period");
630 print $object->year_close;
631 print ($object->month_close ?
"-" :
"").$object->month_close;
632 print ($object->day_close ?
"-" :
"").$object->day_close;
638 print '<div class="fichehalfright"><div class="ficheaddleft">';
639 print '<div class="underbanner clearboth"></div>';
640 print '<table class="border tableforfield" width="100%">';
642 print '<tr><td class="titlefield nowrap">';
643 print $langs->trans(
"DateCreationShort");
648 print '<tr><td valign="middle">'.$langs->trans(
"InitialBankBalance").
' - '.$langs->trans(
"Cash").
'</td><td>';
649 print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency);
651 foreach ($arrayofpaymentmode as $key => $val)
653 print '<tr><td valign="middle">'.$langs->trans($val).
'</td><td>';
654 print price($object->$key, 0, $langs, 1, -1, -1, $conf->currency);
660 print '</div></div>';
661 print '<div style="clear:both"></div>';
665 if ($action !=
'close') {
666 print '<div class="tabsAction">';
668 print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="report.php?id='.$id.
'">'.$langs->trans(
'PrintTicket').
'</a></div>';
670 if ($object->status == CashControl::STATUS_DRAFT)
672 print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$id.
'&action=close&contextpage='.$contextpage.
'">'.$langs->trans(
'Close').
'</a></div>';
674 print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$id.
'&action=confirm_delete">'.$langs->trans(
'Delete').
'</a></div>';
676 print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$id.
'&action=reopen">'.$langs->trans(
'ReOpen').
'</a></div>';
681 if ($contextpage !=
'takepos')
print '<center><iframe src="report.php?id='.$id.
'" width="60%" height="800"></iframe></center>';
683 print '<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="formclose">';
684 print '<input type="hidden" name="token" value="'.newToken().
'">';
685 if ($contextpage ==
'takepos')
print '<input type="hidden" name="contextpage" value="takepos">';
686 if ($action ==
'start' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'' &&
GETPOST(
'posnumber',
'int') !=
'-1')
688 print '<input type="hidden" name="action" value="add">';
689 } elseif ($action ==
'close')
691 print '<input type="hidden" name="action" value="valid">';
692 print '<input type="hidden" name="id" value="'.$id.
'">';
694 print '<input type="hidden" name="action" value="start">';
749 if (($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') || $action ==
'close')
751 $posmodule = $object->posmodule;
752 $terminalid = $object->posnumber;
756 print '<div class="div-table-responsive-no-min">';
757 print '<table class="noborder centpercent">';
759 print '<tr class="liste_titre">';
761 print '<td class="center">'.$langs->trans(
"InitialBankBalance");
765 print '<td align="center" class="hide0" colspan="'.count($arrayofpaymentmode).
'">';
766 print $langs->trans(
"AmountAtEndOfPeriod");
771 print '<tr class="liste_titre">';
773 print '<td class="center">'.$langs->trans(
"Cash");
777 foreach ($arrayofpaymentmode as $key => $val)
779 print '<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>'.$langs->trans($val);
789 print '<td>'.$langs->trans(
"NbOfInvoices").
'</td>';
790 print '<td class="center">';
794 foreach ($arrayofpaymentmode as $key => $val)
796 print '<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
797 print $theoricalnbofinvoiceforterminal[$terminalid][$key];
802 print '<td align="center"></td>';
807 print '<td>'.$langs->trans(
"TheoricalAmount").
'</td>';
808 print '<td class="center">';
809 print price($initialbalanceforterminal[$terminalid][
'cash']).
'<br>';
813 foreach ($arrayofpaymentmode as $key => $val)
815 print '<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
816 if ($key ==
'cash') {
817 $deltaforcash = ($object->opening - $initialbalanceforterminal[$terminalid][
'cash']);
818 print price($theoricalamountforterminal[$terminalid][$key] + $deltaforcash).
'<br>';
820 print price($theoricalamountforterminal[$terminalid][$key]).
'<br>';
826 print '<td align="center"></td>';
830 print '<td>'.$langs->trans(
"RealAmount").
'</td>';
832 print '<td class="center">';
834 if ($action ==
'close')
print 'disabled ';
835 print 'name="opening" type="text" class="maxwidth100 center" value="';
836 if ($action ==
'close')
839 print $object->opening;
845 foreach ($arrayofpaymentmode as $key => $val)
847 print '<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
849 if ($action ==
'start') print
'disabled ';
850 print
'name="'.$key.
'_amount" type="text"'.($key ==
'cash' ?
' autofocus' :
'').
' class="maxwidth100 center" value="'.
GETPOST($key.
'_amount',
'alpha').
'">';
855 print
'<td class="center">';
856 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
857 if ($action ==
'start') print
'<input type="submit" name="add" class="button button-save" value="'.$langs->trans(
"Save").
'">';
858 elseif ($action ==
'close') print '<input
type="submit"
name="valid" class="button" value="'.$langs->trans("Close").'">';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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...
if(!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'] country if(!empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'] typent code
dol_now($mode= 'auto')
Return date for now.
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.
$conf db name
Only used if Module[ID]Name translation string is not found.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
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.
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.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type