Stored Procedures [dbo].[GenerateAccountingBatches]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)Direction
@inBatchDescriptionnvarchar(64)128
@inBatProcessAcctTransctionsMapBATProcessAcctTransactionsmax
@inSubmittedBySysUserIdint4
@inSendToAccountingSystembit1
@outErrorCodeint4Out
@outXLedgerJournalEntryBatchIdint4Out
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script

--Generates the third-party-specific accounting system data necessary to propagate the accounting items to a third party accounting system.
create procedure [dbo].[GenerateAccountingBatches]
    @inBatchDescription nvarchar(64),
    @inBatProcessAcctTransctionsMap BATProcessAcctTransactions readonly,
    @inSubmittedBySysUserId int,
    @inSendToAccountingSystem bit = 1,
    @outErrorCode int output,
    @outXLedgerJournalEntryBatchId int output
as
begin

    if(dbo.IsBc() = 1)
    begin

        exec GenerateAccountingBatches_Bc
            @inBatchDescription = @inBatchDescription,
            @inBatProcessAcctTransctionsMap = @inBatProcessAcctTransctionsMap,
            @inSubmittedBySysUserId = @inSubmittedBySysUserId,
            @inSendToAccountingSystem = @inSendToAccountingSystem,

            @outErrorCode = @outErrorCode output,

            --BCTD:  Commenting output to avoid showing xledger dialogs.  will eventually rework this to do something unique for BC.
            @outXLedgerJournalEntryBatchId = @outXLedgerJournalEntryBatchId -- output
        return
    end

    --use the appropriate synonym otherwise (XLedger or GP)
    exec GenerateAccountingBatches_Synonym
        @inBatchDescription = @inBatchDescription,
        @inBatProcessAcctTransctionsMap = @inBatProcessAcctTransctionsMap,
        @inSubmittedBySysUserId = @inSubmittedBySysUserId,
        @inSendToAccountingSystem = @inSendToAccountingSystem,
        @outErrorCode = @outErrorCode output,
        @outXLedgerJournalEntryBatchId = @outXLedgerJournalEntryBatchId output

end
GO
GRANT EXECUTE ON  [dbo].[GenerateAccountingBatches] TO [MssExec]
GO
Uses