diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index c064c74b0ac..d937b34536f 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -1,6 +1,7 @@ - * Copyright (C) 2014-2016 Juanjo Menent + * Copyright (C) 2014-2016 Juanjo Menent + * Copyright (C) 2016 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e3fda63ef94..202a3dc2a0d 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1151,6 +1151,16 @@ class Contrat extends CommonObject } } + // Removed extrafields + if (! $error) { + $result=$this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); + } + } + if (! $error) { // We remove directory diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php index 332a7d0547e..7466c66df08 100644 --- a/htdocs/core/extrafieldsinexport.inc.php +++ b/htdocs/core/extrafieldsinexport.inc.php @@ -1,4 +1,4 @@ -db->escape($this->desc)."'"; - $sql.= ",date=".$this->db->idate($this->datei); + $sql.= ",date='".$this->db->idate($this->datei)."'"; $sql.= ",duree=".$this->duration; $sql.= ",rang='".$this->rang."'"; $sql.= " WHERE rowid = ".$this->rowid;