USP_DATALIST_PROGRAMFEE

Lists the fees associated with a program.

Parameters

Parameter Parameter Type Mode Description
@PROGRAMID uniqueidentifier IN Input parameter indicating the context ID for the data list.
@INCLUDEINACTIVE bit IN Include inactive

Definition

Copy


                    create procedure dbo.USP_DATALIST_PROGRAMFEE
                    (
                        @PROGRAMID uniqueidentifier,
                        @INCLUDEINACTIVE bit = 0
                    )
                    as
                        set nocount on;

                        select
                            FEE.ID,
                            PROGRAMFEE.ID AS PROGRAMFEEID,
                            NAME,
                            APPLIESTO,
                            case when [TYPECODE] = 1 then null else AMOUNT end,
                            case when [TYPECODE] = 0 then null else [PERCENT] end,
                            ISACTIVE,
                            [DESCRIPTION]
                        from
                            dbo.FEE
                        inner join dbo.PROGRAMFEE on FEE.ID=PROGRAMFEE.FEEID 
                        where 
                            PROGRAMFEE.PROGRAMID=@PROGRAMID and
                            (@INCLUDEINACTIVE = 1 or FEE.ISACTIVE = 1)
                        order by NAME;

                        return 0;