USP_DATALIST_MEMBERSHIPLEVELPCTBENEFITFORCONSTITUENT
Displays the list of percent benefits for a membership level limited by the constituent for payment add.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@MEMBERSHIPLEVELID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
@CONSTITUENTID | uniqueidentifier | IN | Constituent |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_MEMBERSHIPLEVELPCTBENEFITFORCONSTITUENT
(
@MEMBERSHIPLEVELID uniqueidentifier,
@CONSTITUENTID uniqueidentifier = null
)
as
set nocount on;
select
MLB.ID,
MLB.BENEFITID,
BENEFIT.NAME,
MLB.VALUEPERCENT,
MLB.DETAILS,
MLB.SEQUENCE
from dbo.MEMBERSHIPLEVELBENEFIT MLB
inner join dbo.BENEFIT on MLB.BENEFITID = BENEFIT.ID
where
BENEFIT.USEPERCENT = 1 and
MLB.MEMBERSHIPLEVELID = @MEMBERSHIPLEVELID and
(
@CONSTITUENTID = null or
BENEFIT.ID not in
(
select BENEFITID
from dbo.BENEFITCONSTITUENTDECLINED
where BENEFITCONSTITUENTDECLINED.CONSTITUENTID = @CONSTITUENTID
)
)
order by MLB.SEQUENCE asc