UFN_VENDOR_VALIDREMITADDRESS
Validates that the Vendor ID and Address ID passed in are related.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@VENDORID | uniqueidentifier | IN | |
@ADDRESSID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_VENDOR_VALIDREMITADDRESS
(
@VENDORID as uniqueidentifier
,@ADDRESSID as uniqueidentifier
)
returns bit
with execute as caller
as begin
declare @VALID as bit
set @VALID = 0
if @ADDRESSID is not null
select
@VALID = 1
from
dbo.ADDRESS A
where
A.ID = @ADDRESSID
and A.CONSTITUENTID = @VENDORID
else
set @VALID = 1
return @VALID
end