Changed default value for thousandsSeparator

This commit is contained in:
Akinwale Ariwodola 2017-06-13 20:07:29 +01:00
parent e2a383a064
commit a7ef82fd69

View file

@ -5,7 +5,7 @@ namespace App\View\Helper;
use Cake\View\Helper; use Cake\View\Helper;
class AmountHelper extends Helper { class AmountHelper extends Helper {
public function format($value, $thousandsSeparator = '') { public function format($value, $thousandsSeparator = ',') {
$value = number_format($value, 8, '.', $thousandsSeparator); $value = number_format($value, 8, '.', $thousandsSeparator);
$dotIdx = strpos($value, '.'); $dotIdx = strpos($value, '.');
if ($dotIdx !== false) { if ($dotIdx !== false) {
@ -21,7 +21,7 @@ class AmountHelper extends Helper {
return $value; return $value;
} }
public function formatCurrency($value, $thousandsSeparator = '') { public function formatCurrency($value, $thousandsSeparator = ',') {
$dotIdx = strpos($value, '.'); $dotIdx = strpos($value, '.');
if ($dotIdx !== false) { if ($dotIdx !== false) {
$left = substr($value, 0, $dotIdx); $left = substr($value, 0, $dotIdx);