Fix: SQL syntax error with pgsql

Conflicts:
	htdocs/contrat/class/contrat.class.php
This commit is contained in:
Laurent Destailleur 2014-07-19 22:40:53 +02:00
parent 7a8f244ae9
commit 109ccf9b74

View File

@ -728,7 +728,7 @@ class Contrat extends CommonObject
$sql.= " fk_commercial_signature, fk_commercial_suivi, fk_projet,"; $sql.= " fk_commercial_signature, fk_commercial_suivi, fk_projet,";
$sql.= " ref, entity, note_private, note_public)"; $sql.= " ref, entity, note_private, note_public)";
$sql.= " VALUES ('".$this->db->idate($now)."',".$this->socid.",".$user->id; $sql.= " VALUES ('".$this->db->idate($now)."',".$this->socid.",".$user->id;
$sql.= ",".$this->db->idate($this->date_contrat); $sql.= ", '".$this->db->idate($this->date_contrat)."'";
$sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL"); $sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL");
$sql.= ",".($this->commercial_suivi_id>0?$this->commercial_suivi_id:"NULL"); $sql.= ",".($this->commercial_suivi_id>0?$this->commercial_suivi_id:"NULL");
$sql.= ",".($this->fk_project>0?$this->fk_project:"NULL"); $sql.= ",".($this->fk_project>0?$this->fk_project:"NULL");