UFN_RESERVATION_GETRESOURCETOTAL
Returns the total cost for supplies/equipment resources for the reservation
Return
Return Type |
---|
money |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_RESERVATION_GETRESOURCETOTAL(@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 (8,9)
),0);
end