From 9648dd2d1a6e182f69bae95aaac53cfbc8e72bb5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Jan 2011 00:15:48 +0000 Subject: [PATCH] Fix: Error with some amounts --- htdocs/compta/dons/index.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php index 33cfb840311..e53f2710701 100644 --- a/htdocs/compta/dons/index.php +++ b/htdocs/compta/dons/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * * 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 @@ -18,11 +18,11 @@ */ /** - \file htdocs/compta/dons/index.php - \ingroup don - \brief Page accueil espace don - \version $Id$ -*/ + * \file htdocs/compta/dons/index.php + * \ingroup don + * \brief Page accueil espace don + * \version $Id$ + */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php"); @@ -86,8 +86,8 @@ for ($i = 0 ; $i < 3 ; $i++) print ""; print ''.$donstatic->LibStatut($i,4).''; print ''.$nb[$i].''; - print ''.($nb[$i]?price($somme[$i]):' ').''; - print ''.($nb[$i]?(price($somme[$i])/$nb[$i]):' ').''; + print ''.($nb[$i]?price($somme[$i],'MT'):' ').''; + print ''.($nb[$i]?price($somme[$i]/$nb[$i],'MT'):' ').''; $totalnb += $nb[$i]; $total += $somme[$i]; print ""; @@ -96,8 +96,8 @@ for ($i = 0 ; $i < 3 ; $i++) print ''; print ''.$langs->trans("Total").''; print ''.$totalnb.''; -print ''.price($total).''; -print ''.($totalnb?(price($total)/$totalnb):' ').''; +print ''.price($total,'MT').''; +print ''.($totalnb?price($total/$totalnb,'MT'):' ').''; print ''; print "";