From 0a250142cc726d5b43cc6b458e06a6bffe5d50fe Mon Sep 17 00:00:00 2001 From: matthieu-michou-wattandsea <70541072+matthieu-michou-wattandsea@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:49:55 +0100 Subject: [PATCH] API REST : specify creation date for new contact, as for companies and products --- htdocs/contact/class/contact.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 0a97ee8f407..082639332be 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -484,6 +484,10 @@ class Contact extends CommonObject $error = 0; $now = dol_now(); + if (empty($this->date_creation)) { + $this->date_creation = $now; + } + $this->db->begin(); // Clean parameters