Can't view Foreign exchange gains (losses)

#1

In the “Foreign exchange gains (losses)” menu, when I click on any of the “view” buttons, I get following error. Not sure if my business file is corrupted or it’s a bug. Maybe worth taking a look at ?
Other business are all fine, except this particular one. Also if I create any custom exchange rate in settings - it makes no difference. Again, other businesses are fine.
My main currency is EUR and some invoices are in GBP and couple of other currencies.

Internal Error

19.2.85 (Server)

**/changes-in-foreign-exchange-rates?Date=2019-04-09&FileID=e43e063a-9f58-4b80-ba39-d9f3f5261291&Referrer=11dd3671-73e4-4a13-9fca-a296c14bf296**

**System.InvalidOperationException: Sequence contains no elements at System.Linq.Enumerable.Max[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x000f4] in <63992662b765477a898ef49cdcc99ee2>:0 at System.Linq.Enumerable.Max[TSource,TResult] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00007] in <63992662b765477a898ef49cdcc99ee2>:0 at ManagerServer.HttpHandlers.Businesses.Business.Reports.ChangesInForeignExchangeRates.ChangesInForeignExchangeRates.GetViewModel () [0x00729] in <33bbe23328934545abd1a0b13302c282>:0 at ManagerServer.HttpHandlers.Businesses.Business.Reports.Report.Get () [0x0000d] in <33bbe23328934545abd1a0b13302c282>:0 at HttpFramework.HttpApplication.ProcessRequest (HttpFramework.HttpRequest request, HttpFramework.HttpResponse response) [0x000ae] in <81541cb48f4045c695bbb9e7dd184d38>:0 at ManagerServer.HttpApplication.ProcessRequest (HttpFramework.HttpRequest request, HttpFramework.HttpResponse response) [0x00729] in <33bbe23328934545abd1a0b13302c282>:0**
Foreign exchange gains (losses)
#2

It is not a bug if other businesses work correctly.

Does this happen with every forex report in this business, or only one dated on April 9, 2019? Can you post a screen shot of the Edit screen for whatever transaction you entered with multiple currencies on that date?

#3

Agree, so must me my fault. The question is, where. This was working up to a couple a months ago and then it just stopped.

Yes, this happens with every forex report in this business.

Maybe it is related to fact that I am trying to create exchange rate for every foreign transaction on system, so forex gains/losses always show 0.

I believe there should be an option to disable online exchange rates and use whatever user puts in the system as reference. So forex gains/losses would be completely gone. This is only my opinion, not a request.

#4

There are no “online exchange rates” in the sense of something that updates automatically. Manager initially has default rates, simply to avoid problems like division by zero. But the only other rates ever used are those you enter under Settings or ones that are calculated when you force a rate by entering exact values in multiple currencies when creating a transaction (as you illustrated with your screen shot).

But that will not do away with forex gains/losses. These can happen whenever rates are changed.

#5

I have managed to find 3 transactions that caused issues above in my original business.
Just by deleting foreign currency value at the end solves the issue

I have also been able to replicate the issue using new business file.
Step 1. Main Currency - EUR
Step 2. Created supplier in USD
Step 3. Created invoice with 59.99 USD item
Step 4. Paid that invoice with 50.84 EUR
Step 5. forex for any date later than this transaction is broken
Step 6. If 59.99 is changed to 60.00 - problem goes away

Other two transactions are: 85.49 GBP to 99.53 EUR and 1597.88 HRK to 216.79 EUR
I haven’t tested those two in dummy business but assume they will cause same issues

Not sure why only those specific number pairs are causing those issues
I am attaching dummy manager backup file as reference

test (2019-04-15).manager (36 KB)

#6

Is there any updates on this issue?

#7

I have the same problem, clicking “view” on every exchange differences returned the error screen below

Would it due to system error? May you please help to take a look? Many thanks

#8

If user sees Internal Error regardless of circumstances - it is always a bug. Putting into bugs category.

2 Likes
#9

Fixed in the latest version (19.2.89)

2 Likes