FIX php8 compatibility
This commit is contained in:
parent
10731b22c8
commit
893a2eeb43
@ -36,7 +36,7 @@ if (!$user->admin) {
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$currencycode = GETPOST('currencycode', 'alpha');
|
$currencycode = GETPOST('currencycode', 'alpha');
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
// When MULTICURRENCY_USE_LIMIT_BY_CURRENCY is on, we use always a defined currency code instead of '' even for default.
|
// When MULTICURRENCY_USE_LIMIT_BY_CURRENCY is on, we use always a defined currency code instead of '' even for default.
|
||||||
$currencycode = (!empty($currencycode) ? $currencycode : $conf->currency);
|
$currencycode = (!empty($currencycode) ? $currencycode : $conf->currency);
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ print load_fiche_titre($title, '', 'title_setup');
|
|||||||
|
|
||||||
$aCurrencies = array($conf->currency); // Default currency always first position
|
$aCurrencies = array($conf->currency); // Default currency always first position
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/multicurrency.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/multicurrency.lib.php';
|
||||||
|
|
||||||
$sql = "SELECT rowid, code FROM " . MAIN_DB_PREFIX . "multicurrency";
|
$sql = "SELECT rowid, code FROM " . MAIN_DB_PREFIX . "multicurrency";
|
||||||
@ -132,7 +132,7 @@ if ($action == 'edit') {
|
|||||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
print '<input type="hidden" name="currencycode" value="' . $currencycode . '">';
|
print '<input type="hidden" name="currencycode" value="' . $currencycode . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ if ($action == 'edit') {
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
if (!empty($aCurrencies) && count($aCurrencies) > 1) {
|
if (!empty($aCurrencies) && count($aCurrencies) > 1) {
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user