
[dbo].[BATErrorVerifyAccountingSystem]
CREATE PROCEDURE [dbo].[BATErrorVerifyAccountingSystem]
@inAccountingSystemTypeCode varchar(2),
@inSessionID varchar(50),
@inObjectName varchar(20),
@inObjectID int
as
set nocount on
declare @ERROR_UNSUPPORTED_ACCOUNTING_SYSTEM int = 780
declare @theAccountingSystemName varchar(64)
if( @inAccountingSystemTypeCode = 'XL' )
begin
set @theAccountingSystemName = 'XLedger'
end
else if( @inAccountingSystemTypeCode = 'GP' )
begin
exec BATErrorVerifyGreatPlains
@inSessionID = @inSessionID,
@inObjectName = @inObjectName,
@inObjectID = @inObjectID
end
else
begin
if( @inAccountingSystemTypeCode = 'QB' )
begin
set @theAccountingSystemName = 'the QuickBooks'
end
else if( @inAccountingSystemTypeCode = 'NO' )
begin
set @theAccountingSystemName = 'when there is no installed'
end
else
begin
set @theAccountingSystemName = @inAccountingSystemTypeCode
end
exec spBATRecordError
@inSessionID = @inSessionID,
@inSourceTable = null,
@inSourceID = null,
@inErrorCodeID = @ERROR_UNSUPPORTED_ACCOUNTING_SYSTEM,
@inObjectTable = @inObjectName,
@inObjectID = @inObjectID,
@inParam1 = @theAccountingSystemName
end
GO
GRANT EXECUTE ON [dbo].[BATErrorVerifyAccountingSystem] TO [MssExec]
GO