UFN_PAPERLESSMANDATES_ENABLED_FORREVENUE
Returns a flag indicating if paperless mandates are enabled for a given revenue.
Return
| Return Type | 
|---|
| int | 
Parameters
| Parameter | Parameter Type | Mode | Description | 
|---|---|---|---|
| @REVENUEID | uniqueidentifier | IN | 
Definition
 Copy 
                                    
            create function dbo.UFN_PAPERLESSMANDATES_ENABLED_FORREVENUE(@REVENUEID uniqueidentifier = null)
            returns integer
            with execute as caller
            as begin
                declare @ENABLED integer;
                set @ENABLED = 0;
                select distinct 
                    @ENABLED = dbo.UFN_PAPERLESSMANDATES_ENABLED_FORSITE(SITEID)
                from
                    dbo.UFN_SITEID_MAPFROM_REVENUEID(@REVENUEID)
                -- Something is really wrong. Set enabled to error state.
                if @@ROWCOUNT > 1
                    set @ENABLED = -1;
                return @ENABLED;
            end