
[dbo].[GetAdminActivatedAccountingSystems]
CREATE PROCEDURE [dbo].[GetAdminActivatedAccountingSystems]
as
set nocount on
declare @theAccountingSystems table
(
SystemCode char(2)
)
if( dbo.udfHasGPAPI() = 1 )
begin
insert into @theAccountingSystems( SystemCode )
select
SystemCode = 'GP'
except
select SystemCode
from @theAccountingSystems
end
if( isnull( ( select Active from SecModules where [Description] = 'QuickBooks Api' ), 0 ) = 1 )
begin
insert into @theAccountingSystems( SystemCode )
select
SystemCode = 'QB'
except
select SystemCode
from @theAccountingSystems
end
if( exists( select top 1 1 from GlobalSystemOption where name = 'XLedgerExperimentalAdmin' and dbo.GetBooleanVarChar( [Value] ) = 'true' ) )
begin
insert into @theAccountingSystems( SystemCode )
select
SystemCode = 'XL'
except
select SystemCode
from @theAccountingSystems
end
select
SystemCode
from @theAccountingSystems
order by SystemCode
GO
GRANT EXECUTE ON [dbo].[GetAdminActivatedAccountingSystems] TO [MssExec]
GO