USP_DATALIST_RATESCALEFEE
Returns all fees belonging to a rate scale.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CONTEXTID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_RATESCALEFEE
(
@CONTEXTID uniqueidentifier
)
as
begin
set nocount on;
declare @INCLUDEALLFEES bit
select
@INCLUDEALLFEES = INCLUDEALLFEES
from dbo.RATESCALE
where ID = @CONTEXTID
if @INCLUDEALLFEES = 1
begin
select
null,
'All fees included' as FEENAME
end
else
begin
select
RATESCALEFEE.ID,
FEE.NAME as FEENAME
from dbo.RATESCALEFEE
inner join dbo.FEE on
RATESCALEFEE.FEEID = FEE.ID
where RATESCALEID = @CONTEXTID
end
end