Fix another payment count issue.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 29 Nov 2007 21:03:50 +0000 (22:03 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 29 Nov 2007 21:03:50 +0000 (22:03 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/xnetevents.php

index d90b44d..1cc6633 100644 (file)
@@ -546,7 +546,7 @@ class XnetEventsModule extends PLModule
                     $nb = max(intval($nb), 0);
                     XDB::execute("REPLACE INTO groupex.evenements_participants
                                         VALUES ({?}, {?}, {?}, {?}, {?}, {?})",
-                                  $evt['eid'], $member['uid'], $id, $nb, '', $paid);
+                                  $evt['eid'], $member['uid'], $id, $nb, '', $id == 1 ? $paid : 0);
                 }
 
                 $res = XDB::query("SELECT COUNT(uid) AS cnt, SUM(nb) AS nb