UFN_RESOURCE_CALCULATEPERTICKETQUANTITY

Calculates the per ticket quantity with correct rounding

Return

Return Type
int

Parameters

Parameter Parameter Type Mode Description
@DIVIDEND decimal(18, 0) IN
@DIVISOR decimal(18, 0) IN

Definition

Copy


CREATE function dbo.UFN_RESOURCE_CALCULATEPERTICKETQUANTITY
(
    @DIVIDEND decimal,
    @DIVISOR decimal
)
returns int
as begin
    declare @PERTICKETQUANTITY int = dbo.UFN_RESOURCE_CALCULATEPERTICKETQUANTITY_2 (
        cast(@DIVIDEND as int), 
        cast(@DIVISOR as int)
    )

    return @PERTICKETQUANTITY;
end