Fix dates in commande and remisecheque for PostgreSQL (should be treated like strings)
This commit is contained in:
parent
24436b550d
commit
93defa5f59
@ -2234,7 +2234,7 @@ class Commande extends CommonOrder
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql.= " SET date_commande = ".($date ? $this->db->idate($date) : 'null');
|
||||
$sql.= " SET date_commande = ".($date ? "'".$this->db->idate($date)."'" : 'null');
|
||||
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = ".self::STATUS_DRAFT;
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
@ -861,8 +861,8 @@ class RemiseCheque extends CommonObject
|
||||
if ($user->rights->banque->cheque)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque";
|
||||
$sql.= " SET date_bordereau = ".($date ? $this->db->idate($date) : 'null');
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
$sql.= " SET date_bordereau = '".($date ? $this->db->idate($date) : 'null');
|
||||
$sql.= "' WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog("RemiseCheque::set_date", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user