src/Genesis/Utils/Currency.php
public static function exponentToAmount($amount, $iso)
    {
        $iso = strtoupper($iso);

        if (array_key_exists($iso, self::$iso4217)) {
            $exp = intval(self::$iso4217[$iso]['exponent']);

            if ($exp > 0) {
                return bcdiv($amount, pow(10, $exp), $exp);
            }
        }

        return strval($amount);
    }
public static function exponentToAmount($amount, $iso)
    {
        $iso = strtoupper($iso);

        if (array_key_exists($iso, self::$iso4217)) {
            $exp = intval(self::$iso4217[$iso]['exponent']);

            if ($exp > 0) {
                return bcdiv($amount, pow(10, $exp), $exp);
            }
        }

        return strval($amount);
    }
public static function exponentToAmount ( $ amount , $ iso ) { $ iso = strtoupper ( $ iso ) ; if ( array_key_exists ( $ iso , self :: $ iso4217 ) ) { $ exp = intval ( self :: $ iso4217 [ $ iso ] [ 'exponent' ] ) ; if ( $ exp > 0 ) { return bcdiv ( $ amount , pow ( 10 , $ exp ) , $ exp ) ; } } return strval ( $ amount ) ; }
Convert ISO-4217 minor currency unit to amount

@param $amount - amount to convert
@param $iso    - iso code of the currency

@return string - using string as we don't want to cast it without knowing how much precision
is required
Convert ISO - 4217 minor currency unit to amount