dolibarr 24.0.0-beta
multicurrency.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2015 ATM Consulting <support@atm-consulting.fr>
3 * Copyright (C) 2018 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
5 * Copyright (C) 2025 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
34{
35 global $langs, $conf;
36
37 $h = 0;
38 $head = array();
39
40 $head[$h][0] = DOL_URL_ROOT."/admin/multicurrency.php";
41 $head[$h][1] = $langs->trans("Parameters");
42 $head[$h][2] = 'settings';
43 $h++;
44
45 $head[$h][0] = DOL_URL_ROOT."/multicurrency/multicurrency_rate.php";
46 $head[$h][1] = $langs->trans("TabTitleMulticurrencyRate");
47 $head[$h][2] = 'ratelist';
48 $h++;
49
50 complete_head_from_modules($conf, $langs, null, $head, $h, 'multicurrency');
51
52 complete_head_from_modules($conf, $langs, null, $head, $h, 'multicurrency', 'remove');
53
54 return $head;
55}
56
63function multicurrencyLimitPrepareHead($aCurrencies)
64{
65 global $langs;
66
67 $i = 0;
68 $head = array();
69
70 foreach ($aCurrencies as $currency) {
71 $head[$i][0] = $_SERVER['PHP_SELF'].'?currencycode='.$currency;
72 $head[$i][1] = $langs->trans("Currency".$currency).' ('.$langs->getCurrencySymbol($currency).')';
73 $head[$i][2] = $currency;
74
75 $i++;
76 }
77
78 return $head;
79}
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
multicurrencyAdminPrepareHead()
Prepare array with list of tabs.
multicurrencyLimitPrepareHead($aCurrencies)
Prepare array with list of currency tabs.