From f4be5edbf62719709d593fdcffd7abc6a599dd8b Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Tue, 16 May 2006 15:05:23 +0000 Subject: [PATCH] more clarity --- lib/WebGUI/Asset/Wobject/EventManagementSystem.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index db12ff5a0..c4bd2dc8a 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -274,7 +274,7 @@ sub addToScratchCart { # check if event is actually available. my ($numberRegistered) = $self->session->db->quickArray("select count(*) from EventManagementSystem_registrations as r, EventManagementSystem_purchases as p, transaction as t where t.transactionId=p.transactionId and t.status='Completed' and r.purchaseId = p.purchaseId and r.returned=0 and r.productId=?",[$event]); my ($maxAttendees) = $self->session->db->quickArray("select maximumAttendees from EventManagementSystem_products where productId=?",[$event]); - return undef unless ($self->canApproveEvents || ($maxAttendees - $numberRegistered > 0)); + return undef unless ($self->canApproveEvents || ($maxAttendees > $numberRegistered)); my $bid = $self->session->scratch->get('currentBadgeId'); my @pastEvents = ($bid)?$self->session->db->buildArray("select r.productId from EventManagementSystem_registrations as r, EventManagementSystem_purchases as p, transaction as t where r.returned=0 and r.badgeId=? and t.transactionId=p.transactionId and t.status='Completed' and p.purchaseId=r.purchaseId group by productId",[$bid]):();