USP_SIMPLEDATALIST_ADJUSTMENTCATEGORY

This provides a simple list of adjustment categories.

Parameters

Parameter Parameter Type Mode Description
@BANKACCOUNTID uniqueidentifier IN

Definition

Copy


                CREATE procedure dbo.USP_SIMPLEDATALIST_ADJUSTMENTCATEGORY
                    (
                        @BANKACCOUNTID uniqueidentifier
                    ) 
                    as

                    set nocount on;

          --You can not do a 'transfer in' if multicurrency is enabled since exchange rates

          --are not bi-directional.  You start with the transaction you are on and exchange from it.

          --A transfer in would start with another transaction and exchange to the current transaction

          --which is not allowed.  Due to this we are no longer allowing you to pick a category of 'transfer in'.

          if dbo.UFN_CONDITIONSETTING_EVALUATEEXISTSCONDITION('Multicurrency')=1          
            begin
                        select 
                            ID as VALUE
                            CATEGORY as LABEL
                        from dbo.BANKACCOUNTADJUSTMENTCATEGORY
                        where 
                BANKACCOUNTID = @BANKACCOUNTID
                AND ADJUSTMENTTYPECODE <> 33
                        order by CATEGORY    
            end
          else
            begin
              select 
                            ID as VALUE
                            CATEGORY as LABEL
                        from dbo.BANKACCOUNTADJUSTMENTCATEGORY
                        where BANKACCOUNTID = @BANKACCOUNTID
                        order by CATEGORY    
            end