isoCode for $

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

isoCode for $

Patrick-4
<@ofbizCurrency isoCode="USD" amount=orderItem2.unitPrice/>

isoCode="USD" renders to US$

what's the code for simple "$"  ?
Reply | Threaded
Open this post in threaded view
|

Re: isoCode for $

Brajesh Patel-2
Hi Patrick,
following code will help you,

org.ofbiz.base.util.UtilFormatOut.formatCurrency(orderItem2.unitPrice,
currencyUomId, UtilHttp.getLocale(request)))

Brajesh Patel

Patrick wrote:
> <@ofbizCurrency isoCode="USD" amount=orderItem2.unitPrice/>
>
> isoCode="USD" renders to US$
>
> what's the code for simple "$"  ?
>  

Reply | Threaded
Open this post in threaded view
|

Re: isoCode for $

Varun Bhansaly
Hi,
Is there a way to access the same method from ftl ?
When I use
<#assign test =
Static["org.ofbiz.base.util.UtilFormatOut"].formatCurrency(shippingEst,
shoppingCart.getCurrency(), locale, 2)>

It throws following exception visible in the console -

freemarker.template.TemplateModelException: Multiple signatures of
method formatCurrency match the arguments

This link explpains unwrapping rules
http://freemarker.sourceforge.net/docs/pgui_misc_beanwrapper.html

Thanks.


On Fri, Apr 9, 2010 at 8:20 AM, Brajesh Patel
<[hidden email]> wrote:

> Hi Patrick,
> following code will help you,
>
> org.ofbiz.base.util.UtilFormatOut.formatCurrency(orderItem2.unitPrice,
> currencyUomId, UtilHttp.getLocale(request)))
>
> Brajesh Patel
>
> Patrick wrote:
>>
>> <@ofbizCurrency isoCode="USD" amount=orderItem2.unitPrice/>
>>
>> isoCode="USD" renders to US$
>>
>> what's the code for simple "$"  ?
>>
>
>



--
Regards,
Varun Bhansaly