Re: Funny behaviour

2011-03-11 Thread Alejandro Gómez Fernández
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Is the normal behavior for negative numbers in currency::number helper.
See 7.7.1 section in the manual and you will see that in options you can
define what character you want to use. The "()" are an "acccountable"
form to show negative numbers, many times, in red.
If you want to change this, set the corresponding option.

Regards,



Alejandro Gomez.





El 11/03/2011 09:16, heohni escribió:
> Hi
> 
> I have this helper:
> public function showGermanMoneyFormat($value){
> $this->Number->addFormat('EUR', array('after' => ' €',
> 'decimals' => ',', 'thousands' => '.'));
> return $this->Number->currency($value, 'EUR');
> }
> 
> And I call it this way:
> Common->showGermanMoneyFormat($sum);?>
> 
> I one case, my money value is for example -10.00
> On my page it gets displayed like (10,00 €)
> 
> I have no idea, where the brackets are coming form?
> I just wanted to show -10,00 € instead.
> Is this from the $this->Number->addFormat() or the $this->Number-
>> currency()?
> 
> Looking forward to your opinions.
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNejJoAAoJEHQn9CmeN9DJQDUIALFYuyC6JDT53Qo+7lVEEH1A
0c8Quc/MB2WHqBz8q0kgW0CYyXl1DJMP76vzQEId2k9ftG5kWBnw9gg+QQzMMhaf
oLBDlsnJjMe4bDqcG2ZyFwJ80zOJl6wznyv07B9alyUK5i0saFbMW4R8JSSXRimw
w56fW/FS9k7e8cRUjjywu/fke/1tOLOZoNpNkX5HqGhDC8HgaOZPns57nBefS/zV
9XmjkOGJFRmvGvZO5c/c+aw/OB85ko0wKOw4/E8hPbbECKcXXvL+Acamc1otDO93
pOURGttlNwsiiVQQYTtna3Mjxp+buZkUv8N4p4/WFEYKyU14MmJLTg2JonCuiqg=
=5/Kq
-END PGP SIGNATURE-

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Funny behaviour

2011-03-11 Thread heohni
Hi

I have this helper:
public function showGermanMoneyFormat($value){
$this->Number->addFormat('EUR', array('after' => ' €',
'decimals' => ',', 'thousands' => '.'));
return $this->Number->currency($value, 'EUR');
}

And I call it this way:
Common->showGermanMoneyFormat($sum);?>

I one case, my money value is for example -10.00
On my page it gets displayed like (10,00 €)

I have no idea, where the brackets are coming form?
I just wanted to show -10,00 € instead.
Is this from the $this->Number->addFormat() or the $this->Number-
>currency()?

Looking forward to your opinions.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php