From 4ca4c85d0a516c244c0dbc0de63e3cccf54c81a7 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Fri, 7 Sep 2007 20:50:01 +0000 Subject: [PATCH] fix: EMS Badge Reporting overlaps with other EMS on the system --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/EventManagementSystem.pm | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 409950078..42e4a9df9 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -27,6 +27,7 @@ - fix: Edit Branch doesn't follow auto commit settings - fix: Importing a package doesn't follow auto commit settings - add: DataForm template variable for the group to view entries + - fix: EMS Badge Reporting overlaps with other EMS on the system 7.4.5 - fix: Apostrophy incorrectly escaped as double quote in some places diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index 6174637a4..822e77e8a 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -4227,8 +4227,8 @@ sub www_searchBadges { left join EventManagementSystem_products d ON d.productId=b.productId left join EventManagementSystem_purchases f ON b.purchaseId=f.purchaseId left join transaction g ON f.transactionId=g.transactionId and g.status="Completed" - where b.returned='0' and b.badgeId=? and g.gateway IS NOT NULL - order by d.startDate,d.endDate,c.title|,[$badgeId]); + where b.assetId=? and b.returned='0' and b.badgeId=? and g.gateway IS NOT NULL + order by d.startDate,d.endDate,c.title|,[$self->getId, $badgeId]); # Make sure the transation is complete before we display this badge next unless $events->rows; @@ -4546,8 +4546,9 @@ function resetToInitial() { from EventManagementSystem_registrations b left join products c on c.productId=b.productId left join EventManagementSystem_products d ON d.productId=b.productId left join EventManagementSystem_purchases f ON b.purchaseId=f.purchaseId - left join transaction g ON f.transactionId=g.transactionId where b.returned='0' and b.badgeId=? - order by d.startDate,d.endDate,c.title|,[$badgeId]); + left join transaction g ON f.transactionId=g.transactionId + where b.assetId = ? and b.returned='0' and b.badgeId=? + order by d.startDate,d.endDate,c.title|,[$self->getId, $badgeId]); my $ticker = 1; while (my ($productId, $sku, $title, $price, $gateway, $start, $end, $prereq, $registrationId, $transactionId) = $events->array) { my $isMaster = ($prereq eq "");