UFN_JOURNALENTRYBATCH_GETNEXTNUMBER

Gets the next sequential journal entry regular batch number.

Return

Return Type
int

Definition

Copy


            CREATE function dbo.UFN_JOURNALENTRYBATCH_GETNEXTNUMBER()
            returns integer
            with execute as caller
            as begin
                declare @NUMBER integer;

                select @NUMBER = ISNULL(MAX(BATCHNUMBER),0) + 1
                    from dbo.JOURNALENTRYBATCH

                return @NUMBER
            end