Forums / Managing Customers and Orders / Show default currency on invoice as well as currency used?

Show default currency on invoice as well as currency used?

Locked

Started by phil020782 on 25 Mar 2010, 6:16 PM · Views: 4,168

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
25 Mar 2010, 6:16 PM
#1
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Show default currency on invoice as well as currency used?

Hi,

I wonder if anyone can help me.
My store has 5 available currencies £GBP (default), US$, CAN$, AUS$ and Euro.

Whenever someone places an order in a currency other than £GBP their currency shows on the invoice which is fine but it makes it difficult for me when it comes to tax time. I keep copies of all invoices incase I ever need to produce them for tax purposes, but because they don't show the GBP equivalent on them it isn't clear how much the order total is.

what I would like to do is keep the invoice as is but under order total add an extra section for order total in GBP.

An even better option would be if I could leave the customers invoice as is and only include the GBP equivalent on the admin invoice.

Any ideas or advice would be greatly appreciated.

Thanks

18 Jul 2010, 11:32 AM
#3
dropbop avatar

dropbop

Zen Follower

Join Date:
Apr 2008
Location:
Athlone, Ireland
Posts:
177
Plugin Contributions:
1

Re: Show default currency on invoice as well as currency used?

I could aslo do with this.

I sell in British Pounds, but my VAT has to be calculated in Euros, so something like was Phil suggests would save a lot of people a great deal of time when calculating exchange rates. At the moment I am doing it on a daily basis, and tbh, is a right pain in the bum. :P

All thats needed really, is to be able to show 2 currencies on the admin invoice. I have tried to do it, but its not happening for me. I tried to go by how its done in the 'Display Different Currencies' module.

Any help appreciated

regards

DB

3 Oct 2010, 12:36 PM
#4
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: Show default currency on invoice as well as currency used?

Hi,
When I log into my admin control panel goto customers-->orders and open an order the middle panel that shows the address, payment method, payment currency, paypal fees etc has a place for exchange rate but there is no value entered for it. How can I get the exchange rate to display on the order pages?

Thanks

6 Oct 2010, 11:53 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Show default currency on invoice as well as currency used?

Your duplicate posts have been merged.> Phil020782:

Hi,
When I log into my admin control panel goto customers-->orders and open an order the middle panel that shows the address, payment method, payment currency, paypal fees etc has a place for exchange rate but there is no value entered for it. How can I get the exchange rate to display on the order pages?You're talking about the "gray" table that shows information about the order as reported from PayPal.
I wouldn't advise messing with that.
Phil020782:

Hi,I wonder if anyone can help me.
My store has 5 available currencies £GBP (default), US$, CAN$, AUS$ and Euro.

Whenever someone places an order in a currency other than £GBP their currency shows on the invoice which is fine but it makes it difficult for me when it comes to tax time. I keep copies of all invoices incase I ever need to produce them for tax purposes, but because they don't show the GBP equivalent on them it isn't clear how much the order total is.

what I would like to do is keep the invoice as is but under order total add an extra section for order total in GBP.

An even better option would be if I could leave the customers invoice as is and only include the GBP equivalent on the admin invoice.

/admin/orders.php
Around line 418 you've got this section of code:<tr> <td class="main"><strong><?php echo ENTRY_ORDER_ID . $oID; ?></td> </tr>Change that to this:```
<tr>
<td class="main"><strong><?php echo ENTRY_ORDER_ID . $oID; ?></strong>
<div align="right"><?php if ($order->info['currency'] != DEFAULT_CURRENCY && $order->info['currency_value'] != 1 && $currencies->get_value(DEFAULT_CURRENCY) == 1) echo 'Prices in ' . $order->info['currency'] . ' — Exchange Rate: 1 x ' . DEFAULT_CURRENCY . ' = ' . $order->info['currency_value'] . ' ' . $order->info['currency']; ?> </div></td>
</tr>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Oct 2010, 6:34 PM
#6
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: Show default currency on invoice as well as currency used?

Thanks Dr. Byte,
That has sorted the issue with adding the exchange rate to the order page but I still need to add the GBP eqivalent order total to the invoice.

I've located from the database that the value I need to callup on the invoice is field "order_total" from table "orders" because this value is always the default currency regardless of the currency used for the order.

Please could you help with this issue too?

Thanks

8 Oct 2010, 2:33 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Show default currency on invoice as well as currency used?

echo $order->info['order_total']

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Oct 2010, 6:27 PM
#8
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: Show default currency on invoice as well as currency used?

Still can't get it to work, I assume the file to change is admin/invoice.php?

I tried adding the code you suggested, no change.

I also tried adding the following code:

<?php
$order_check = $db->Execute("select order_total
                             from " . TABLE_ORDERS . "
                             where orders_id = '" . (int)$oID . "'");
							 
							 echo $order->info['order_total']
?>

That didn't work either

9 Oct 2010, 5:15 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Show default currency on invoice as well as currency used?

Apparently I misunderstood what you were asking for.

/admin/invoice.php
At line 202, insert this new line, as shown:```
?>
[B]<tr align="right"><td colspan="2"><br /><?php echo $order->info['total'] . ' ' . DEFAULT_CURRENCY; ?></td></tr>[/B]
</table></td>
</tr>
</table></td>

</tr> ``` Then visit this page to share the joy: <http://www.zen-cart.com/index.php?main_page=infopages&pages_id=14>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.