From 58e35f3da890d0e112a1052ee1bf7c191fc2e1a2 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 11 Jul 2012 08:20:23 +0000 Subject: [PATCH] [*] BO : #PSCFV-2671 : Added a new currency format for Switzerland --- classes/Tools.php | 4 ++++ controllers/admin/AdminCurrenciesController.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/Tools.php b/classes/Tools.php index 99cffabee..4eb8fb0a2 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -499,6 +499,10 @@ class ToolsCore case 4: $ret = number_format($price, $c_decimals, '.', ',').$blank.$c_char; break; + /* 0 000.00 X Added for the switzerland currency */ + case 5: + $ret = number_format($price, $c_decimals, '.', ' ').$blank.$c_char; + break; } if ($is_negative) $ret = '-'.$ret; diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php index aeb2475eb..dfe543918 100644 --- a/controllers/admin/AdminCurrenciesController.php +++ b/controllers/admin/AdminCurrenciesController.php @@ -155,6 +155,7 @@ class AdminCurrenciesControllerCore extends AdminController array('key' => 2, 'name' => '0 000,00X ('.$this->l('as with Euros').')'), array('key' => 3, 'name' => 'X0.000,00'), array('key' => 4, 'name' => '0,000.00X'), + array('key' => 5, 'name' => '0 000.00X') // Added for the switzerland currency ), 'name' => 'name', 'id' => 'key' @@ -286,7 +287,7 @@ class AdminCurrenciesControllerCore extends AdminController */ public function processExchangeRates() { - if (!$this->errors[] = Currency::refreshCurrencies()) + if (!$this->errors = Currency::refreshCurrencies()) Tools::redirectAdmin(self::$currentIndex.'&conf=6&token='.$this->token); }