From 7d04067b4e94e38ac4a2b85f743c3ff6619eb158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 28 Aug 2025 02:15:41 +0200 Subject: [PATCH] fix CI (Travis) (#35099) * fix test * fix test * fix test * fix test * fix test * fix * fix * fix --- htdocs/compta/facture/class/facture.class.php | 4 +++- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/core/modules/facture/doc/pdf_octopus.modules.php | 2 +- test/phpunit/FactureTest.php | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 848d590185a..ce2ea7d144d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1293,6 +1293,7 @@ class Facture extends CommonInvoice $object->date = (empty($this->date) ? dol_now() : $this->date); $object->user_creation_id = $user->id; $object->user_validation_id = null; + $object->user_modification_id = null; $object->fk_user_author = $user->id; $object->fk_user_valid = null; $object->fk_facture_source = 0; @@ -1625,6 +1626,7 @@ class Facture extends CommonInvoice $this->origin_id = $object->id; $this->fk_user_author = $user->id; + $this->user_creation_id = $user->id; // get extrafields from original line $object->fetch_optionals(); @@ -5563,7 +5565,7 @@ class Facture extends CommonInvoice $this->note_public = 'This is a comment (public)'; $this->note_private = 'This is a comment (private)'; - $this->fk_user_author = $user->id; + $this->user_creation_id = $user->id; $this->multicurrency_tx = 1; $this->multicurrency_code = $conf->currency; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0902f6b3173..5745ecf79ea 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -732,7 +732,7 @@ abstract class CommonObject public $user_validation_id; /** - * @var int User id closing object + * @var int|null User id closing object */ public $user_closing_id; @@ -743,7 +743,7 @@ abstract class CommonObject public $user_modification; /** - * @var int User ID who last modified the object + * @var int|null User ID who last modified the object */ public $user_modification_id; diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index 976b6b424bc..665b6ac8fd2 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -618,7 +618,7 @@ class pdf_octopus extends ModelePDFFactures } } - // Displays notes. Here we are still on code eecuted only for the first page. + // Displays notes. Here we are still on code executed only for the first page. $notetoshow = empty($object->note_public) ? '' : $object->note_public; if (getDolGlobalString('MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE')) { // Get first sale rep diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 2d908845451..96d51d016b7 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW * @@ -171,8 +171,8 @@ class FactureTest extends CommonClassTest true, // Not comparing: array( - 'newref','oldref','id','lines','client','thirdparty','brouillon','user_creation_id','date_creation','date_validation','datem','date_modification', - 'ref','statut','status','paye','specimen','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement', + 'newref','oldref','id','lines','client','thirdparty','brouillon', 'fk_user_author', 'user_modification_id', 'date_creation','date_validation','datem','date_modification', + 'ref','statut','status','paye','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement', 'cond_reglement_doc', 'modelpdf', 'multicurrency_total_ht','multicurrency_total_tva', 'multicurrency_total_ttc','fk_multicurrency','multicurrency_code','multicurrency_tx', 'retained_warranty' ,'retained_warranty_date_limit', 'retained_warranty_fk_cond_reglement', 'specimen', 'situation_cycle_ref', 'situation_counter', 'situation_final',