Do not store payments on multiple SQL entry.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 15 Nov 2007 12:03:26 +0000 (13:03 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 15 Nov 2007 12:03:26 +0000 (13:03 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/xnetevents.php

index ce99671..67cf352 100644 (file)
@@ -524,7 +524,7 @@ class XnetEventsModule extends PLModule
             if (Env::v('adm') == 'prix' && $member) {
                 XDB::execute("UPDATE groupex.evenements_participants
                                  SET paid = IF(paid + {?} > 0, paid + {?}, 0)
-                               WHERE uid = {?} AND eid = {?}",
+                               WHERE uid = {?} AND eid = {?} AND item_id = 1",
                         strtr(Env::v('montant'), ',', '.'),
                         strtr(Env::v('montant'), ',', '.'),
                         $member['uid'], $evt['eid']);