Currency

Type
Class
Namespace
craft\commerce\helpers
Inherits
craft\commerce\helpers\Currency
Since
2.0

Class Currency

View source

Public Methods

MethodDescription
defaultDecimals()
round()Rounds the amount as per the currency minor unit information. Not passing a currency model results in rounding in default currency.

defaultDecimals()

Signature

public static integer defaultDecimals ( )

round()

Rounds the amount as per the currency minor unit information. Not passing a currency model results in rounding in default currency.

View source

Arguments

Returns

float

Signature

public static float round ( $amount, $currency = null )