Fix: php unit test warning

This commit is contained in:
Regis Houssin
2012-03-04 10:13:52 +01:00
parent 68ce569d05
commit 5e402f667e
7 changed files with 11 additions and 7 deletions

View File

@@ -612,7 +612,6 @@ class Commande extends CommonObject
dol_syslog("Commande::create ".$this->error, LOG_ERR);
return -1;
}
if (! $this->fk_project) $this->fk_project = 0;
// $date_commande is deprecated
$date = ($this->date_commande ? $this->date_commande : $this->date);
@@ -626,7 +625,8 @@ class Commande extends CommonObject
$sql.= ", remise_absolue, remise_percent";
$sql.= ", entity";
$sql.= ")";
$sql.= " VALUES ('(PROV)',".$this->socid.", ".$this->db->idate(gmmktime()).", ".$user->id.", ".$this->fk_project;
$sql.= " VALUES ('(PROV)',".$this->socid.", ".$this->db->idate(gmmktime()).", ".$user->id;
$sql.= ", ".($this->fk_project?$this->fk_project:"null");
$sql.= ", ".$this->db->idate($date);
$sql.= ", ".($this->source>=0 && $this->source != '' ?$this->source:'null');
$sql.= ", '".$this->db->escape($this->note)."'";