diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 1f53780461e..fd063b40a26 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -494,7 +494,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
}
// Scripts for 18.0
- $afterversionarray = explode('.', '170.9');
+ $afterversionarray = explode('.', '17.0.9');
$beforeversionarray = explode('.', '18.0.9');
if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) {
migrate_contractdet_rank();
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index 38933d291e7..a1e5220e07a 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -227,6 +227,12 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) {
// For FR, default value of option to show category of operations is on by default. Decret n°2099-1299 2022-10-07
$conf->global->INVOICE_CATEGORY_OF_OPERATION = 1;
}
+ if ($mysoc->country_code == 'FR' && !isset($conf->global->INVOICE_DISABLE_REPLACEMENT)) {
+ // For FR, the replacement invoice type is not allowed.
+ // From an accounting point of view, this creates holes in the numbering of the invoice.
+ // This is very problematic during a fiscal control.
+ $conf->global->INVOICE_DISABLE_REPLACEMENT = 1;
+ }
if ($mysoc->localtax1_assuj || $mysoc->localtax2_assuj) {
// For countries using the 2nd or 3rd tax, we disable input/edit of lines using the price including tax (because 2nb and 3rd tax not yet taken into account).
diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php
index bb1d9d95294..f1941b8c079 100644
--- a/htdocs/user/class/api_users.class.php
+++ b/htdocs/user/class/api_users.class.php
@@ -747,7 +747,7 @@ class Users extends DolibarrApi
unset($cleanObject->clicktodial_loaded);
unset($cleanObject->datec);
- unset($cleanObject->datem);
+ unset($cleanObject->tms);
unset($cleanObject->members);
unset($cleanObject->note);
unset($cleanObject->note_private);
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index 135b97bcc43..a93f7ccebfb 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -91,7 +91,7 @@ class UserGroup extends CommonObject
*
* @var integer
*/
- public $datem;
+ public $tms;
/**
* @var string Description
@@ -932,7 +932,7 @@ class UserGroup extends CommonObject
$this->name = 'DOLIBARR GROUP SPECIMEN';
$this->note = 'This is a note';
$this->datec = time();
- $this->datem = time();
+ $this->tms = time();
// Members of this group is just me
$this->members = array(
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 60c1c30e9fb..b9d16874604 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -209,6 +209,7 @@ if (empty($reshook)) {
$object->name = GETPOST("nom", 'alphanohtml');
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'restricthtml')));
+ $object->tms = dol_now();
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php
index 54117de403a..85df729d00f 100644
--- a/htdocs/user/group/list.php
+++ b/htdocs/user/group/list.php
@@ -173,7 +173,7 @@ $morecss = array();
// Build and execute select
// --------------------------------------------------------------------
-$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions";
+$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions";
$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";
@@ -471,7 +471,7 @@ while ($i < $imaxinloop) {
if (!$i) {
$totalarray['nbfield']++;
}
- print '