UFN_SALESORDERITEMFEE_CALCULATE
Calculates the price of a fee item record.
Return
Return Type |
---|
money |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@SALESORDERID | uniqueidentifier | IN | |
@FEEID | uniqueidentifier | IN | |
@PERCENT | decimal(20, 4) | IN | |
@SALESORDERITEMID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_SALESORDERITEMFEE_CALCULATE
(
@ID uniqueidentifier,
@SALESORDERID uniqueidentifier,
@FEEID uniqueidentifier,
@PERCENT decimal(20,4) = null,
@SALESORDERITEMID uniqueidentifier = null
)
returns money
as
begin
--Creating a "_2" to remove the misconception that we need the @ID parameter
--We weren't using the @ID passed in. This is good! Not needing @ID useful for me--I want to be able to calculate a fee before creating the item.
--Also writing this comment so if someone changes this function to make use of the @ID that they know there are places that are not providing one
--I'd expect changes to be made to the "_2" version anyway...
return dbo.UFN_SALESORDERITEMFEE_CALCULATE_2(@SALESORDERID, @FEEID, @PERCENT, @SALESORDERITEMID);
end