Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.48k stars 2.79k forks source link

Error in Accounting account in multi currency #31939

Open ghonztrail opened 6 days ago

ghonztrail commented 6 days ago

Bug

when making exchange between local currency and foreign currency the amount is correct in bank | cash module but when transfer to accounting account there are a problem Scenario: my local currency is Egyptian Pound, i need to buy 1000 USD which equal to 49000 EGP rate 49 EGP for 1 USD , when transferring into accounting account i see the account linked to USD read 1000 not 49000, the amount transferred still in foreign currency not local one. Note: this not happening with accounts payable & accounts receivable because if an invoice in foreign currency it transferred to accounting account with correct amount of local currency not foreign currency i attached screenshots for all steps until reach the problem

Dolibarr Version

20* and all versions

Environment PHP

PHP 8.1.2-1ubuntu2.19 (cli) (built: Sep 30 2024 16:25:25) (NTS)

Environment Database

mariadb Ver 15.1 Distrib 10.6.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

Steps to reproduce the behavior and expected behavior

1- create 2 cash accounts one in local currency and one for any foreign currency and link each one to a different accounting account in the accounting chart, one for local and other for foreign currency 2- make internal transfer from any to other, in my case i transferred 49000 EGP to buy 1000 USD, you will see that the cash account is good for each currency 3- transfer this transaction into accounting account you will see that the account linked to foreign currency read the same amount in foreign currency not the equivalent of local currency which should be presented in local currency in accounting (all accounts should present local currency)

Attached files

Screenshot 2024-11-16 at 1 32 52 PM Screenshot 2024-11-16 at 1 33 34 PM Screenshot 2024-11-16 at 1 33 52 PM Screenshot 2024-11-16 at 1 40 04 PM Screenshot 2024-11-16 at 1 40 19 PM
ems-co commented 5 days ago

Every company should deal with ONE currency in accounting and this is true worldwide! you must activate the Multicurrency module to deal with different currencies and NOT different BANK ACCOUNTS, because your accounting statements will be wrong. thats why dolibarr makes the conversion at the time of the transaction for customers and vendors.