ZF-6655: Zend_Currency::toCurrency(): wrong display with use of "precision"
Description
I've tried the following code:
{{ $currency = new Zend_Currency('de_DE'); echo $currency->toCurrency(34567.43212, array('precision' => 2)); echo $currency->toCurrency(34567.43212, array('precision' => 0)); }}
The first echo returns "34.567,43 €" as it should. The second echo should return "34.567 €" but it returns "34.567.00 €". I guess with versions 1.7.x of ZF that problem didn't exists.
Comments
Posted by Master Surfer (mastersurfer84) on 2009-05-16T02:52:45.000+0000
Hello Thomas,
okay I've tried the format-options in the array. Like that: {{echo $currency->toCurrency(34567.43212, array('precision' => 0, 'format' => '#,##0'))
Posted by Master Surfer (mastersurfer84) on 2009-05-16T02:54:39.000+0000
Hello Thomas,
okay I've tried the format-options in the array. Like that: {{ echo $currency->toCurrency(34567.43212, array('precision' => 0, 'format' => '#,##0')) }} But I always get an error "'#,##0' is not a known locale." I've tried different format tags, but only "0" worked without an error. But the result was the same old mistake "34.567.00 €". So how will I get "34.567 €"??
Posted by Thomas Weidner (thomas) on 2009-05-16T07:35:04.000+0000
Fixed with r15607