UFN_RESERVATION_GETSTAFFRESOURCETOTAL
Returns the total cost for staffing resources for the reservation
Return
Return Type |
---|
money |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_RESERVATION_GETSTAFFRESOURCETOTAL(@ID uniqueidentifier)
returns money
with execute as caller
as begin
return coalesce(
(select sum(TOTAL)
from dbo.SALESORDERITEM
where SALESORDERITEM.SALESORDERID = @ID
and SALESORDERITEM.TYPECODE in (10,11)
),0);
end