diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index b858693255e..f8f21d2868a 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -227,10 +227,8 @@ $sql = "SELECT c.subscription, c.dateadh as dateh"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " WHERE d.entity IN (".getEntity('adherent').")"; $sql.= " AND d.rowid = c.fk_adherent"; -if(isset($date_select) && $date_select != '') -{ - $sql .= " AND c.dateadh LIKE '".$date_select."%'"; -} + + $result = $db->query($sql); if ($result) { @@ -251,21 +249,33 @@ if ($result) print '
'; print ''; print ''; -print ''; -print ''; +print ''; +print ''; print ''; print ''; print "\n"; krsort($Total); +$i = 0; foreach ($Total as $key=>$value) { - print ''; + if ($i >= 8) + { + print ''; + print ""; + print ""; + print ""; + print ""; + print "\n"; + break; + } + print ''; print ""; print ""; print ""; print ""; print "\n"; + $i++; } // Total
'.$langs->trans("Subscriptions").''.$langs->trans("Number").''.$langs->trans("Year").''.$langs->trans("Subscriptions").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
...
$key".$Number[$key]."".price($value)."".price(price2num($value/$Number[$key], 'MT'))."