Calculate tax for a line.
public static calc_tax ( float $price, array $rates, boolean $price_includes_tax = false, boolean $suppress_rounding = false ) : array | ||
$price | float | Price to calc tax on |
$rates | array | Rates to apply |
$price_includes_tax | boolean | Whether the passed price has taxes included |
$suppress_rounding | boolean | Whether to suppress any rounding from taking place |
return | array | Array of rates + prices after tax |