USP_DATALIST_PROGRAMGLMAPPING

A datalist of all programs and the associated GL mapping.

Parameters

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

Definition

Copy


                create procedure dbo.USP_DATALIST_PROGRAMGLMAPPING(@CURRENTAPPUSERID uniqueidentifier = null)
                as                 
                    set nocount on;

                    select 
                        PROGRAM.ID, 
                        PROGRAM.[NAME] as PROGRAMNAME,
                        MAP.ACCOUNTNUMBER,
                        MAP.PROJECTCODE,
                        'IMAGEKEY' = case when (MAP.ACCOUNTNUMBER is null or MAP.ACCOUNTNUMBER = '' 
                                        or MAP.PROJECTCODE is null or MAP.PROJECTCODE = '') then 'RES:warning' else '' end
                    from dbo.PROGRAM
                    left join dbo.PROGRAMGLMAPPING as MAP on PROGRAM.ID = MAP.ID    
                    order by PROGRAM.NAME;