public function decimal($amount, $currency_code)
    {
        static $divisors = array();

        if (empty($divisors[$currency_code])) {
            $currency = $this->currency->get($currency_code);
            $divisors[$currency_code] = pow(10, $currency['decimals']);
        }

        return $amount / $divisors[$currency_code];
    }
public function decimal($amount, $currency_code)
    {
        static $divisors = array();

        if (empty($divisors[$currency_code])) {
            $currency = $this->currency->get($currency_code);
            $divisors[$currency_code] = pow(10, $currency['decimals']);
        }

        return $amount / $divisors[$currency_code];
    }
public function decimal ( $ amount , $ currency_code ) { static $ divisors = array ( ) ; if ( empty ( $ divisors [ $ currency_code ] ) ) { $ currency = $ this -> currency -> get ( $ currency_code ) ; $ divisors [ $ currency_code ] = pow ( 10 , $ currency [ 'decimals' ] ) ; } return $ amount / $ divisors [ $ currency_code ] ; }
Converts an amount from minor to major units
@param integer $amount
@param string $currency_code
@return float
Converts an amount from minor to major units