Merge branch 'Dolibarr:develop' into develop

This commit is contained in:
mikygee 2022-10-02 22:40:10 +02:00 committed by GitHub
commit 72d10d1577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 13 deletions

View File

@ -1709,7 +1709,7 @@ class BonPrelevement extends CommonObject
{ {
global $langs; global $langs;
$pre = substr(dol_string_nospecial(dol_string_unaccent($langs->transnoentitiesnoconv('RUM'))), 0, 3); // Must always be on 3 char ('RUM' or 'UMR'. This is a protection against bad translation) $pre = substr(dol_string_nospecial(dol_string_unaccent($langs->transnoentitiesnoconv('RUM'))), 0, 3); // Must always be on 3 char ('RUM' or 'UMR'. This is a protection against bad translation)
return $pre.'-'.$row_code_client.'-'.$row_drum.'-'.date('U', $row_datec); return $pre.($row_code_client ? '-'.$row_code_client : '').'-'.$row_drum.'-'.date('U', $row_datec);
} }
@ -1823,8 +1823,8 @@ class BonPrelevement extends CommonObject
$Rowing = sprintf("%010d", $row_idfac); $Rowing = sprintf("%010d", $row_idfac);
// Define value for RUM // Define value for RUM
// Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId) // Example: RUM-CustomerCode-CustomerBankAccountId-01424448606 (note: Date is the timestamp of the date of creation of CustomerBankAccountId)
$Rum = empty($row_rum) ? $this->buildRumNumber($row_code_client, $row_datec, $row_drum) : $row_rum; $Rum = (empty($row_rum) ? $this->buildRumNumber($row_code_client, $row_datec, $row_drum) : $row_rum);
// Define date of RUM signature // Define date of RUM signature
$DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d'); $DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d');

View File

@ -397,7 +397,9 @@ function LoadProducts(position, issubcat) {
function MoreProducts(moreorless) { function MoreProducts(moreorless) {
console.log("MoreProducts"); console.log("MoreProducts");
if ($('#search_pagination').val() != '') return Search2('<?php echo $keyCodeForEnter; ?>', moreorless); if ($('#search_pagination').val() != '') {
return Search2('<?php echo (isset($keyCodeForEnter) ? $keyCodeForEnter : ''); ?>', moreorless);
}
var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>; var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>;

View File

@ -109,8 +109,8 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
} elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) { } elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) {
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true); $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true);
$endyear = $tmparray['year']; $endyear = $tmparray['year'];
$shownb = $tmparray['shownb']; $shownb = empty($tmparray['shownb']) ? 0 : $tmparray['shownb'];
$showtot = $tmparray['showtot']; $showtot = empty($tmparray['showtot']) ? 0 : $tmparray['showtot'];
} }
if (empty($shownb) && empty($showtot)) { if (empty($shownb) && empty($showtot)) {
$showtot = 1; $showtot = 1;

View File

@ -129,7 +129,7 @@ $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_rights as ugr ON ugr.fk_usergroup = g.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_rights as ugr ON ugr.fk_usergroup = g.rowid";
if (isModEnabled('multicompany') && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { if (isModEnabled('multicompany') && $conf->entity == 1 && (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') || ($user->admin && !$user->entity))) {
$sql .= " WHERE g.entity IS NOT NULL"; $sql .= " WHERE g.entity IS NOT NULL";
} else { } else {
$sql .= " WHERE g.entity IN (0,".$conf->entity.")"; $sql .= " WHERE g.entity IN (0,".$conf->entity.")";

View File

@ -224,7 +224,7 @@ if ($canreadperms) {
$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec"; $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec";
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
if (isModEnabled('multicompany') && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { if (isModEnabled('multicompany') && $conf->entity == 1 && (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') || ($user->admin && !$user->entity))) {
$sql .= " WHERE g.entity IS NOT NULL"; $sql .= " WHERE g.entity IS NOT NULL";
} else { } else {
$sql .= " WHERE g.entity IN (0, ".$conf->entity.")"; $sql .= " WHERE g.entity IN (0, ".$conf->entity.")";