USP_DATAFORMTEMPLATE_ADD_BANKACCOUNTADJUSTMENT_PRELOAD

The load procedure used by the edit dataform template "Bank Account Adjustment Add Form"

Parameters

Parameter Parameter Type Mode Description
@BANKACCOUNTID uniqueidentifier IN Input parameter indicating the context ID for the record being added.
@PDACCOUNTSYSTEMID uniqueidentifier INOUT Account System
@TRANSACTIONCURRENCYID uniqueidentifier INOUT Transaction currency
@BASECURRENCYID uniqueidentifier INOUT Base currency
@BANKACCOUNTNAME nvarchar(100) INOUT Bank account name
@ALLOWGLDISTRIBUTIONS bit INOUT Allow GL distributions

Definition

Copy


        CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_BANKACCOUNTADJUSTMENT_PRELOAD
        (
            @BANKACCOUNTID uniqueidentifier,
            @PDACCOUNTSYSTEMID uniqueidentifier = null output,
            @TRANSACTIONCURRENCYID uniqueidentifier = null output,
            @BASECURRENCYID uniqueidentifier = null output,
            @BANKACCOUNTNAME nvarchar(100) = null output,
            @ALLOWGLDISTRIBUTIONS bit = null output
        )
        as
            set nocount on;    

            -- @PDACCOUNTSYSTEMID can be set by the user but is should not be...this parameter has to remain due to

            -- binary compatibility.  We will always set it to the PDACCOUNTSYSTEMID of the bank account.

            -- TRANSACTIONCURRENCYID is defined by the bank so we always retrieve it from the bank.

            -- BASECURRENCYID is pulled from the PDACCOUNTSYSTEM of the bank.

            select @PDACCOUNTSYSTEMID = PDACCOUNTSYSTEMID,
                         @TRANSACTIONCURRENCYID = TRANSACTIONCURRENCYID, 
                         @BASECURRENCYID = BASECURRENCYID,
                         @BANKACCOUNTNAME = ACCOUNTNAME,
                         @ALLOWGLDISTRIBUTIONS = PAS.ALLOWGLDISTRIBUTIONS
            from dbo.BANKACCOUNT as BA
                inner join dbo.PDACCOUNTSYSTEM as PAS on BA.PDACCOUNTSYSTEMID = PAS.ID
                inner join dbo.CURRENCYSET as CS on PAS.CURRENCYSETID = CS.ID
            where BA.ID = @BANKACCOUNTID      

            return 0;