Different Currencies - Invoices and Order Details

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Different Currencies - Invoices and Order Details

Post by niall08 » Tue Apr 21, 2009 7:18 am

Our primary currency is British Pounds, with options for US Dollars and Euros.

If a purchase is made in Euros, everything appears to be fine for the customer - but on the Admin side, the order details appear in the primary currency, and the printed invoice shows product details in Euros, but totals and tax amounts in British Pounds.

Is this the way it should be?


niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Different Currencies - Invoices and Order Details

Post by niall08 » Tue Apr 21, 2009 9:30 am

Thanks for the link Mazhar..

That's not quite what I mean..

In the printed invoice, the unit price etc has been set to display the currency in the ULC format, while the shipping, taxes, and total have been set to LC - this meant that, in my scenario where I've set the client-side site to use the euro, the unit price was in euros, and the total etc was in pounds sterling (the primary currency).

I've since set all of the strings to display as ULC.

I'll have to try that bespoke class and display all of the values in the currency selected by the user..

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Different Currencies - Invoices and Order Details

Post by niall08 » Tue Apr 21, 2009 9:40 am

Mazhar - I'm not sure I follow the code that you provided..

Code: Select all

Order order = OrderDataSource.Load(199);
foreach(OrderItem oi in order.Items)
{
if (oi.OrderItemType == OrderItemType.Product)
                Response.Write(oi.Price.ToString();//CHelper.ToString(order.User,oi.Price));
}
What function is being called in the attached zip file / Class?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Different Currencies - Invoices and Order Details

Post by mazhar » Tue Apr 21, 2009 10:00 am

Opps it seems that I have attached wrong file to that thread :oops: Any how you can try following function by putting it somewhere in PageHelper class

Code: Select all

public static string GetPrice(CommerceBuilder.Users.User user,LSDecimal price) 
    {
        decimal decimalPrice = AlwaysConvert.ToDecimal(price.ToString());
        return string.Format(Token.Instance.User.UserCurrency, "{0:lc}",decimalPrice);
    }

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Different Currencies - Invoices and Order Details

Post by niall08 » Wed Apr 22, 2009 9:10 am

Mazhar - is there any way to push the payment to the payment gateway in the user's selected currency, or MUST the payment be in the primary currency of the AC configuration??

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Different Currencies - Invoices and Order Details

Post by mazhar » Wed Apr 22, 2009 9:39 am

niall08 wrote:Mazhar - is there any way to push the payment to the payment gateway in the user's selected currency, or MUST the payment be in the primary currency of the AC configuration??
Please read following post
viewtopic.php?f=42&t=10693

Post Reply