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

Payment discrepancy in payments with multicurrency #13128

Closed
futurehousestore opened this issue Feb 17, 2020 · 3 comments
Closed

Payment discrepancy in payments with multicurrency #13128

futurehousestore opened this issue Feb 17, 2020 · 3 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@futurehousestore
Copy link
Contributor

Bug

Just made a payment to my supplier today and used the available in version 11 option to input the payment in original currency. Unfortunately, there is some discrepancy and the calculated amount in Dolibarr currency is different than the amount paid in original currency (please, check the images below)

Environment

  • Version: 11.0.1
  • OS: Linux server2.turro.pl 3.14.32-xxxx-grs-ipv6-64 Fix: bad value with multi-company module #7 SMP Wed Jan 27 18:05:09 CET 2016 x86_64
  • Web server: Apache/2
  • PHP: 7.1.33
  • Database: MySQL or MariaDB 5.5.5-10.2.27-MariaDB
  • URL(s): /dolibarr/htdocs/fourn/facture/paiement.php?facid=371&action=create&accountid=3

Expected and actual behavior

The amount paid and input into "Payment amount, original currency" was 197.44zl which gave the £39.85 "Already paid" (the currency exchange rate is set to £1 = 4.95zl) and the calculated amount in pounds is incorrect. The amount in Dolibarr currency should be £39.89 (197.44/4.95=39.8868687)

Steps to reproduce the behavior

Set the supplier currency in multicurrency module, create a supplier invoice from the purchase order, go to created supplier invoice and enter payment using supplier currency "Payment amount, original currency"

Attached files (Screenshots, screencasts, dolibarr.log, debugging informations…)

dolibarr currency rate
dolibarr currency

@futurehousestore futurehousestore added the Bug This is a bug (something does not work as expected) label Feb 17, 2020
@eldy
Copy link
Member

eldy commented Feb 19, 2020

Can you provide the detail of each payment ? (the array visible on the invoice for this line)

@futurehousestore
Copy link
Contributor Author

Is that what you mean?
1
I'm also uploading other screenshots
2
3
I think the problem may be caused by incorrect rounding up (or lack of rounding up of exchange rate value). The total for the invoice is 1110.80zl (supplier currency) and exchange rate is 4.95zl = £1 so the total in pounds should be £224.40 and not £224.19 (what gives an exchange rate at 4.954725902)
4
I do use CurrencyLayer API in Multi-currency setup and the exchange rate could been set before as 4.954725902 (I don't remember exactly and I have manually rounded it up recently to 4.95)

@futurehousestore
Copy link
Contributor Author

At the moment I have set MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION to 0 and changed the multicurrency_tx (multicurrency rate) in llx_product_fournisseur_price table to have them all set as 4.95. I think that should fix the problem in my system but the bug still exists if MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION is set to 1 and the exchange rate has 8 decimals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants