USP_SIMPLEDATALIST_PDACCOUNTSYSTEMTRANSACTIONCURRENCIES

Returns a list of transaction currencies for the currency set associated with the given account system.

Parameters

Parameter Parameter Type Mode Description
@PDACCOUNTSYSTEMID uniqueidentifier IN Account system ID
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.

Definition

Copy


                CREATE procedure dbo.USP_SIMPLEDATALIST_PDACCOUNTSYSTEMTRANSACTIONCURRENCIES
                (
                    @PDACCOUNTSYSTEMID uniqueidentifier = null,
                    @CURRENTAPPUSERID uniqueidentifier = null
                )
                as
                    set nocount on;

                    declare @CURRENCYSETID uniqueidentifier;
                    select @CURRENCYSETID = CURRENCYSETID from dbo.PDACCOUNTSYSTEM where ID = @PDACCOUNTSYSTEMID;

                    select
                        CURRENCY.ID as VALUE,
                        dbo.UFN_CURRENCY_GETDESCRIPTION(CURRENCY.ID) as LABEL
                    from 
                        dbo.CURRENCY
                        inner join dbo.CURRENCYSETTRANSACTIONCURRENCY on CURRENCYSETTRANSACTIONCURRENCY.CURRENCYID = CURRENCY.ID
                    where
                        CURRENCYSETTRANSACTIONCURRENCY.CURRENCYSETID = coalesce(@CURRENCYSETID,dbo.UFN_CURRENCYSET_GETAPPUSERCURRENCYSET(@CURRENTAPPUSERID))
                        and CURRENCY.INACTIVE = 0