Fix: A method must not change value of original property.
This commit is contained in:
parent
f96fdc7d0a
commit
47baf232d4
@ -202,17 +202,6 @@ class Facture extends CommonInvoice
|
|||||||
if (! $this->cond_reglement_id) $this->cond_reglement_id = 0;
|
if (! $this->cond_reglement_id) $this->cond_reglement_id = 0;
|
||||||
if (! $this->mode_reglement_id) $this->mode_reglement_id = 0;
|
if (! $this->mode_reglement_id) $this->mode_reglement_id = 0;
|
||||||
$this->brouillon = 1;
|
$this->brouillon = 1;
|
||||||
if (empty($this->situation_cycle_ref)) {
|
|
||||||
$this->situation_cycle_ref = 'null';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($this->situation_counter)) {
|
|
||||||
$this->situation_counter = 'null';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($this->situation_final)) {
|
|
||||||
$this->situation_final = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create user=".$user->id);
|
dol_syslog(get_class($this)."::create user=".$user->id);
|
||||||
|
|
||||||
@ -301,12 +290,12 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ", ".($this->fk_facture_source?"'".$this->db->escape($this->fk_facture_source)."'":"null");
|
$sql.= ", ".($this->fk_facture_source?"'".$this->db->escape($this->fk_facture_source)."'":"null");
|
||||||
$sql.= ", ".($user->id > 0 ? "'".$user->id."'":"null");
|
$sql.= ", ".($user->id > 0 ? "'".$user->id."'":"null");
|
||||||
$sql.= ", ".($this->fk_project?$this->fk_project:"null");
|
$sql.= ", ".($this->fk_project?$this->fk_project:"null");
|
||||||
$sql.= ','.$this->cond_reglement_id;
|
$sql.= ", ".$this->cond_reglement_id;
|
||||||
$sql.= ", ".$this->mode_reglement_id;
|
$sql.= ", ".$this->mode_reglement_id;
|
||||||
$sql.= ", '".$this->db->idate($datelim)."', '".$this->modelpdf."'";
|
$sql.= ", '".$this->db->idate($datelim)."', '".$this->modelpdf."'";
|
||||||
$sql.= ", ".$this->situation_cycle_ref;
|
$sql.= ", ".$this->situation_cycle_ref?"'".$this->db->escape($this->situation_cycle_ref)."'":"null";
|
||||||
$sql.= ", ".$this->situation_counter;
|
$sql.= ", ".$this->situation_counter?"'".$this->db->escape($this->situation_counter)."'":"null";
|
||||||
$sql.= ", ".$this->situation_final;
|
$sql.= ", ".$this->situation_final?$this->situation_final:0;
|
||||||
$sql.=")";
|
$sql.=")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user