dolibarr 21.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 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
33{
34 global $langs, $conf;
35
36 $h = 0;
37 $head = array();
38
39 $head[$h][0] = dol_buildpath("/admin/multicurrency.php", 1);
40 $head[$h][1] = $langs->trans("Parameters");
41 $head[$h][2] = 'settings';
42 $h++;
43
44 $head[$h][0] = dol_buildpath("/multicurrency/multicurrency_rate.php", 1);
45 $head[$h][1] = $langs->trans("TabTitleMulticurrencyRate");
46 $head[$h][2] = 'ratelist';
47 $h++;
48
49 complete_head_from_modules($conf, $langs, null, $head, $h, 'multicurrency');
50
51 complete_head_from_modules($conf, $langs, null, $head, $h, 'multicurrency', 'remove');
52
53 return $head;
54}
55
62function multicurrencyLimitPrepareHead($aCurrencies)
63{
64 global $langs;
65
66 $i = 0;
67 $head = array();
68
69 foreach ($aCurrencies as $currency) {
70 $head[$i][0] = $_SERVER['PHP_SELF'].'?currencycode='.$currency;
71 $head[$i][1] = $langs->trans("Currency".$currency).' ('.$langs->getCurrencySymbol($currency).')';
72 $head[$i][2] = $currency;
73
74 $i++;
75 }
76
77 return $head;
78}
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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).
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
multicurrencyAdminPrepareHead()
Prepare array with list of tabs.
multicurrencyLimitPrepareHead($aCurrencies)
Prepare array with list of currency tabs.