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

This commit is contained in:
Laurent Destailleur 2024-03-01 19:02:16 +01:00
commit aaae1aad67
4 changed files with 26 additions and 6 deletions

View file

@ -538,7 +538,7 @@ if ($action != 'export_csv') {
// Show first line of a break
print '<tr class="trforbreak">';
print '<td colspan="'.($colspan+1).'" style="font-weight:bold; border-bottom: 1pt solid black;">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
print '<td colspan="'.($colspan+1).'" class="tdforbreak">'.$root_account_number.($root_account_description ? ' - '.$root_account_description : '').'</td>';
print '</tr>';
$displayed_account = $root_account_number;

View file

@ -619,6 +619,19 @@ abstract class CommonObject
public $user_modification_id;
/**
* @var int ID
* @deprecated Use $user_creation_id
*/
public $fk_user_creat;
/**
* @var int ID
* @deprecated Use $user_modification_id
*/
public $fk_user_modif;
public $next_prev_filter;
/**
@ -9058,9 +9071,9 @@ abstract class CommonObject
/**
* Function to prepare a part of the query for insert by returning an array with all properties of object.
* Function to return the array of data key-value from the ->fields and all the ->properties of an object.
*
* Note $this->${field} are set by the page that make the createCommon() or the updateCommon().
* Note: $this->${field} are set by the page that make the createCommon() or the updateCommon().
* $this->${field} should be a clean and string value (so date are formated for SQL insert).
*
* @return array Array with all values of each properties to update
@ -9263,6 +9276,11 @@ abstract class CommonObject
}
if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) {
$fieldvalues['fk_user_creat'] = $user->id;
$this->fk_user_creat = $user->id;
}
if (array_key_exists('user_modification_id', $fieldvalues) && !($fieldvalues['user_modification_id'] > 0)) {
$fieldvalues['user_modification_id'] = $user->id;
$this->user_modification_id = $user->id;
}
unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into insert.
if (array_key_exists('ref', $fieldvalues)) {

View file

@ -81,7 +81,7 @@ function expensereport_prepare_head($object)
$head[$h][2] = 'info';
$h++;
complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'add', 'external');
complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport', 'add', 'external');
complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport', 'remove');

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2023 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@ -1501,6 +1501,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$frequency = isset($this->cronjobs[$key]['frequency']) ? $this->cronjobs[$key]['frequency'] : '';
$unitfrequency = isset($this->cronjobs[$key]['unitfrequency']) ? $this->cronjobs[$key]['unitfrequency'] : '';
$priority = isset($this->cronjobs[$key]['priority']) ? $this->cronjobs[$key]['priority'] : '';
$datenextrun = isset($this->cronjobs[$key]['datenextrun']) ? $this->cronjobs[$key]['datenextrun'] : '';
$datestart = isset($this->cronjobs[$key]['datestart']) ? $this->cronjobs[$key]['datestart'] : '';
$dateend = isset($this->cronjobs[$key]['dateend']) ? $this->cronjobs[$key]['dateend'] : '';
$status = isset($this->cronjobs[$key]['status']) ? $this->cronjobs[$key]['status'] : '';
@ -1536,7 +1537,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$this->db->begin();
if (!$err) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datenextrun, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,";
if (is_int($frequency)) {
$sql .= ' frequency,';
}
@ -1553,6 +1554,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$sql .= " VALUES (";
$sql .= "'".$this->db->escape(empty($this->rights_class) ?strtolower($this->name) : $this->rights_class)."', ";
$sql .= "'".$this->db->idate($now)."', ";
$sql .= ($datenextrun ? "'".$this->db->idate($datenextrun)."'" : "'".$this->db->idate($now)."'").", ";
$sql .= ($datestart ? "'".$this->db->idate($datestart)."'" : "'".$this->db->idate($now)."'").", ";
$sql .= ($dateend ? "'".$this->db->idate($dateend)."'" : "NULL").", ";
$sql .= "'".$this->db->escape($label)."', ";