UFN_PDACCOUNTSYSTEM_ALLOWGLDISTRIBUTIONS
Determines if the supplied accounting system allows the use of GL distributions.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PDACCOUNTSYSTEMID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_PDACCOUNTSYSTEM_ALLOWGLDISTRIBUTIONS
(
@PDACCOUNTSYSTEMID uniqueidentifier
)
returns bit
with execute as caller
as begin
-- If @PDACCOUNTSYSTEMID is null then we will fall back on the default account system to get the setting.
select @PDACCOUNTSYSTEMID=isnull(@PDACCOUNTSYSTEMID, ID) from dbo.pdaccountsystem where ISDEFAULT = 1
declare @ALLOWGLDISTRIBUTIONS bit
select
@ALLOWGLDISTRIBUTIONS = ALLOWGLDISTRIBUTIONS
from dbo.PDACCOUNTSYSTEM
where PDACCOUNTSYSTEM.ID = @PDACCOUNTSYSTEMID
return @ALLOWGLDISTRIBUTIONS
end