Example #1
0
 public function currency($ccode)
 {
     $admcurrency = parent::currency($ccode);
     $options = Mage::helper('currencymanager')->getOptions(array(), true, $ccode);
     $admcurrency->setFormat($options, $ccode);
     return $admcurrency;
 }
Example #2
0
 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     if ($data = (string) $row->getData($this->getColumn()->getIndex())) {
         $currency_code = $this->_getCurrencyCode($row);
         $data = floatval($data) * $this->_getRate($row);
         $sign = (bool) (int) $this->getColumn()->getShowNumberSign() && $data > 0 ? '+' : '';
         $data = sprintf("%f", $data);
         $data = $this->_locale->currency($currency_code)->toCurrency($data);
         return $sign . $data;
     }
     return $this->getColumn()->getDefault();
 }