FIX properties on proposal must not be modified if error
This commit is contained in:
parent
c930218dd2
commit
91038af84d
@ -2437,7 +2437,7 @@ class Propal extends CommonObject
|
|||||||
$this->oldcopy= clone $this;
|
$this->oldcopy= clone $this;
|
||||||
$this->statut = $statut;
|
$this->statut = $statut;
|
||||||
$this->date_cloture = $now;
|
$this->date_cloture = $now;
|
||||||
$this->note_private = $note;
|
$this->note_private = $newprivatenote;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $notrigger && empty($error))
|
if (! $notrigger && empty($error))
|
||||||
@ -2455,6 +2455,10 @@ class Propal extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->statut = $this->oldcopy->statut;
|
||||||
|
$this->date_cloture = $this->oldcopy->date_cloture;
|
||||||
|
$this->note_private = $this->oldcopy->note_private;
|
||||||
|
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user