dolibarr 25.0.0-alpha
multicurrency.php
Go to the documentation of this file.
1<?php
2/* <one line to give the program's name and a brief idea of what it does.>
3 * Copyright (C) 2015 ATM Consulting <support@atm-consulting.fr>
4 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
5 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Dolibarr environment
28require '../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
32
41// Load translation files required by the page
42$langs->loadLangs(array('admin', 'multicurrency'));
43
44// Access control
45if (!$user->admin || !isModEnabled('multicurrency')) {
47}
48
49// Parameters
50$action = GETPOST('action', 'aZ09');
51
52$multicurrency = new MultiCurrency($db);
53
54
55/*
56 * Actions
57 */
58
59$reg = array();
60if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
61 $code = $reg[1];
62 $value = GETPOST($code, 'alpha');
63 if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) {
64 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
65 } else {
66 setEventMessages($langs->trans("Error"), null, 'errors');
67 }
68}
69
70if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
71 $code = $reg[1];
72 if (dolibarr_del_const($db, $code, 0) > 0) {
73 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
74 } else {
75 setEventMessages($langs->trans("Error"), null, 'errors');
76 }
77}
78
79if ($action == 'add_currency') { // Manual insertion of a rate
80 $error = 0;
81
82 $langs->loadCacheCurrencies('');
83
84 $code = GETPOST('code', 'alpha');
85 $rate = price2num(GETPOST('rate', 'alpha'));
86 $currency = new MultiCurrency($db);
87 $currency->code = $code;
88 $currency->name = !empty($langs->cache_currencies[$code]['label']) ? $langs->cache_currencies[$code]['label'].' ('.$langs->getCurrencySymbol($code).')' : $code;
89
90 if (empty($currency->code) || $currency->code == '-1') {
91 setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Currency")), null, 'errors');
92 $error++;
93 }
94 if (empty($rate)) {
95 setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Rate")), null, 'errors');
96 $error++;
97 }
98
99 if (!$error) {
100 if ($currency->create($user) > 0) {
101 if ($currency->addRate((float) $rate)) {
102 setEventMessages($langs->trans('RecordSaved'), array());
103 } else {
104 setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors');
105 }
106 } else {
107 setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors');
108 }
109 }
110} elseif ($action == 'update_currency') { // Manual update of rate
111 $error = 0;
112
113 if (GETPOST('updatecurrency', 'alpha')) {
114 $fk_multicurrency = GETPOSTINT('fk_multicurrency');
115 $rate = price2num(GETPOST('rate', 'alpha'));
116 $currency = new MultiCurrency($db);
117
118 if (empty($rate)) {
119 setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Rate")), null, 'errors');
120 $error++;
121 }
122 if (!$error) {
123 if ($currency->fetch($fk_multicurrency) > 0) {
124 $result = $currency->updateRate((float) $rate);
125 if ($result < 0) {
126 setEventMessages(null, $currency->errors, 'errors');
127 }
128 }
129 }
130 } elseif (GETPOST('deletecurrency', 'alpha')) {
131 $fk_multicurrency = GETPOSTINT('fk_multicurrency');
132 $currency = new MultiCurrency($db);
133
134 if ($currency->fetch($fk_multicurrency) > 0) {
135 if ($currency->delete($user) > 0) {
136 setEventMessages($langs->trans('RecordDeleted'), array());
137 } else {
138 setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors');
139 }
140 }
141 }
142} elseif ($action == 'setapilayer') { // Update rate from currencylayer
143 if (GETPOSTISSET('modify_apilayer')) {
144 // Save setup
145 dolibarr_set_const($db, 'MULTICURRENCY_APP_PROVIDER', GETPOST('MULTICURRENCY_APP_PROVIDER', 'aZ09'), 'chaine', 0, '', $conf->entity);
146 dolibarr_set_const($db, 'MULTICURRENCY_APP_KEY', GETPOST('MULTICURRENCY_APP_KEY', 'alpha'), 'chaine', 0, '', $conf->entity);
147 dolibarr_set_const($db, 'MULTICURRENCY_APP_SOURCE', GETPOST('MULTICURRENCY_APP_SOURCE', 'alpha'), 'chaine', 0, '', $conf->entity);
148 dolibarr_set_const($db, 'MULTICURRENCY_APP_ENDPOINT', GETPOST('MULTICURRENCY_APP_ENDPOINT', 'alpha'), 'chaine', 0, '', $conf->entity);
149 //dolibarr_set_const($db, 'MULTICURRENCY_ALTERNATE_SOURCE', GETPOST('MULTICURRENCY_ALTERNATE_SOURCE', 'alpha'), 'chaine', 0, '', $conf->entity);
150
151 setEventMessages($langs->trans("SetupSaved"), null);
152 } else {
153 // Run the update o currency rate (this may updates database)
154 $result = $multicurrency->syncRates(0, 0, '');
155 if ($result > 0) {
156 setEventMessages($langs->trans("CurrencyRateSyncSucceed"), null, "mesgs");
157 } else {
158 setEventMessages($multicurrency->output, null, 'errors');
159 }
160 }
161}
162
163
164$TAvailableCurrency = array();
165$sql = "SELECT code_iso, label, unicode, active FROM ".MAIN_DB_PREFIX."c_currencies";
166$resql = $db->query($sql);
167if ($resql) {
168 while ($obj = $db->fetch_object($resql)) {
169 $TAvailableCurrency[$obj->code_iso] = array('code' => $obj->code_iso, 'active' => $obj->active);
170 }
171}
172
173$TCurrency = array();
174$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."multicurrency WHERE entity = ".((int) $conf->entity);
175$resql = $db->query($sql);
176if ($resql) {
177 while ($obj = $db->fetch_object($resql)) {
178 $currency = new MultiCurrency($db);
179 $currency->fetch($obj->rowid);
180 $TCurrency[] = $currency;
181 }
182}
183
184
185/*
186 * View
187 */
188
189$form = new Form($db);
190
191$page_name = "MultiCurrencySetup";
192$help_url = '';
193
194llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-multicurrency');
195
196// Subheader
197$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>';
198
199print load_fiche_titre($langs->trans($page_name), $linkback);
200
201// Configuration header
203print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "multicurrency");
204
205
206print '<br>';
207
208
209print '<div class="div-table-responsive-no-min">';
210print '<table class="noborder centpercent">';
211print '<tr class="liste_titre">';
212print '<td>'.$langs->trans("Parameters").'</td>'."\n";
213print '<td class="center">'.$langs->trans("Status").'</td>'."\n";
214print '</tr>';
215
216print '<tr class="oddeven">';
217print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").'</td>';
218print '<td class="center">';
219if ($conf->use_javascript_ajax) {
220 print ajax_constantonoff('MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE');
221} else {
222 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
223 print $form->selectarray("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE", $arrval, getDolGlobalInt("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE"));
224}
225print '</td></tr>';
226
227
228print '<tr class="oddeven">';
229$tooltip = $langs->trans("multicurrency_useOriginTxHelp");
230print '<td>'.$form->textwithpicto($langs->transnoentitiesnoconv("multicurrency_useOriginTx"), $tooltip).'</td>';
231print '<td class="center">';
232if ($conf->use_javascript_ajax) {
233 print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX', array(), null, 0, 0, 0, 2, 0, 1);
234} else {
235 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
236 print $form->selectarray("MULTICURRENCY_USE_ORIGIN_TX", $arrval, getDolGlobalInt("MULTICURRENCY_USE_ORIGIN_TX"));
237}
238print '</td></tr>';
239
240// Online payment with currency on document. This option should be on by default.
241if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
242 print '<tr class="oddeven">';
243 print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT").'</td>';
244 print '<td class="center">';
245 if ($conf->use_javascript_ajax) {
246 print ajax_constantonoff('MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT');
247 } else {
248 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
249 print $form->selectarray("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT", $arrval, getDolGlobalInt("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT"));
250 }
251 print '</td></tr>';
252}
253
254/* TODO uncomment when the functionality will integrated
255
256print '<tr class="oddeven">';
257print '<td>'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").'</td>';
258print '<td class="right">';
259print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" spellcheck="false">';
260print '<input type="hidden" name="token" value="'.newToken().'">';
261print '<input type="hidden" name="action" value="set_MULTICURRENCY_BUY_PRICE_IN_CURRENCY">';
262print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1);
263print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
264print '</form>';
265print '</td></tr>';
266*/
267
268/* TODO uncomment when the functionality will integrated
269
270print '<tr class="oddeven">';
271print '<td>'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").'</td>';
272print '<td class="right">';
273print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" spellcheck="false">';
274print '<input type="hidden" name="token" value="'.newToken().'">';
275print '<input type="hidden" name="action" value="set_MULTICURRENCY_MODIFY_RATE_APPLICATION">';
276print $form->selectarray('MULTICURRENCY_MODIFY_RATE_APPLICATION', array('PU_DOLIBARR' => 'PU_DOLIBARR', 'PU_CURRENCY' => 'PU_CURRENCY'), $conf->global->MULTICURRENCY_MODIFY_RATE_APPLICATION);
277print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
278print '</form>';
279print '</td></tr>';
280
281*/
282
283print '</table>';
284print '</div>';
285
286print '<br>';
287
288print '<div class="div-table-responsive-no-min">';
289print '<table class="noborder centpercent nomarginbottom">';
290
291print '<tr class="liste_titre">';
292print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n";
293print '<td class="right">'.$langs->trans("Rate").' / '.$langs->getCurrencySymbol(getDolCurrency()).'</td>'."\n";
294print '</tr>';
295
296print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" spellcheck="false">';
297print '<input type="hidden" name="token" value="'.newToken().'">';
298print '<input type="hidden" name="action" value="add_currency">';
299
300print '<tr class="oddeven">';
301print '<td>'.$form->selectCurrency('', 'code', 1, '1').'</td>';
302print '<td class="right">';
303print '<input type="text" name="rate" value="" class="width75 right" placeholder="'.$langs->trans('Rate').'" />&nbsp;';
304print '<input type="submit" class="button button-add smallpaddingimp" value="'.$langs->trans("Add").'">';
305print '</td>';
306print '</tr>';
307
308print '</form>';
309
310// Main currency
311print '<tr class="oddeven">';
312print '<td>'.getDolCurrency();
313print ' ('.$langs->getCurrencySymbol(getDolCurrency()).')';
314print $form->textwithpicto(' ', $langs->trans("BaseCurrency"));
315if (!empty($TAvailableCurrency[getDolCurrency()]) && empty($TAvailableCurrency[getDolCurrency()]['active'])) {
316 print img_warning('Warning: This code has been disabled into Home - Setup - Dictionaries - Currencies');
317}
318print '</td>';
319print '<td class="right">1</td>';
320print '</tr>';
321
322foreach ($TCurrency as &$currency) {
323 if ($currency->code == getDolCurrency()) {
324 continue;
325 }
326
327 print '<tr class="oddeven">';
328 print '<td>'.$currency->code.' - '.$currency->name;
329 if (!empty($TAvailableCurrency[$currency->code]) && empty($TAvailableCurrency[$currency->code]['active'])) {
330 print img_warning('Warning: The code '.$currency->code.' has been disabled into Home - Setup - Dictionaries - Currencies');
331 }
332 print '</td>';
333 print '<td class="right">';
334 print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" spellcheck="false">';
335 print '<input type="hidden" name="token" value="'.newToken().'">';
336 print '<input type="hidden" name="action" value="update_currency">';
337 print '<input type="hidden" name="fk_multicurrency" value="'.$currency->id.'">';
338 print '1 '.getDolCurrency().' = ';
339 print '<input type="text" name="rate" class="width125 right" value="'.($currency->rate->rate ? $currency->rate->rate : '').'">&nbsp;'.$currency->code.'&nbsp;';
340 print '<input type="submit" name="updatecurrency" class="button button-edit smallpaddingimp" value="'.$langs->trans("Modify").'">&nbsp;';
341 print '<input type="submit" name="deletecurrency" class="button smallpaddingimp" value="'.$langs->trans("Delete").'">';
342 print '</form>';
343 print '</td></tr>';
344}
345
346print '</table>';
347print '</div>';
348
349print '
350 <script type="text/javascript">
351 function getRates()
352 {
353 $("#bt_sync").attr("disabled", true);
354 return true;
355 }
356 </script>
357';
358
359
360print '<br>';
361
362if (!getDolGlobalString('MULTICURRENCY_DISABLE_SYNC_CURRENCYLAYER')) {
363 print '<br>';
364
365 print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" id="form_sync" spellcheck="false">';
366 print '<input type="hidden" name="token" value="'.newToken().'">';
367 print '<input type="hidden" name="action" value="setapilayer">';
368
369 print '<div class="div-table-responsive-no-min">';
370 print '<table class="noborder centpercent">';
371
372 $urlforapilayer = 'https://currencylayer.com'; //https://apilayer.net
373
374 $endpointdefault = 'https://api.currencylayer.com/live?access_key=__MULTICURRENCY_APP_KEY__&source=__MULTICURRENCY_APP_SOURCE__';
375 $endpointdefault2 = 'https://api.apilayer.com/currency_data/live?base=__MULTICURRENCY_APP_SOURCE__';
376 $endpointdefaultfrankfurter = MultiCurrency::MULTICURRENCY_APP_ENDPOINT_FRANKFURTER_DEFAULT;
377
378 $tooltiptext = $langs->trans("CurrencyLayerAccount_help_to_synchronize", $urlforapilayer).'<br><span class="small">';
379 $tooltiptext .= '<br>- Endpoint for currencylayer:<br>'.$endpointdefault;
380 $tooltiptext .= '<br>- Endpoint for apilayer:<br>'.$endpointdefault2;
381 $tooltiptext .= '<br>- Endpoint for Frankfurter (free, no API key needed):<br>'.$endpointdefaultfrankfurter;
382 $tooltiptext .= '</span><br>';
383
384 $currentprovider = getDolGlobalString('MULTICURRENCY_APP_PROVIDER', 'currencylayer');
385
386 print '<tr class="liste_titre">';
387 print '<td>'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $tooltiptext, 1, 'help', 'valignmiddle', 0, 3, 'tooltipcurrencylayer').'</td>'."\n";
388 print '<td class="right">';
389 print '<textarea id="response" class="hideobject" name="response"></textarea>';
390 print '<input type="submit" name="modify_apilayer" class="button buttongen" value="'.$langs->trans("Modify").'">';
391 print '<input type="submit" id="bt_sync" name="bt_sync_apilayer" class="button buttongen" value="'.$langs->trans('Synchronize').'"';
392 if ($currentprovider != 'frankfurter' && !getDolGlobalString('MULTICURRENCY_APP_KEY')) {
393 print ' disabled="disabled"';
394 }
395 print '/>';
396 print '</td></tr>';
397
398 print '<tr class="oddeven">';
399 print '<td>'.$langs->trans("multicurrency_appProvider").'</td>';
400 print '<td class="right">';
401 print '<select id="MULTICURRENCY_APP_PROVIDER" name="MULTICURRENCY_APP_PROVIDER" class="flat">';
402 print '<option value="currencylayer"'.($currentprovider == 'currencylayer' ? ' selected' : '').'>'.$langs->trans("multicurrency_providerCurrencyLayer").'</option>';
403 print '<option value="frankfurter"'.($currentprovider == 'frankfurter' ? ' selected' : '').'>'.$langs->trans("multicurrency_providerFrankfurter").'</option>';
404 print '</select>&nbsp;';
405 print '</td></tr>';
406
407 print '<tr class="oddeven">';
408 print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appId").'</td>';
409 print '<td class="right">';
410 print '<input class="width300" type="text" name="MULTICURRENCY_APP_KEY" value="' . getDolGlobalString('MULTICURRENCY_APP_KEY').'" placeholder="'.($currentprovider == 'frankfurter' ? $langs->trans("multicurrency_appIdNotNeeded") : '').'" />&nbsp;';
411 print '</td></tr>';
412
413 print '<tr class="oddeven">';
414 print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").'</td>';
415 print '<td class="right">';
416 print '<input type="text" name="MULTICURRENCY_APP_SOURCE" value="' . getDolGlobalString('MULTICURRENCY_APP_SOURCE').'" size="10" placeholder="USD" />&nbsp;'; // Default: USD
417 print '</td></tr>';
418
419 $endpointdefaultforcurrentprovider = ($currentprovider == 'frankfurter') ? $endpointdefaultfrankfurter : MultiCurrency::MULTICURRENCY_APP_ENDPOINT_DEFAULT;
420
421 print '<tr class="oddeven">';
422 print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_APP_ENDPOINT").'</td>';
423 print '<td class="right">';
424 print '<input class="width500" id="MULTICURRENCY_APP_ENDPOINT" type="text" name="MULTICURRENCY_APP_ENDPOINT" value="' . getDolGlobalString('MULTICURRENCY_APP_ENDPOINT', $endpointdefaultforcurrentprovider).'" />&nbsp;';
425 print '</td></tr>';
426
427 print '<script>
428 jQuery(document).ready(function() {
429 var endpointdefaults = {
430 currencylayer: '.json_encode($endpointdefault).',
431 frankfurter: '.json_encode($endpointdefaultfrankfurter).'
432 };
433 jQuery("#MULTICURRENCY_APP_PROVIDER").on("change", function() {
434 jQuery("#MULTICURRENCY_APP_ENDPOINT").val(endpointdefaults[jQuery(this).val()]);
435 });
436 });
437 </script>';
438
439 /*print '<tr class="oddeven">';
440 print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
441 print '<td class="right">';
442 print '<input type="text" name="MULTICURRENCY_ALTERNATE_SOURCE" value="'.$conf->global->MULTICURRENCY_ALTERNATE_SOURCE.'" size="10" placeholder="EUR" />&nbsp;'; // Example: EUR
443 print '</td></tr>';*/
444
445 print '</table>';
446 print '</div>';
447 print '<br>';
448
449 print '</form>';
450}
451
452
453// End of page
454llxFooter();
455$db->close();
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
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 generation of HTML components Only common components must be here.
Class Currency.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.
Definition html.lib.php:540
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.