diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 0b5ab6d140a..1c29b2967fd 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 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 @@ -207,7 +207,7 @@ $formfile = new FormFile($db); if ($_GET["action"] == 'create') { - print_titre($langs->trans("AddDonation")); + print_fiche_titre($langs->trans("AddDonation")); print '
'; print ''; @@ -383,7 +383,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit') print $don->getNomUrl(); print ''; print ''; - + // Date print "
".$langs->trans("Date").""; print dolibarr_print_date($don->date,"day"); @@ -426,8 +426,8 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit') // \TODO Gérer action émettre paiement $resteapayer = 0; - - + + /** * Barre d'actions */ diff --git a/htdocs/compta/dons/stats.php b/htdocs/compta/dons/stats.php index b9632cdd6f3..0dab88c86ea 100644 --- a/htdocs/compta/dons/stats.php +++ b/htdocs/compta/dons/stats.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2009 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 @@ -15,28 +15,28 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * */ /** \file htdocs/compta/dons/stats.php \ingroup don \brief Page des statistiques de dons - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); $langs->load("donations"); + +/* + * View + */ + llxHeader(); -print_titre($langs->trans("Statistics")); -print '
'; +print_fiche_titre($langs->trans("Statistics")); $sql = "SELECT d.amount"; @@ -44,10 +44,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."don_projet $sql .= " ON p.rowid = d.fk_don_projet"; $result = $db->query($sql); -if ($result) +if ($result) { $num = $db->num_rows($result); - + $var=true; $i=0; $total=0; @@ -57,11 +57,11 @@ if ($result) $total += $objp->amount; $i++; } - + print ''; - + print ''; - + $var=!$var; print ""; print ''; @@ -70,7 +70,7 @@ if ($result) $var=!$var; print "".''; print ""; - + print "
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DonationsNumber").''.$num.'
'.$langs->trans("Average").''.price($total / ($num?$num:1)).'
"; } else