Incorrect amounts in order emails for foreign currencies

Started by panjarek, May 22, 2020, 10:26:47 AM

Previous topic - Next topic

panjarek

Hi,
I noticed that there is something wrong with amounts in an order email confirmations, when an order is done in a different currency than the shop main currency.
For example for standard payment method I have set email confirmations currency as user selected currency. When user makes an order he or she receives first confirmation with status Confirmed by shopper and there amounts are ok. But when I change status in next days and send another email with new status, amounts are incorrect. I think the currency rate from current date is taken, not form date of the order and that is why different amounts are sent. I think when user made an order, amounts should be constant in all email confirmations.

I tested it without email template overrides.
I attached screens from two emails.
Main shop currency is PLN orders are in EUR.

VirtueMart 3.8.2 10325 (I tested it also for 3.6.10 10211 and 3.2.15)
Joomla! 3.9.18

Regards
Jarek

Jörgen

You have changed the exchange rate, please use a fixed exchange rate to avoid this.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

But perhaps panjarek is correct ... or not..  ;)

I guess if u confirm and pay an order in zloty on a certain date ( this will be stored in VM ) where are we legally when later the euro exchange rate has shifted and notification is required in euro?

I'm sure someone knows this..  is it always ( e.g. when declaring your turn over etc ) the rate on the day it was paid ( I would have thought so)?
If that is so is the exchange rate stored in the orders table not used?

@ panjarek .. can u check in the #__virtuemart_orders table what is stored there?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

panjarek

I think exchange rate is stored correctly in orders table, please check attachment, prices calculated with this exchange rate are correct.

@Jörgen, thanks for advise, with fixed exchange rate it works correctly, but then I have calculate values in PLN (main currency) manually.

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

GJC I agree, should use the exchange rare att Time of purchase.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

QuoteFor example for standard payment method I have set email confirmations currency as user selected currency.

where are u setting this?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

panjarek

Maybe I wrote it wrongly, I standard payment method I set this: Accepted Currency: Selected currency in Currency Module
I thought that it also influence email currency.

panjarek

Hi,

do you know if this bug was corrected? I am testing VirtueMart 4.0.6 10690 and still have this issue :/

Milbo

Quote from: Jörgen on May 22, 2020, 10:31:58 AM
You have changed the exchange rate, please use a fixed exchange rate to avoid this.

Jörgen @ Kreativ Fotografi

Nono, the exchange rate is stored with the order imho, so this exchange rate should be taken, not the current one. Panjarek is right about that.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/