Stored Procedures [dbo].[UpdateApplyGridOriginalBalances]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inOrderIDint4
@inStatementDetailIDint4
@inStatementDetailDistIDint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
--
/**
* Description: After the Apply grid is built up from accounting data, this procedure is
* called to see if other batches have been posted and imported into that system that
* affect the original balance when the apply grid was originally built or this stored proc
* subsequently updated.
*
* This sp just decides which accounting system is in use and then calls the appropriate
* stored proc (if any).
*/

CREATE PROCEDURE [dbo].[UpdateApplyGridOriginalBalances]
    @inOrderID int,
    @inStatementDetailID int,
    @inStatementDetailDistID int
as
set nocount on

declare @AccountingSystemType varchar(2)
set @AccountingSystemType = dbo.GetAccountingSystemType()

if( @AccountingSystemType = 'XL' )
begin
    exec UpdateXLApplyGridOriginalBalances @inOrderID, @inStatementDetailID, @inStatementDetailDistID
end
else if( @AccountingSystemType = 'GP' )
begin
    exec UpdateGPApplyGridOriginalBalances @inOrderID, @inStatementDetailID, @inStatementDetailDistID
end
GO
GRANT EXECUTE ON  [dbo].[UpdateApplyGridOriginalBalances] TO [MssExec]
GO
Uses