diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 8b1a3c7fbd6..8e2b9034926 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -784,15 +784,15 @@ if ($resql) { } if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { - // Activated or not reconciliation on an accounting account + // Activated or not reconciliation on a general accounting account if (!empty($arrayfields['aa.reconcilable']['checked'])) { print ''; if (empty($obj->reconcilable)) { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } @@ -807,11 +807,11 @@ if ($resql) { if (!empty($arrayfields['aa.centralized']['checked'])) { print ''; if (empty($obj->centralized)) { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } @@ -825,11 +825,11 @@ if ($resql) { if (!empty($arrayfields['aa.active']['checked'])) { print ''; if (empty($obj->active)) { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 36a5bcf7d4e..1da9f4f1566 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -289,10 +289,11 @@ if ($socid > 0) { $sql .= " GROUP BY rc.fk_user"; $resql = $db->query($sql); if ($resql) { - $obj = $db->fetch_object($resql); - $remise_all += (!empty($obj->amount) ? $obj->amount : 0); - if (!empty($obj->fk_user) && $obj->fk_user == $user->id) { - $remise_user += (!empty($obj->amount) ? $obj->amount : 0); + while ($obj = $db->fetch_object($resql)) { + $remise_all += (!empty($obj->amount) ? $obj->amount : 0); + if (!empty($obj->fk_user) && $obj->fk_user == $user->id) { + $remise_user += (!empty($obj->amount) ? $obj->amount : 0); + } } } else { dol_print_error($db); @@ -318,10 +319,11 @@ if ($socid > 0) { $sql .= " GROUP BY rc.fk_user"; $resql = $db->query($sql); if ($resql) { - $obj = $db->fetch_object($resql); - $remise_all += (!empty($obj->amount) ? $obj->amount : 0); - if (!empty($obj->fk_user) && $obj->fk_user == $user->id) { - $remise_user += (!empty($obj->amount) ? $obj->amount : 0); + while ($obj = $db->fetch_object($resql)) { + $remise_all += (!empty($obj->amount) ? $obj->amount : 0); + if (!empty($obj->fk_user) && $obj->fk_user == $user->id) { + $remise_user += (!empty($obj->amount) ? $obj->amount : 0); + } } } else { dol_print_error($db); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 161710d8e81..0a2e317c40f 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -73,15 +73,15 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $menu_arr = array(); // Home - $landingpage = getDolUserString('MAIN_LANDING_PAGE', getDolGlobalString('MAIN_LANDING_PAGE')); - if (!empty($landingpage)) { - $landingpage = dol_buildpath($landingpage, 1); + $homepage = getDolUserString('MAIN_HOME_PAGE', getDolGlobalString('MAIN_HOME_PAGE')); + if (!empty($homepage) && !$user->admin) { + $homepage = dol_buildpath($homepage, 1); } else { - $landingpage = '/index.php?mainmenu=home&leftmenu=home'; + $homepage = '/index.php?mainmenu=home&leftmenu=home'; } $menu_arr[] = array( 'name' => 'Home', - 'link' => $landingpage, + 'link' => $homepage, 'title' => "Home", 'level' => 0, 'enabled' => $showmode = 1, diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 714257b4166..30adf74628f 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2149,7 +2149,7 @@ ListOfAvailableAPIs=List of available APIs activateModuleDependNotSatisfied=Module "%s" depends on module "%s", that is missing, so module "%s" may not work correctly. activateModuleDependNotSatisfied2=Please install module "%s" or disable module "%s" if you want to be safe from any surprise. CommandIsNotInsideAllowedCommands=The command you are trying to run is not in the list of allowed commands defined in parameter $dolibarr_main_restrict_os_commands in the conf.php file. -LandingPage=Landing page +LandingPage=Landing page (reached after login) SamePriceAlsoForSharedCompanies=If you use a multicompany module, with the choice "Single price", the price will also be the same for all companies if products are shared between environments ModuleEnabledAdminMustCheckRights=Module has been activated. Permissions for activated module(s) were given to admin users only. You may need to grant permissions to other users or groups manually if necessary. UserHasNoPermissions=This user has no permissions defined