Fix dates in commande and remisecheque for PostgreSQL (should be treated like strings)

This commit is contained in:
Stéphane BERTHELOT
2017-09-11 18:01:24 +02:00
parent 07b040a8eb
commit 66f671f4c8
2 changed files with 3 additions and 3 deletions

View File

@@ -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);