protected function convertValue(array $price_rule, $currency)
    {
        $amount = $this->price->amount(abs($price_rule['value']), $price_rule['currency']);
        $converted = $this->currency->convert($amount, $price_rule['currency'], $currency);
        return $price_rule['value'] < 0 ? -$converted : $converted;
    }
protected function convertValue(array $price_rule, $currency)
    {
        $amount = $this->price->amount(abs($price_rule['value']), $price_rule['currency']);
        $converted = $this->currency->convert($amount, $price_rule['currency'], $currency);
        return $price_rule['value'] < 0 ? -$converted : $converted;
    }
protected function convertValue ( array $ price_rule , $ currency ) { $ amount = $ this -> price -> amount ( abs ( $ price_rule [ 'value' ] ) , $ price_rule [ 'currency' ] ) ; $ converted = $ this -> currency -> convert ( $ amount , $ price_rule [ 'currency' ] , $ currency ) ; return $ price_rule [ 'value' ] < 0 ? - $ converted : $ converted ; }
Converts a price rule value to the minor units considering the currency
@param array $price_rule
@param string $currency
@return int
Converts a price rule value to the minor units considering the currency