From 2053ccf19735f7b4d9b270dd6bce516ffb7ca6d2 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 29 Oct 2025 22:19:38 +0100 Subject: [PATCH 1/3] FIX Accountancy - Return on wrong page on y/n button (#35978) --- htdocs/accountancy/admin/account.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 ''; } From 4f3aca359dfbf453886fb33df70e1363c59f28ec Mon Sep 17 00:00:00 2001 From: Mathieu Pellegrin Date: Wed, 29 Oct 2025 23:19:47 +0100 Subject: [PATCH 2/3] Fix incorrect total discount (missing loop after GROUP BY query) (#36000) * Fix incorrect total discount (missing loop after GROUP BY query) * Make phpcs happy --------- Co-authored-by: Laurent Destailleur --- htdocs/comm/remx.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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); From af6358a44166e3a7d5ae2fb5888ce7d5d37ad2a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Oct 2025 02:19:34 +0100 Subject: [PATCH 3/3] FIX #35247 FIX #35950 Using same option for landing page and home page leads to fatal errors with admin that is blocked. Only the "Landing page" feature seems stable, so we keep it and use another constant for the unstable "Home page" option. --- htdocs/core/menus/standard/eldy.lib.php | 10 +++++----- htdocs/langs/en_US/admin.lang | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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