Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0

This commit is contained in:
Laurent Destailleur
2025-10-30 17:13:34 +01:00
4 changed files with 23 additions and 21 deletions

View File

@@ -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 '<td class="center">';
if (empty($obj->reconcilable)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=1&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=1&token='.newToken().'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&mode=1&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=1&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
@@ -807,11 +807,11 @@ if ($resql) {
if (!empty($arrayfields['aa.centralized']['checked'])) {
print '<td class="center">';
if (empty($obj->centralized)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=2&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=2&token='.newToken().'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&mode=2&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=2&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
@@ -825,11 +825,11 @@ if ($resql) {
if (!empty($arrayfields['aa.active']['checked'])) {
print '<td class="center">';
if (empty($obj->active)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=0&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=0&token='.newToken().'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&mode=0&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=0&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}

View File

@@ -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);

View File

@@ -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,

View File

@@ -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 <strong>$dolibarr_main_restrict_os_commands</strong> in the <strong>conf.php</strong> 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