Merge pull request #7374 from EmisFR/develop

Fix dates in commande and remisecheque for PostgreSQL
This commit is contained in:
Laurent Destailleur 2017-09-14 12:05:51 +02:00 committed by GitHub
commit 165c3ac112
2 changed files with 2 additions and 2 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);

View File

@ -861,7 +861,7 @@ 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.= " SET date_bordereau = ".($date ? "'".$this->db->idate($date)."'" : 'null');
$sql.= " WHERE rowid = ".$this->id;
dol_syslog("RemiseCheque::set_date", LOG_DEBUG);