
[dbo].[GetAccountingVendorId_XLedger]
create function [dbo].[GetAccountingVendorId_XLedger]( @inVendorId varchar(15) )
returns int
as
begin
declare @theAccountingVendorId int
select @theAccountingVendorId =
case
when rtrim( isnull( @inVendorId, '' ) ) = '' then null
else AccountingVendor.AccountingVendorId
end
from AccountingVendor
where AccountingVendor.VendorNumber = rtrim( @inVendorId )
return @theAccountingVendorId
end
GO
GRANT EXECUTE ON [dbo].[GetAccountingVendorId_XLedger] TO [MssExec]
GO