UFN_CREDIT_REFUND_HASMERCHANDISE

Returns true if the given refund contains merchandise.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@CREDITID uniqueidentifier IN

Definition

Copy


        create function dbo.UFN_CREDIT_REFUND_HASMERCHANDISE
        (
            @CREDITID uniqueidentifier = null
        )
        returns bit
        with execute as caller
        as begin
            if exists(select 1 from dbo.CREDITITEM where TYPECODE = 14 and CREDITID = @CREDITID)
                return 1

            return 0
        end