$evt = get_event_detail($eid, $item_id);
}
- $page->assign('evt', $evt);
+ $page->assign_by_ref('evt', $evt);
$page->assign('tout', is_null($item_id));
if (count($evt['moments'])) {
// }}}
// {{{ function get_event_participants()
-function get_event_participants($evt, $item_id, $tri, $limit = '') {
+function get_event_participants(&$evt, $item_id, $tri, $limit = '') {
global $globals;
if (Env::has('initiale')) {
$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;
$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'];
$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;
}
{/if}
</tr>
{/foreach}
+ {if $is_admin && $evt.money}
+ <tr>
+ {assign var=cols value=$moments|@count}
+ <td colspan="{$cols+3}" class="right"><strong>Total</strong></td>
+ <td>{$evt.topay}€</td>
+ {if $evt.paiement_id}
+ <td>{$evt.telepaid|default:0}€</td>
+ <td>{$evt.adminpaid|default:0}€</td>
+ {/if}
+ <td>{$evt.paid}€</td>
+ </tr>
+ {/if}
</table>
<p class="descr">