Issues

ZF-6655: Zend_Currency::toCurrency(): wrong display with use of "precision"

Issue Type: Bug Created: 2009-05-14T09:16:02.000+0000 Last Updated: 2009-05-16T07:35:04.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: Master Surfer (mastersurfer84) Assignee: Thomas Weidner (thomas) Tags: - Zend_Currency

Related issues: - ZF-6560

Attachments:

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts