UFN_REVENUE_SUPPORTSINSTALLMENTS
Determines if a revenue record supports installments.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REVENUEID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_REVENUE_SUPPORTSINSTALLMENTS
(
@REVENUEID uniqueidentifier
)
returns bit
with execute as caller
as
begin
declare @r bit;
--Note: Auction donations (TRANSACTIONTYPECODE = 7) do not actually support installments. They *do*
--support write-offs however, which this function determines.
select
@r = case when TYPECODE in (1, 2, 3, 4, 6, 7, 8,9, 15) then 1 else 0 end
from dbo.FINANCIALTRANSACTION
where ID = @REVENUEID;
return @r;
end