Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency Conversion wrong USD to MXN in invoices #9801

Closed
nanoxp opened this issue Oct 18, 2018 · 9 comments
Closed

Currency Conversion wrong USD to MXN in invoices #9801

nanoxp opened this issue Oct 18, 2018 · 9 comments

Comments

@nanoxp
Copy link

nanoxp commented Oct 18, 2018

Bug

[Currency Conversion wrong USD to MXN in invoices]

Environment

  • Version: [8.0.2 ]
  • OS: [linux]
  • Web server: [Apache 2.2.34]
  • PHP: [5.6.30]
  • Database: [MySQL 5.6.32-78.1]

Expected and actual behavior

[Currency Conversion wrong USD to MXN in invoices¨
]

Steps to reproduce the behavior

[Dolibarr is configured as USD Base Currency and it is indicated in the configuration section that 1 USD = 18.5 MXN
image
When making a invoice in the base currency that is USD we see that everything is fine:
image
when we do the convert to MXN and enter the Currency conversion rate, as it's shown in the following:
image

is being made division instead of multiplying them as shown in the previous image (1 USD = 18.5 MXN) 35,641.00 USD = 659,358.5 No 1,926.54 as seen in Amount (inc. tax) in the previous image.

also in the generated PDF we see how it says it is in MXN but the totals are still put in USD
image

]

@atm-maxime
Copy link
Member

There's an issue with the totals, but conversion is fine. I think this is more of a translation issue because "original currency" refers to MXN in your example. When you changed the exchange rate, I think it asked in which way you want to do the conversion. You must have selected MXN > USD instead of USD > MXN, that's why you have it the wrong way.

@nanoxp
Copy link
Author

nanoxp commented Oct 22, 2018

The system is set in USD, as shown in the first screen that you attach and we see how it is specified that 1 USD = 18.5 MXN. in the second screen we see the amount of the invoice in $ 35,641 USD, and the conversion is executed in the third screen, a correct operation in this case is 35.641 USD * 18.5 MXN = $ 659358.5 value that does not appear in "original currency" or in "Total amount" this in case of only be translation problem as you mention

@bv74
Copy link

bv74 commented Oct 23, 2018

It's seems to be same issue than #9711 and #9697.

@atm-maxime
Copy link
Member

Ok got it. When you change the currency of a document, the system considers the price already defined in the document as the same in the new currency instead of keeping the internal currency as reference.
Eg : I have a invoice of 100 €, I change to MXN currency, the system considers that the invoice is of 100 MXN...

I'll look into it.

@bv74
Copy link

bv74 commented Oct 30, 2018

I've always the problem in the PDF proposal, invoice.... as in last picture of nanoxp :
Total net of tax is in Euro as Total (inc Tax) is in CHF.

eldy added a commit that referenced this issue Oct 30, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix changing currency in a doc was recalculating amounts in company currency #9801
@atm-maxime
Copy link
Member

Yes I know, sorry I just fixed the first issue and not the one in the PDF for now...
As you can see I didn't close the issue.

@bv74
Copy link

bv74 commented Nov 10, 2018

problem seems to be fixed with release 8.0.3.

@atm-maxime
Copy link
Member

Is this fixed ? Can you close it ?

@bv74
Copy link

bv74 commented Jun 13, 2019

It can be closed. I don't how I can close it.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants