In the system/library/currency.php file you have:
Code: Select all
public function format($number, $currency = NULL, $value = NULL, $format = TRUE) {
if ($currency) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = $this->currencies[$this->code]['symbol_right'];
$decimal_place = $this->currencies[$this->code]['decimal_place'];
}
if ($value) {
$value = $value;
} else {
$value = $this->currencies[$this->code]['value'];
}
.............
It needs to be something like this:
Code: Select all
public function format($number, $currency = NULL, $value = NULL, $format = TRUE) {
if ($currency) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = $this->currencies[$this->code]['symbol_right'];
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}
if ($value) {
$value = $value;
} else {
$value = $this->currencies[$currency]['value'];
}
.............