Skip to main content
June 18, 2020

I am trying to translate my F#OpeningBalance at an opening rate. It is naturally translating at average rate.

  • June 18, 2020
  • 1 reply
  • 0 views
Originally posted by Rich House

6/4/2019

I am trying to translate my F#OpeningBalance at an opening rate. It is naturally translating at average rate. I have managed to get to translate at closing rate but I'm now trying to figure out how to change it to looking at my opening fx rate

1 reply

June 26, 2020
Originally posted by Joakim Kulan

This might be a start:
If (api.Cons.IsCurrency() And Not api.Cons.IsLocalCurrencyforEntity()) Then
Dim RateTypeOpe As FxRateType = api.FxRates.GetFxRateType(""OpeningRate"")

Dim RateOPE As Decimal = api.FxRates.GetCalculatedFxRate(RateTypeOpe,)

api.data.calculate(""F#OpeningBalance:C#Local * "" & api.Data.DecimalToText(RateOpe) & "" "")

End If