UFN_ADJUSTMENT_ISONLYUNPOSTED
Validates that the revenue is a posted.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REVENUEID | uniqueidentifier | IN | |
@ADJUSTMENTID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_ADJUSTMENT_ISONLYUNPOSTED
(
@REVENUEID uniqueidentifier,
@ADJUSTMENTID uniqueidentifier
)
returns bit
with execute as caller
as
begin
declare @r as int
select @r = count(*) from dbo.ADJUSTMENT where REVENUEID = @REVENUEID and ID <> @ADJUSTMENTID and POSTSTATUSCODE = 1
if @r = 0 --No others
return 1
return 0
end