Multi-currency payment data corruption

I have a case as below and need your help please is it a bug on system or I am missing something.
Supplier created in USD
Creditor account in USD
company in OMR
Purchase invoice in USD (34000.00)
Payment in OMR, amount transacted by the bank is 13 158.003 in order to send 34000.00 USD to supplier, end user entered exchange rate manually .38700010 on payment entry transaction.
if we run general ledger report, creditor account debited by 34000.008 where supplier got 34000.00 only how to avoid decimals .008??

Hi @nmami,

Not sure if this is the reason for the bug you observe. One thing I realized which can be confusing at times is that the entries in a foreign currency in the General ledger do not show the booked amount in the foreign currency. Instead, the General ledger always shows the amount in the company currency (in your case OMR), and converts it into the foreign currency using the daily exchange rate from the exchange rate API. (For each multi-currency payment, ERPnext tracks both the company and the foreign currency amounts. I think this is done to ensure that the double-entry bookkeeping (done in the company currency) add up when the exchange rates change).

So in summary, you cannot really use the General ledger to track the exact amount of your transactions in a foreign currency.

As a side remark, the CoA always shows the right amount in the foreign currency even though the values in the general ledgers are wrong (but you can only see the total balance in each account and not the transacted amount). The CoA shows both the balance in the foreign currency and the company currency. Latter one is always used in the General Ledger even though it is a foreign currency.

(Not sure if this is the reason for what you observe, but just leaving it here in case somebody else gets confused about the differing values in the General Ledger and CoA)

I just checked the General Ledger again. What you display is the column “Debit (USD)”. If you click on “Add column”, you can select from the General Ledger doctype another column called “Debit Amount in Account Currency”. This will show the correct value in the foreign currency and should solve your issue. Didn’t know it and just learned something new :wink: .

(I also think the way how it is done now is really confusing. No idea how the UI could be changed. Maybe it might be more intuitive to show the column “Debit/Credit Amount in Account Currency” as standard as long as no currency has been selected in the filter?!)

Hi @bluesky
I have add column

Still showing 34000.008

last result I reach yesterday is from purchase invoice I initiate payment, I will enter bank transacted amount in OMR and 34000.00 in USD manually, rate derived from exchange rate.
system will detect difference of .003 in OMR currency amount then a button appear to insert new record for gain/loss amount due to change rate.
user is checking first impression he was happy with result.

as you can see line 6 inserted as gain/loss in currency exchange.

again general ledger should not recalculate amount on each run, data should be saved in table once payment entry created.

Thx for your support

Not sure I follow everything. I guess row 6 stands in your last post stands for exchange rate G/L?
Is row 5 in your first post the creditors account in the foreign currency? Or your COGS or something similar?

As the exchange has changed between invoice and payment date, the OMR amount booked from your foreign currency account is different. It is really confusing that there are two different balances tracked for foreign currency accounts: 1. in the foreign currency as expected & 2. the valuation in the company currency. It took me a few days to wrap my head around what is actually happening under the hood when using multi-currency transactions in ERPnext. It seemed too be buggy (and several displayed values and currency symbols are wrong). But in the end, the accounting added up and so far I haven’t encountered a bug in the accounting. It is only that how the numbers are displayed is either wrong or misleading.