Fix: SQL syntax error with pgsql
Conflicts: htdocs/contrat/class/contrat.class.php
This commit is contained in:
parent
7a8f244ae9
commit
109ccf9b74
@ -448,14 +448,14 @@ class Contrat extends CommonObject
|
|||||||
$this->extraparams = (array) json_decode($result["extraparams"], true);
|
$this->extraparams = (array) json_decode($result["extraparams"], true);
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
// Retreive all extrafield for thirdparty
|
// Retreive all extrafield for thirdparty
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
|
||||||
$extrafields=new ExtraFields($this->db);
|
$extrafields=new ExtraFields($this->db);
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||||
$this->fetch_optionals($this->id,$extralabels);
|
$this->fetch_optionals($this->id,$extralabels);
|
||||||
|
|
||||||
|
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
@ -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");
|
||||||
@ -761,8 +761,8 @@ class Contrat extends CommonObject
|
|||||||
// Insert contacts commerciaux ('SALESREPFOLL','contrat')
|
// Insert contacts commerciaux ('SALESREPFOLL','contrat')
|
||||||
$result=$this->add_contact($this->commercial_suivi_id,'SALESREPFOLL','internal');
|
$result=$this->add_contact($this->commercial_suivi_id,'SALESREPFOLL','internal');
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
|
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user