X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetevents%2Fxnetevents.inc.php;h=a9ca09ccd5c83091d00a023bc2b865ba796ddca4;hb=d0327f6de73e81c4bcc656471ca4161e4f1e1e1b;hp=cb3aba526cbaea0305cb79cc7db42b262e79ce55;hpb=cadf74050675436527d5c36d48d295274d5b6719;p=platal.git diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index cb3aba5..a9ca09c 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -1,6 +1,6 @@ 0 + WHERE ep.eid = {?} ".(($item_id)?" AND item_id = $item_id":"")." $where GROUP BY ep.uid @@ -155,7 +155,14 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') { $tab = array(); $user = 0; + $evt['adminpaid'] = 0; + $evt['telepaid'] = 0; + $evt['topay'] = 0; + $evt['paid'] = 0; while ($u = $res->next()) { + if ($u['nb'] == 0) { + continue; + } $u['adminpaid'] = $u['paid']; $u['montant'] = 0; if ($money && $pay_id) { @@ -166,8 +173,8 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') { $pay_id, $u['uid']); $montants = $res_->fetchColumn(); foreach ($montants as $m) { - $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", "."); - $u['paid'] += trim($p); + $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", "."); + $u['paid'] += trim($p); } } $u['telepayment'] = $u['paid'] - $u['adminpaid']; @@ -182,6 +189,10 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') { $u['montant'] += $i['montant']*$i['nb']; } $tab[] = $u; + $evt['telepaid'] += $u['telepayment']; + $evt['adminpaid'] += $u['adminpaid']; + $evt['paid'] += $u['paid']; + $evt['topay'] += $u['montant']; } return $tab; } @@ -196,7 +207,7 @@ function subscribe_lists_event($participate, $uid, $evt) $participant_list = $evt['participant_list']; $absent_list = $evt['absent_list']; - $email = get_user_forlife($uid); + $email = get_user_forlife($uid, '_silent_user_callback'); if ($email) { $email .= '@'.$globals->mail->domain;