From 7ff331b8716c40db3861da25a2eda1f6d0cd44c7 Mon Sep 17 00:00:00 2001 From: evarisk-kilyan Date: Tue, 28 Jan 2025 11:51:08 +0100 Subject: [PATCH] #4255 [DigiriskClasses] fix: clone bad date on ref --- class/firepermit.class.php | 2 +- class/preventionplan.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/class/firepermit.class.php b/class/firepermit.class.php index ed78e83e5..504064e4a 100644 --- a/class/firepermit.class.php +++ b/class/firepermit.class.php @@ -182,9 +182,9 @@ public function createFromClone(User $user, int $fromID, array $options): int unset($object->import_key); // Clear fields + $object->date_creation = dol_now(); $object->ref = $refFirePermitMod->getNextValue($object); $object->label = $options['clone_label']; - $object->date_creation = dol_now(); $object->status = self::STATUS_DRAFT; // Create clone diff --git a/class/preventionplan.class.php b/class/preventionplan.class.php index f0c6d9d5d..35b4b65a4 100644 --- a/class/preventionplan.class.php +++ b/class/preventionplan.class.php @@ -185,9 +185,9 @@ public function createFromClone(User $user, int $fromID, array $options): int unset($object->import_key); // Clear fields + $object->date_creation = dol_now(); $object->ref = $refPreventionPlanMod->getNextValue($object); $object->label = $options['clone_label']; - $object->date_creation = dol_now(); $object->status = self::STATUS_DRAFT; // Create clone