From 2817ace0d2e9a23de261202dc4a6a1d8e5acf3ce Mon Sep 17 00:00:00 2001 From: John Date: Fri, 9 Feb 2018 15:47:18 +0100 Subject: [PATCH] Fix contract line extrafields save on add line --- htdocs/contrat/class/contrat.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 470d86d6c7c..78071fe0242 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2987,7 +2987,16 @@ class ContratLigne extends CommonObjectLine { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'contratdet'); - // FIXME Missing insert of extrafields + // Insert of extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + } if (!$notrigger) {