Fix: pgsql compatibility

Todo: paiement COMMIT Transaction but nothing in table
This commit is contained in:
Regis Houssin 2010-04-17 08:43:01 +00:00
parent d7ffb431a7
commit 9f5a3f4f8e
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -250,7 +250,7 @@ class Account extends CommonObject
$sql.= ", fk_type";
$sql.= ",emetteur,banque";
$sql.= ") VALUES (";
$sql.= $this->db->idate(mktime());
$sql.= "'".$this->db->idate(mktime())."'";
$sql.= ", '".$this->db->idate($date)."'";
$sql.= ", '".$this->db->idate($datev)."'";
$sql.= ", '".addslashes($label)."'";

View File

@ -143,8 +143,8 @@ class Paiement
if ($this->total <> 0) // On accepte les montants negatifs pour les rejets de prelevement
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiement (datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)';
$sql.= ' VALUES ('.$this->db->idate($now).', '.$this->db->idate($this->datepaye).', \''.$this->total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.addslashes($this->note).'\', '.$user->id.')';
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)";
$sql.= " VALUES ('".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$this->total."', ".$this->paiementid.", '".$this->num_paiement."', '".addslashes($this->note)."', ".$user->id.")";
dol_syslog("Paiement::Create insert paiement sql=".$sql);
$resql = $this->db->query($sql);