UFN_JOURNALENTRYBATCHNUMBER_ISVALID
Verifies that regular journal entry batch numbers are in sequential order.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@BATCHNUMBER | int | IN |
Definition
Copy
CREATE function dbo.UFN_JOURNALENTRYBATCHNUMBER_ISVALID
(
@BATCHNUMBER int
)
returns bit
with execute as caller
as begin
if @BATCHNUMBER is null
return 1;
if @BATCHNUMBER =
(
select ISNULL(MAX(BATCHNUMBER),0) + 1
from dbo.JOURNALENTRYBATCH
)
return 1;
return 0;
end