Translate Opening Balance Adjustment member at Opening Rate
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