USP_DATALIST_GLREVENUECATEGORYMAPPING
Returns a list of revenue categories and their GL account mappings.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@INCLUDEINACTIVE | bit | IN | Include inactive |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_GLREVENUECATEGORYMAPPING
(
@INCLUDEINACTIVE bit = 0
)
as
set nocount on;
select
MAP.ID,
MAP.REVENUECATEGORYNAME,
MAP.ACCOUNTCODE,
case coalesce(MAP.ACCOUNTCODE,'') when '' then 'RES:warning' else '' end,
null,
MAP.ACTIVE
from
dbo.GLREVENUECATEGORYMAPPING MAP
where
MAP.ACTIVE = 1 or @INCLUDEINACTIVE = 1
union all
select
null,
'<Default>',
GLPREFERENCEINFO.EMPTYREVENUECATEGORYACCOUNTCODE,
case coalesce(GLPREFERENCEINFO.EMPTYREVENUECATEGORYACCOUNTCODE,'') when '' then 'RES:warning' else '' end,
GLPREFERENCEINFO.ID,
1
from
dbo.GLPREFERENCEINFO
order by
MAP.REVENUECATEGORYNAME