Topic: Revaluation amount is getting posted wrongly

Hello,
I am using FA2.4.4, and we have disabled Automatic Revaluation of accounts. End of the month, we process revaluation manually using the link "Revaluation of Currency Accounts"
I have an issue where the revaluation amount is being posted to the wrong side. e.g. Credit instead of Debit; etc.
Let me explain using an example:
Our functional currency is KES. I have a bank account with the currency of USD.
I have posted 1 transaction to this account using of 968.70 at the exchange rate of 1 USD = 102.21 KES. So in GL its converted to the equivalent of 99010.83 KES.
The rate at the end of the month is 1 USD=103.23 KES. We ran revaluation. I am expecting an exchange gain of 988.07 posted as below:
Dr Bank 988.07
    Cr. Exchange Gain/Loss Account with 988.07

The system has posted as if its an exchange loss:
Dr. Exchange Gain/Loss Account with 988.07
    Cr Bank 988.07

Kindly assist if there's something I need to change as this is throwing my bank balances off.
Regards
Mugao.

Re: Revaluation amount is getting posted wrongly

This appears correct as it is a single account that has Gain and Loss in it and the Gain is a Credit in it.

@joe: any changes needed here?

Re: Revaluation amount is getting posted wrongly

This was written a long time ago and should have had a long test period.

Joe

Re: Revaluation amount is getting posted wrongly

Hello again.

@mugao-em.
The Gain/Loss account is an operation account. A gain is entered as a credit amount and a loss is entered as a debit amount.
In the Cutomer Receivables/Supplier Payables Account it should be entered as a debit amount for Gain. Credit amount for Loss.

Please show the Journal Entries.

/Joe

Re: Revaluation amount is getting posted wrongly

Thank you for the update guys;
The entry has gone to Debit side of the gain/loss account which means its a loss. I was expecting a gain because as you can see, the revaluation rate is higher than the transaction rate and this is a Bank. See the journal entry below.

Journal Date     Account Code     Account Name     Dimension     Debit     Credit     Memo
12/31/2017     1060.100     National Bank of Kenya (USD) A/C No 020420               988.07     Exchange Variance
12/31/2017     5810.100     Realized Foreign Exchange Loss           988.07         Exchange Variance

Thank you in advance.

Re: Revaluation amount is getting posted wrongly

@joe;
any update on this?

Regards,
Mugao.

Re: Revaluation amount is getting posted wrongly

I confirm the same result as mugao-em. The posting is not correct.  The balance of USD account in home currency should increase on the date of valuation. 

Chequing USD  (exchnage rate 1.32 CAD/USD)
Customer Payment     1     001/2018     11/21/2018           DR:      27,874.84

Revaluation Run (exchnage rate 1.33 CAD/USD)
Journal Entry     1     001/2018     11/22/2018                                      CR: 475.16     27,399.68     Exchange Variance

Re: Revaluation amount is getting posted wrongly

Hello,

I guess you are right, guys. I just wonder how this bug could have been here for so long.
The bug has been fixed and committed to stable repo.
The fixed file can be downloaded here.

Please make a test that this is working ok now. Also check that the AR/AP accounts are updated correctly.

/Joe

Re: Revaluation amount is getting posted wrongly

@Joe,
Thank you so much for the fast response.

I have tested the fix and it is working perfectly.

Thank you once more.

Kind regards.
Mugao.

Re: Revaluation amount is getting posted wrongly

This was already so in FA v2.3.x which needs no correction. This error in the FA 2.4.x branch crept in sometime around 2015-03-25.

Since the FA project devs chose to merge the FA 2.4 with FA 2.3 master instead of making the FA 2.4 as the master and keeping the FA 2.3 master as just the FA 2.3 branch, such comparisons cannot be made in the official FA GitHub repo to pinpoint the commit.