spGetEventItemCapactiyTotals
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@EventItemPriceID | int | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spGetEventItemCapactiyTotals](@EventItemPriceID int)
AS
BEGIN
SELECT
ISNULL( SUM(capacity.NumRegistrants) , 0) 'TotalNumRegistrants',
SUM(capacity.GiftAmount) 'TotalGiftAmount',
SUM(capacity.NumberOfUnits) 'TotalNumberOfUnits'
FROM
dbo.EventItemPrices price
inner join dbo.EventItemCapacity capacity on price.BackOfficeID = capacity.EventItemPriceBackOfficeID
left join dbo.EventTransactions tx on capacity.EventTransactionsID = tx.EventTransactionsID
--sterling CR314385-012709
--changed to inner join so only registrations that resulted via the FR are included
inner join dbo.FundRaiserEventRegistrations reg on tx.EventTransactionsID = reg.EventTransactionsID
WHERE
price.id = @EventItemPriceID and tx.status = 1 and tx.isdeleted = 0
END