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;
$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);
// Define value for RUM
// Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId)
$Rum = empty($row_rum) ? $this->buildRumNumber($row_code_client, $row_datec, $row_drum) : $row_rum;
// 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);
// Define date of RUM signature
$DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d');

View File

@ -1298,7 +1298,7 @@ class FormTicket
} else {
$keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid
}
//var_dump($keytoavoidconflict);
//var_dump($keytoavoidconflict);
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
if (!empty($arraydefaultmessage->joinfiles) && is_array($this->param['fileinit'])) {
foreach ($this->param['fileinit'] as $file) {
@ -1306,8 +1306,8 @@ class FormTicket
}
}
}
//var_dump($_SESSION);
//var_dump($_SESSION["listofpaths".$keytoavoidconflict]);
//var_dump($_SESSION);
//var_dump($_SESSION["listofpaths".$keytoavoidconflict]);
if (!empty($_SESSION["listofpaths".$keytoavoidconflict])) {
$listofpaths = explode(';', $_SESSION["listofpaths".$keytoavoidconflict]);
}

View File

@ -397,7 +397,9 @@ function LoadProducts(position, issubcat) {
function MoreProducts(moreorless) {
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); ?>;

View File

@ -689,7 +689,7 @@ if (empty($reshook)) {
$upload_dir = $conf->ticket->dir_output;
$permissiontoadd = $user->rights->ticket->write;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
//var_dump($action);exit;
//var_dump($action);exit;
// Actions to send emails
$triggersendname = 'TICKET_SENTBYMAIL';
$paramname = 'id';

View File

@ -109,8 +109,8 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
} elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) {
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true);
$endyear = $tmparray['year'];
$shownb = $tmparray['shownb'];
$showtot = $tmparray['showtot'];
$shownb = empty($tmparray['shownb']) ? 0 : $tmparray['shownb'];
$showtot = empty($tmparray['showtot']) ? 0 : $tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) {
$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 .= " 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";
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";
} else {
$sql .= " WHERE g.entity IN (0,".$conf->entity.")";

View File

@ -224,10 +224,10 @@ if ($canreadperms) {
$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec";
$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";
} else {
$sql .= " WHERE g.entity IN (0,".$conf->entity.")";
$sql .= " WHERE g.entity IN (0, ".$conf->entity.")";
}
$sql .= $db->order("g.datec", "DESC");
$sql .= $db->plimit($max);