From 21130cdf36cdbb328d03551965d99c713a4eb5ef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Oct 2007 00:54:36 +0000 Subject: [PATCH] Fix: Pb date intervention --- htdocs/fichinter/fichinter.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index 4c109233fe8..b6ccc973350 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -101,12 +101,14 @@ class Fichinter extends CommonObject $this->verifyNumRef($soc); $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter (fk_soc, datei, datec, ref, fk_user_author, description, model_pdf"; - if ($this->projet_id) $sql .= ", fk_projet"; - $sql .= ") "; - $sql .= " VALUES (".$this->socid.", ".$this->date.", now(), '".$this->ref."', ".$this->author; - $sql .= ", '".addslashes($this->description)."', '".$this->modelpdf."'"; + if ($this->projet_id) $sql.= ", fk_projet"; + $sql.= ") "; + $sql.= " VALUES (".$this->socid.","; + $sql.= " ".$this->db->idate($this->date).","; + $sql.= " now(), '".$this->ref."', ".$this->author; + $sql.= ", '".addslashes($this->description)."', '".$this->modelpdf."'"; if ($this->projet_id) $sql .= ", ".$this->projet_id; - $sql .= ")"; + $sql.= ")"; $sqlok = 0; dolibarr_syslog("Fichinter::create sql=".$sql);