This content has been marked as final. Show 37 replies
Yes, this means that you have to be very careful in spelling the account names "CapitalStock" and "Investments" accounts in your code. It will be most effective if you copy-paste the names from your metadata file into your code. There is no other reason why they will not execute, -i.e. the strAccount variable never gets the "CapitalStock" and "Investments" values. If it did, you would get 100% of the values @ [Proportion].
CapitalStock and Investments are not lev0 members.... They are parent members in our outline..is it becoz of this reason values are not correct? Anyways will try copy pasting the names from metadata file and let u know...
If they are not base members, you have to modify both the if statements as in the following example:
If HS.Account.IsDescendant("CapitalStock", strAccount) ThenThis will work!
This works!!!! I have given:
CapitalStock input as "5000" Exchange Rate as "3" so value @ Entity Currency/Proportion upon translation = 5000* 3 = 15000
Investment input as "4000" Exchange Rate as "3" so value @ Entity Currency/Proportion upon translation = 4000* 3 = 12000
Minority Interest "281100" value @ Proportion = 5400 ( which is .2*15000 + .2*12000).
Is this the ideal scenario Kostas? The req we got was Capital Stock and Investment Entity Currency/Proportion should translate @ 80% and minority interest value should translate @ 20% . What u suggest is to go with the method u have suggested rite?
The code that you have now demonstrates the general technique for writing consolidation rules. Now, it depends on your business people requirements and on you to determine the specific calculations that should be applied for each of the accounts participating in the consolidation.
I have changed my code a bit....
For i=0 to NumItems-1
If Method="Holding" Then
If Method="Global" Then
If HS.Account.IsDescendant("CapitalStock", strAccount) Then
'If StrAccount = "CapitalStock" Then
ElseIf HS.Account.IsDescendant("Investments", strAccount) Then
'ElseIf StrAccount = "Investments" Then
Call HS.Con("A#281100.C1#MinorityInterestPct", (-1) * vMin,"")
I have given:
CapitalStock input as "3800" Exchange Rate as "3" so value @ Parent Currency upon translation = 3800* 3 = 11400, value @ Proportion upon translation = .8*11400 = 9120
Investment input as "2400" Exchange Rate as "3" so value @ Parent Currency upon translation = 2400* 3 = 7200 ,value @ Proportion upon translation = .8*11400 = 5760
Minority Interest "281100" value @ Proportion = 3720
Can u please let me know how are we getting 3720 @ Minority Interest??
Edited by: user10394539 on May 27, 2013 3:24 AM
A final word: as you see the MI is calculated as the (CapitalStock + Investment) * vMin. This is because the HS.Con function is account type sensitive and since CapitalStock is a Liability while Investment is an Asset, you don't need the "(-1) *" in the percentage of Investment if you want a subtraction instead of addition.1 person found this helpful
However this is not the case with HS.Exp (the first version of your code running Calculate) which is not account type sensitive so that you need to do CapitalStock - Investment to get the subtraction.
Thanks a lot Kostas for your patience in helping out...