From 6a289e060da5de9cde3f5c5e0b1af4a8ef3b3ac8 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 13 May 2009 19:36:57 +0000 Subject: [PATCH] - Fixed a problem in the EMS calculating prices on tickets with a badge that has an existing ribbon. --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Asset/Sku/EMSTicket.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 15193f18b..028963c61 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,8 @@ - fixed: URLs that shouldn't happen (#10353) - Added more information output to EMS record importer. - Fixed a search tickets problem in the EMS badge builder template. + - Fixed a problem in the EMS calculating prices on tickets with a badge that + has an existing ribbon. - Fixed a search results display error with synopsis. - Fixed a load problem with Code Editor by making user toggle it on. This is better than normal anyway since many users appear not to want to use the diff --git a/lib/WebGUI/Asset/Sku/EMSTicket.pm b/lib/WebGUI/Asset/Sku/EMSTicket.pm index 34101f0f2..c6c9b2d38 100644 --- a/lib/WebGUI/Asset/Sku/EMSTicket.pm +++ b/lib/WebGUI/Asset/Sku/EMSTicket.pm @@ -346,7 +346,7 @@ sub getPrice { my $discount = 0; my $badgeId = $self->getOptions->{badgeId}; my $ribbonId = $self->session->db->quickScalar("select ribbonAssetId from EMSRegistrantRibbon where badgeId=? limit 1",[$badgeId]); - if (defined $ribbonId) { + if (defined $ribbonId && isIn($ribbonId, @ribbonIds)) { my $ribbon = WebGUI::Asset->new($self->session,$ribbonId,'WebGUI::Asset::Sku::EMSRibbon'); $discount = $ribbon->get('percentageDiscount'); }