39require
'../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/multicurrency.lib.php';
45$langs->loadLangs(array(
'admin',
'multicurrency'));
48$action =
GETPOST(
'action',
'alpha');
49$massaction =
GETPOST(
'massaction',
'alpha');
51$confirm =
GETPOST(
'confirm',
'alpha');
52$toselect =
GETPOST(
'toselect',
'array');
54$sall = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
57$search_rate =
GETPOST(
'search_rate',
'alpha');
58$search_rate_indirect =
GETPOST(
'search_rate_indirect',
'alpha');
59$search_code =
GETPOST(
'search_code',
'alpha');
60$multicurrency_code =
GETPOST(
'multicurrency_code',
'alpha');
63$rateindirectinput = (float)
price2num(
GETPOST(
'rateinidirectinput',
'alpha'));
64$optioncss =
GETPOST(
'optioncss',
'alpha');
67if (empty($page) || $page == -1) {
70$offset = $limit * $page;
73$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
74$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
76 $sortfield =
"cr.date_sync";
92$hookmanager->initHooks(array(
'EditorRatelist',
'globallist'));
99$fieldstosearchall = array(
100 'cr.date_sync' =>
"date_sync",
102 'cr.rate_indirect' =>
"rate_indirect",
108 'cr.date_sync' => array(
'label' =>
'Date',
'checked' => 1),
109 'cr.rate' => array(
'label' =>
'Rate',
'checked' => 1),
110 'cr.rate_indirect' => array(
'label' =>
'RateIndirect',
'checked' => 0,
'enabled' => (!
getDolGlobalString(
'MULTICURRENCY_USE_RATE_INDIRECT') ? 0 : 1)),
111 'm.code' => array(
'label' =>
'Code',
'checked' => 1),
117'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
122if (!$user->admin || !isModEnabled(
"multicurrency")) {
133if ($action ==
"create" && $user->hasRight(
'multicurrency',
'currency',
'read')) {
134 if (empty($multicurrency_code) || $multicurrency_code ==
'-1') {
135 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"Currency")),
null,
"errors");
138 if ($rateinput == 0) {
141 } elseif (empty($rateinput)) {
142 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"Rate")),
null,
"errors");
149 $fk_currency = $currency_static->getIdFromCode($db, $multicurrency_code);
151 $currencyRate_static->fk_multicurrency = $fk_currency;
152 $currencyRate_static->entity = $conf->entity;
153 $currencyRate_static->date_sync = $dateinput;
154 $currencyRate_static->rate = $rateinput;
155 $currencyRate_static->rate_indirect = $rateindirectinput;
157 $result = $currencyRate_static->create($user, intval($fk_currency));
159 setEventMessages($langs->trans(
'successRateCreate', $multicurrency_code),
null);
161 dol_syslog(
"currencyRate:createRate", LOG_WARNING);
162 setEventMessages($currencyRate_static->error, $currencyRate_static->errors,
'errors');
167if ($action ==
'update' && $user->hasRight(
'multicurrency',
'currency',
'read')) {
169 $result = $currencyRate->fetch($id_rate_selected);
172 $fk_currency = $currency_static->getIdFromCode($db, $multicurrency_code);
173 $currencyRate->date_sync = $dateinput;
174 $currencyRate->fk_multicurrency = $fk_currency;
175 $currencyRate->rate = $rateinput;
176 $res = $currencyRate->update($user);
187if ($action ==
"deleteRate" && $user->hasRight(
'multicurrency',
'currency',
'read')) {
189 $current_rate->fetch((
int) $id_rate_selected);
193 $current_currency->fetch($current_rate->fk_multicurrency);
194 if ($current_currency) {
195 $delayedhtmlcontent = $form->formconfirm(
196 $_SERVER[
"PHP_SELF"].
'?id_rate='.$id_rate_selected,
197 $langs->trans(
'DeleteLineRate'),
198 $langs->trans(
'ConfirmDeleteLineRate', $current_rate->rate, $current_currency->name, $current_rate->date_sync),
205 dol_syslog(
"Multicurrency::fetch", LOG_WARNING);
212if ($action ==
"confirm_delete" && $user->hasRight(
'multicurrency',
'currency',
'read')) {
214 $current_rate->fetch((
int) $id_rate_selected);
216 $result = $current_rate->delete($user);
223 setEventMessages($langs->trans(
'NoCurrencyRateSelected'),
null,
"warnings");
224 dol_syslog($langs->trans(
'NoCurrencyRateSelected'), LOG_WARNING);
229if (
GETPOST(
'cancel',
'alpha')) {
233if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
237$parameters = array();
238$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
242if (empty($reshook)) {
244 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
247 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
249 $search_date_sync =
"";
250 $search_date_sync_end =
"";
253 $search_array_options = array();
257 $objectclass =
"CurrencyRate";
258 $uploaddir = $conf->multicurrency->multidir_output;
259 $permissiontoread = $user->admin;
260 $permissiontodelete = $user->admin;
261 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
269$form =
new Form($db);
271$title = $langs->trans(
"CurrencyRate");
272$page_name =
"MultiCurrencySetup";
277$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
282print
dol_get_fiche_head($head,
'ratelist', $langs->trans(
"ModuleSetup"), -1,
"multicurrency");
286if (!in_array($action, array(
"updateRate",
"deleteRate"))) {
287 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post" name="formulaire">';
288 print
'<input type="hidden" name="token" value="'.newToken().
'">';
290 print
'<div class="div-table-responsive-no-min">';
291 print
'<table class="noborder centpercent"><tr>';
293 print
' <td>'.$langs->trans(
'Date').
'</td>';
295 print $form->selectDate($dateinput,
'dateinput', 0, 0, 1,
'', 1, 1);
298 print
'<td> '.$langs->trans(
'Currency').
'</td>';
299 print
'<td>'.$form->selectMultiCurrency((GETPOSTISSET(
'multicurrency_code') ?
GETPOST(
'multicurrency_code',
'alpha') : $multicurrency_code),
'multicurrency_code', 1,
" code != '".$db->escape($conf->currency).
"'", true).
'</td>';
301 print
' <td>'.$langs->trans(
'Rate').
' / '.$langs->getCurrencySymbol($conf->currency).
'</td>';
302 print
' <td><input type="text" min="0" step="any" class="maxwidth75" id="rateinput" name="rateinput" value="'.dol_escape_htmltag((
string) $rateinput).
'"></td>';
305 print
' <td>'.$langs->trans(
'RateIndirect').
' / '.$langs->getCurrencySymbol($conf->currency).
'</td>';
306 print
' <td><input type="text" min="0" step="any" class="maxwidth75" id="rateindirectinput" name="rateindirectinput" value="'.dol_escape_htmltag((
string) $rateindirectinput).
'"></td>';
308 print
'<script type="text/javascript">';
309 print
'jQuery(document).ready(function () {
311 jQuery("#rateindirectinput").keyup(function () {
312 var valindirect = jQuery(this).val();
313 valdirect = 1 / parseFloat(valindirect);
314 jQuery("#rateinput").val(valdirect);
315 console.log("Rate Direct:"+valdirect)
322 print
'<input type="hidden" name="action" value="create">';
323 print
'<input type="submit" class="button button-add small" name="btnCreateCurrencyRate" value="'.$langs->trans(
'CreateRate').
'">';
326 print
'</tr></table>';
337$sql =
'SELECT cr.rowid, cr.date_sync, cr.rate, cr.rate_indirect, cr.entity, m.code, m.name';
339$parameters = array();
340$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
341$sql .= $hookmanager->resPrint;
342$sql .=
' FROM '.MAIN_DB_PREFIX.
'multicurrency_rate as cr ';
343$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"multicurrency AS m ON cr.fk_multicurrency = m.rowid";
347if ($search_date_sync && $search_date_sync_end) {
348 $sql .=
" AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync).
"' AND '".$db->idate($search_date_sync_end).
"')";
349} elseif ($search_date_sync && !$search_date_sync_end) {
350 $sql .=
natural_search(
'cr.date_sync', $db->idate($search_date_sync));
358$sql .=
" WHERE m.code <> '".$db->escape($conf->currency).
"'";
361$parameters = array();
362$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
363$sql .= $hookmanager->resPrint;
364$sql .=
" GROUP BY cr.rowid, cr.date_sync, cr.rate, cr.rate_indirect, m.code, cr.entity, m.code, m.name";
367$parameters = array();
368$reshook = $hookmanager->executeHooks(
'printFieldSelect', $parameters);
369$sql .= $hookmanager->resPrint;
371$sql .= $db->order($sortfield, $sortorder);
374$nbtotalofrecords =
'';
376 $result = $db->query($sql);
379 $nbtotalofrecords = $db->num_rows($result);
380 if (($page * $limit) > $nbtotalofrecords) {
385 setEventMessage($langs->trans(
'No_record_on_multicurrency_rate'),
'warnings');
389$sql .= $db->plimit($limit + 1, $offset);
391$resql = $db->query($sql);
393 $num = $db->num_rows($resql);
394 $arrayofselected = is_array($toselect) ? $toselect : array();
397 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
398 $param .=
'&contextpage='.urlencode($contextpage);
400 if ($limit > 0 && $limit != $conf->liste_limit) {
401 $param .=
'&limit='.((int) $limit);
404 $param .=
"&sall=".urlencode($sall);
407 if ($search_date_sync) {
408 $param =
"&search_date_sync=".$search_date_sync;
410 if ($search_date_sync_end) {
411 $param =
"&search_date_sync_end=".$search_date_sync_end;
414 $param =
"&search_rate=".urlencode($search_rate);
416 if ($search_code !=
'') {
417 $param .=
"&search_code=".urlencode($search_code);
421 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
424 $arrayofmassactions[
'predelete'] = $langs->trans(
"Delete");
426 if (in_array($massaction, array(
'presend',
'predelete'))) {
427 $arrayofmassactions = array();
429 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
431 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST" name="formulaire">';
432 if ($optioncss !=
'') {
433 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
435 print
'<input type="hidden" name="token" value="'.newToken().
'">';
436 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
437 print
'<input type="hidden" name="action" value="list">';
438 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
439 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
440 print
'<input type="hidden" name="page" value="'.$page.
'">';
441 print
'<input type="hidden" name="type" value="'.$type.
'">';
443 print_barre_liste($texte, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'title_currency.png', 0, $newcardbutton,
'', $limit);
445 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
448 foreach ($fieldstosearchall as $key => $val) {
449 $fieldstosearchall[$key] = $langs->trans($val);
451 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).implode(
', ', $fieldstosearchall).
'</div>';
458 $parameters = array();
459 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
460 if (empty($reshook)) {
461 $moreforfilter .= $hookmanager->resPrint;
463 $moreforfilter = $hookmanager->resPrint;
466 if ($moreforfilter) {
467 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
468 print $moreforfilter;
472 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
473 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
474 if ($massactionbutton) {
475 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
478 print
'<div class="div-table-responsive">';
479 print
'<table class="tagtable centpercent nomarginbottom liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
482 print
'<tr class="liste_titre_filter">';
486 print
'<td class="liste_titre center">';
487 $searchpicto = $form->showFilterButtons();
492 if (!empty($arrayfields[
'cr.date_sync'][
'checked'])) {
493 print
'<td class="liste_titre" align="left">';
494 print $form->selectDate(
dol_print_date($search_date_sync,
"%Y-%m-%d"),
'search_date_sync', 0, 0, 1);
495 print $form->selectDate(
dol_print_date($search_date_sync_end,
"%Y-%m-%d"),
'search_date_sync_end', 0, 0, 1);
499 if (!empty($arrayfields[
'm.code'][
'checked'])) {
500 print
'<td class="liste_titre" align="left">';
501 print $form->selectMultiCurrency($multicurrency_code,
'search_code', 1,
" code != '".$conf->currency.
"'",
true);
505 if (!empty($arrayfields[
'cr.rate'][
'checked'])) {
506 print
'<td class="liste_titre" align="left">';
507 print
'<input class="flat maxwidth75" type="text" name="search_rate" value="'.dol_escape_htmltag($search_rate).
'">';
512 $parameters = array(
'arrayfields' => $arrayfields);
513 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
514 print $hookmanager->resPrint;
518 print
'<td class="liste_titre center">';
519 $searchpicto = $form->showFilterButtons();
525 print
'<tr class="liste_titre">';
528 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'maxwidthsearch center ');
530 if (!empty($arrayfields[
'cr.date_sync'][
'checked'])) {
532 print_liste_field_titre($arrayfields[
'cr.date_sync'][
'label'], $_SERVER[
"PHP_SELF"],
"cr.date_sync",
"", $param,
"", $sortfield, $sortorder);
534 if (!empty($arrayfields[
'm.code'][
'checked'])) {
535 print_liste_field_titre($arrayfields[
'm.code'][
'label'], $_SERVER[
"PHP_SELF"],
"m.code",
"", $param,
"", $sortfield, $sortorder);
537 if (!empty($arrayfields[
'cr.rate'][
'checked'])) {
538 print_liste_field_titre($arrayfields[
'cr.rate'][
'label'], $_SERVER[
"PHP_SELF"],
"cr.rate",
"", $param,
"", $sortfield, $sortorder);
542 $parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
543 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
544 print $hookmanager->resPrint;
547 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch center ');
552 $totalarray = array();
553 $totalarray[
'nbfield'] = 0;
554 while ($i < min($num, $limit)) {
555 $obj = $db->fetch_object($resql);
557 print
'<tr class="oddeven">';
560 if ($action ==
"updateRate" && $obj->rowid == $id_rate_selected) {
562 print
'<td class="center">';
565 print
'<td><input class="minwidth200" name="dateinput" value="'. date(
'Y-m-d',
dol_stringtotime($obj->date_sync)) .
'" type="date"></td>';
566 print
'<td>' . $form->selectMultiCurrency($obj->code,
'multicurrency_code', 1,
" code != '".$conf->currency.
"'",
true) .
'</td>';
567 print
'<td><input type="text" min="0" step="any" class="maxwidth100" name="rateinput" value="' .
dol_escape_htmltag($obj->rate) .
'">';
568 print
'<input type="hidden" name="page" value="'.dol_escape_htmltag((
string) $page).
'">';
569 print
'<input type="hidden" name="id_rate" value="'.dol_escape_htmltag($obj->rowid).
'">';
570 print
'<button type="submit" class="button small reposition" name="action" value="update">'.$langs->trans(
"Modify").
'</button>';
571 print
'<button type="submit" class="button small reposition" name="action" value="cancel">'.$langs->trans(
"Cancel").
'</button>';
574 print
'<td class="center">';
580 print
'<td class="nowrap center">';
581 if ($massactionbutton || $massaction) {
583 if (in_array($obj->rowid, $arrayofselected)) {
586 print
'<a class="editfielda marginleftonly marginrightonly reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=updateRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'edit',
'edit').
'</a>';
587 print
'<a class="marginleftonly marginrightonly reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deleteRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'delete',
'delete').
'</a>';
588 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
592 $totalarray[
'nbfield']++;
597 if (!empty($arrayfields[
'cr.date_sync'][
'checked'])) {
598 print
'<td class="tdoverflowmax200">';
599 print $obj->date_sync;
602 $totalarray[
'nbfield']++;
607 if (!empty($arrayfields[
'm.code'][
'checked'])) {
608 print
'<td class="tdoverflowmax200">';
610 print
' - <span class="opacitymedium">'.$obj->name.
'</span>';
614 $totalarray[
'nbfield']++;
619 if (!empty($arrayfields[
'cr.rate'][
'checked'])) {
620 print
'<td class="tdoverflowmax200">';
624 $totalarray[
'nbfield']++;
629 if (!empty($arrayfields[
'cr.rate_indirect'][
'checked'])) {
630 print
'<td class="tdoverflowmax200">';
631 print $obj->rate_indirect;
634 $totalarray[
'nbfield']++;
640 $parameters = array(
'arrayfields' => $arrayfields,
'obj' => $obj);
641 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
642 print $hookmanager->resPrint;
646 print
'<td class="nowrap center">';
647 if ($massactionbutton || $massaction) {
649 if (in_array($obj->rowid, $arrayofselected)) {
652 print
'<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=updateRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'edit',
'edit').
'</a>';
653 print
'<a class="marginleftonly marginrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=deleteRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'delete',
'delete').
'</a>';
654 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
658 $totalarray[
'nbfield']++;
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
dol_stringtotime($string, $gm=1)
Convert a string date into a GM Timestamps date Warning: YYYY-MM-DDTHH:MM:SS+02:00 (RFC3339) is not s...
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
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)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
setEventMessage($mesgs, $style='mesgs', $noduplicate=0, $attop=0)
Set event message in dol_events session object.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
multicurrencyAdminPrepareHead()
Prepare array with list of tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.