CORE POS - Fannie
The CORE POS back end
Public Member Functions | List of all members
COREPOS\Fannie\API\item\PriceRounder Class Reference

Public Member Functions

 round ($price, $extra_parameters=array())
 

Detailed Description

API class to define rounding rules used when setting prices

Member Function Documentation

COREPOS\Fannie\API\item\PriceRounder::round (   $price,
  $extra_parameters = array() 
)

The round function takes a numeric price and returns it with the correct rounding rules applied

Parameters
$price[decimal] number to be rounded
$extra_parameters[array] optional extra arguments if pricing rules are extremely complex
Returns
[decimal] rounded price

This function will always round UP so the return price ends in a 5 or a 9. Values ending in 05 and 09 are excluded so a price $x.00 through $x.14 will round up to $x.15.


The documentation for this class was generated from the following file: