diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 30020319813..580e1797d88 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -538,7 +538,7 @@ if ($action != 'export_csv') { // Show first line of a break print ''; - print ''.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').''; + print ''.$root_account_number.($root_account_description ? ' - '.$root_account_description : '').''; print ''; $displayed_account = $root_account_number; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0ee2c772ffc..f7e17f4072c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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)) { diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index fd72aa16135..10f9d243031 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -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'); diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index b3852a562fb..a53c92736ff 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2023 Eric Seigne * Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Raphaƫl Doursenaud @@ -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)."', ";