Skip to main content
December 6, 2021

Translate Opening Balance Adjustment member at Opening Rate

  • December 6, 2021
  • 3 replies
  • 0 views

Hi Experts,

 

I have the following rule to translate my opening balance adjustment (entered manually in the current year) at an opening rate.

 

If (api.Cons.IsCurrency() And Not api.Cons.IsLocalCurrencyforEntity()) Then
  'Only run for foreign currency
  Dim timeId As Integer = api.Pov.Time.MemberPk.MemberId
  Dim prioryearid As Integer = api.Time.GetLastPeriodInPriorYear(timeid)
  Dim rateTypeClo As FxRateType = api.FxRates.GetFxRateTypeForAssetLiability()
  ' get   closing rate from prior year
  Dim pycloRate As Decimal = api.FxRates.GetCalculatedFxRate(rateTypeClo,prioryearid) 
  'use closing rate from PY to translate this member
  api.Data.calculate("F#ObalAdj = C#Local:F#ObalAdj*" & pyclorate,"A#Bs.Base") 
End If

 

While this works perfectly for data entered via Forms, it doesn't work for adjustments entered via journals.

When a journal is posted against ObalAdj member, I see  2 things happening:

 

1. The AdjInput member translates at opening rate based on above rule (as expected)

2. The AdjConsolidated member translates at closing rate 

3. The sum of AdjInput & AdjConsolidated members roll up the hierarchy

Therefore, my translated opening balance adjustment is incorrect.

Can you please advise how I can stop the default translation to closing rate for just the opening balance adjustment member (for journal entries)?

Regards,

Sou

 

 

 

3 replies

March 4, 2022

I have this issue too, is there a solution?

SC4Author
March 4, 2022

Hi,

I tweaked my logic as below and it's working now.

api.Data.calculate("F#ObalAdj:0#AdjConsolidated= C#Local:F#ObalAdj:0#AdjInput*" & pyclorate,"A#Bs.Base") 'use closing rate from PY to translate this member

There is also a translate function that can be used in this case instead of calculate.

Regards,

Sou

March 4, 2022

Thanks, really appreciate the quick response