Fix: pgsql compatibility
Todo: paiement COMMIT Transaction but nothing in table
This commit is contained in:
parent
d7ffb431a7
commit
9f5a3f4f8e
@ -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)."'";
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user