Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.0
-
Fix Version/s: 1.9.0
-
Component/s: Zend_Currency, Zend_Locale
-
Labels:None
Description
I did not have the time to debug this bug, but I think it also depends on Zend_Locale_Format::toNumber().
I have tried the following:
Unable to find source-code formatter for language: php. Available languages are: javascript, sql, xhtml, actionscript, none, html, xml, java
require_once 'Zend/Currency.php'; $currency = new Zend_Currency(null, 'de_DE'); Zend_Debug::dump($currency->toCurrency(-74.95, array('currency' => 'EUR', 'precision' => 4))); // returns -74 $currency = new Zend_Currency(null, 'en_US'); Zend_Debug::dump($currency->toCurrency(-74.95, array('currency' => 'USD', 'precision' => 4))); // returns $-(74.9500)
As you can see, for de_DE with EUR, the precision part completely misses, and I don't know why there are brackets for en_US with USD, because it doesn't look valid. I would think of a return value like "$-74.9500". If I'm wrong, please let me know.
The same problem with 1.8:
Here is what I see:
It seems, something wrong with formatting negative values..