From bd2e12b4acc881deec81c4d806069921c49acbde Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Feb 2010 02:38:18 +0000 Subject: [PATCH] Doxygen --- htdocs/paiement.class.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 3e34c2ff4b3..10a605d85b6 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * * This program is free software; you can redistribute it and/or modify @@ -19,18 +19,17 @@ */ /** - \file htdocs/paiement.class.php - \ingroup facture - \brief Fichier de la classe des paiement de factures clients - \remarks Cette classe est presque identique a paiementfourn.class.php - \version $Id$ + * \file htdocs/paiement.class.php + * \ingroup facture + * \brief Fichier de la classe des paiement de factures clients + * \remarks Cette classe est presque identique a paiementfourn.class.php + * \version $Id$ */ /** \class Paiement - \brief Classe permettant la gestion des paiements des factures clients + * \brief Classe permettant la gestion des paiements des factures clients */ - class Paiement { var $id; @@ -126,6 +125,8 @@ class Paiement $error = 0; // Clean parameters + $now=dol_now(); + $this->total = 0; foreach ($this->amounts as $key => $value) // How payment is dispatch { @@ -141,10 +142,10 @@ 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(mktime()).', '.$this->db->idate($this->datepaye).', \''.$this->total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.addslashes($this->note).'\', '.$user->id.')'; - $resql = $this->db->query($sql); + $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); if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'paiement');