User creation not correctly managed if not defined
This commit is contained in:
parent
a3f0ad5702
commit
5cf8180a74
@ -134,7 +134,7 @@ class Facture extends CommonObject
|
|||||||
function create($user,$notrigger=0)
|
function create($user,$notrigger=0)
|
||||||
{
|
{
|
||||||
global $langs,$conf,$mysoc;
|
global $langs,$conf,$mysoc;
|
||||||
|
unset($user);
|
||||||
// Nettoyage paramètres
|
// Nettoyage paramètres
|
||||||
if (! $this->type) $this->type = 0;
|
if (! $this->type) $this->type = 0;
|
||||||
$this->ref_client=trim($this->ref_client);
|
$this->ref_client=trim($this->ref_client);
|
||||||
@ -207,7 +207,7 @@ class Facture extends CommonObject
|
|||||||
$sql.= ",".($this->note_public?"'".addslashes($this->note_public)."'":"null");
|
$sql.= ",".($this->note_public?"'".addslashes($this->note_public)."'":"null");
|
||||||
$sql.= ",".($this->ref_client?"'".addslashes($this->ref_client)."'":"null");
|
$sql.= ",".($this->ref_client?"'".addslashes($this->ref_client)."'":"null");
|
||||||
$sql.= ",".($this->fk_facture_source?"'".addslashes($this->fk_facture_source)."'":"null");
|
$sql.= ",".($this->fk_facture_source?"'".addslashes($this->fk_facture_source)."'":"null");
|
||||||
$sql.= ",".$user->id;
|
$sql.= ",".($user->id > 0 ? "'".$user->id."'":"null");
|
||||||
$sql.= ",".($this->projetid?$this->projetid:"null");
|
$sql.= ",".($this->projetid?$this->projetid:"null");
|
||||||
$sql.= ','.$this->cond_reglement_id;
|
$sql.= ','.$this->cond_reglement_id;
|
||||||
$sql.= ",".$this->mode_reglement_id;
|
$sql.= ",".$this->mode_reglement_id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user