FIX: Unsigned propal having signing date (#29825)
* FIX propal dates: setting sign date only if signed * FIX propal dates: clearing sign date when reopenning a propal * FIX propal dates: reworked + not clearing sign date Not clearing the sign date anymore because of 17.0 configuration that allow the user to choose if he wants to keep the previous sign date or the current date. * FIX propal dates: move comma to fix sql syntax error * FIX propal dates: add SQL request to update database This SQL request is meant to set the sign date and the signing user to null to match the fix * Update 15.0.0-16.0.0.sql --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
659830b68a
commit
26e09f85d2
1 changed files with 4 additions and 1 deletions
|
|
@ -2629,7 +2629,10 @@ class Propal extends CommonObject
|
|||
$newprivatenote = dol_concatdesc($this->note_private, $note);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||
$sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($now)."', fk_user_signature=".$user->id;
|
||||
$sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."'";
|
||||
if ($status == self::STATUS_SIGNED) {
|
||||
$sql .= ", date_signature='".$this->db->idate($now)."', fk_user_signature=".$user->id;
|
||||
}
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
|
|||
Loading…
Reference in a new issue