$e['topay'] += $m['nb'] * $m['montant'];
}
- $query = XDB::query(
- "SELECT amount
+ $montant = XDB::fetchOneCell(
+ "SELECT SUM(amount) as sum_amount
FROM payment_transactions AS t
WHERE ref = {?} AND uid = {?}", $e['paiement_id'], S::v('uid'));
- $montants = $query->fetchColumn();
-
- foreach ($montants as $m) {
- $p = strtr(substr($m, 0, strpos($m, 'EUR')), ',', '.');
- $e['paid'] += trim($p);
- }
+ $e['paid'] += $montant;
make_event_date($e);
GROUP BY p.uid', $evt['eid']);
$ofs = Env::i('offset');
- $tot = (is_null($evt['nb_tot']) ? $evt['nb'] : $evt['nb_tot']);
- $nbp = ceil($tot / NB_PER_PAGE);
+ $nbp = ceil($evt['user_count'] / NB_PER_PAGE);
if ($nbp > 1) {
$links = array();
if ($ofs) {