UFN_GIFTAIDREVENUESPLIT_GETTAXCLAIMELIGIBILITY

DEPRECATED. Returns the Gift Aid eligibility of a record.

Return

Return Type
nvarchar(25)

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN

Definition

Copy


            CREATE function dbo.UFN_GIFTAIDREVENUESPLIT_GETTAXCLAIMELIGIBILITY
            (
                @ID uniqueidentifier
            )
            returns nvarchar(25)
            with execute as caller
            as begin
                declare @ELIGIBILITYSTATUSCODE tinyint;
                set @ELIGIBILITYSTATUSCODE = dbo.UFN_GIFTAIDREVENUESPLIT_GETTAXCLAIMELIGIBILITYSTATUS(@ID);

                declare @ELIGIBILITY nvarchar(25);

                if @ELIGIBILITYSTATUSCODE = 0
                    set @ELIGIBILITY = 'No valid declaration';
                else if @ELIGIBILITYSTATUSCODE = 1
                    set @ELIGIBILITY = 'Not eligible';
                else
                    set @ELIGIBILITY = 'Valid declaration';

                return @ELIGIBILITY;
            end