UFN_GETGIFTAIDBASETAXRATE
Returns the base tax rate for the specified date.
Return
Return Type |
---|
numeric(30, 6) |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@TAXDATE | datetime | IN |
Definition
Copy
-- Note: Any changes made here should be made to UFN_GETGIFTAIDBASETAXRATE_INLINE
CREATE function dbo.UFN_GETGIFTAIDBASETAXRATE
(
@TAXDATE as datetime = null
)
returns numeric(30,6)
with execute as caller
begin
declare @BASERATE as numeric(30,6);
select top 1
@BASERATE = coalesce(RATE, 0)
from dbo.GIFTAIDTAXRATE
where EFFECTIVEDATE <= @TAXDATE
order by EFFECTIVEDATE desc
return @BASERATE
end