From b4f2f0fd6b76b0697e8ef13571422d0aa8738394 Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Tue, 9 May 2006 18:00:36 +0000 Subject: [PATCH] manage purchases fix --- 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 6a9c67d33..4374da1d8 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -1786,7 +1786,7 @@ sub www_managePurchases { my $i18n = WebGUI::International->new($self->session,'Asset_EventManagementSystem'); my $whereClause = ($isAdmin)?'':" and (t.userId='".$self->session->user->userId."' or b.userId='".$self->session->user->userId."' or b.createdByUserId='".$self->session->user->userId."') and e.endDate > '".$self->session->datetime->time()."'"; - my $sql = "select distinct(t.transactionId) as purchaseId, t.initDate as initDate from transaction as t, EventManagementSystem_purchases as p, EventManagementSystem_registrations as r, EventManagementSystem_badges as b, EventManagementSystem_products as e where p.transactionId=t.transactionId and b.badgeId=r.badgeId and p.purchaseId=r.purchaseId and r.productId=e.productId $whereClause order by t.initDate"; + my $sql = "select distinct(t.transactionId) as purchaseId, t.initDate as initDate from transaction as t, EventManagementSystem_purchases as p, EventManagementSystem_registrations as r, EventManagementSystem_badges as b, EventManagementSystem_products as e where p.transactionId=t.transactionId and b.badgeId=r.badgeId and t.status='Completed' and p.purchaseId=r.purchaseId and r.productId=e.productId $whereClause order by t.initDate"; my $sth = $self->session->db->read($sql); my @purchasesLoop; while (my $purchase = $sth->hashRef) {