OFS Prepare Plan
OFS Prepare Plan
--------------------------
Page 1 of 5
OFS_Calculated = 0;
OFS_Calculated = #missing;
elseif ("OFS_Trend"->"BegBalance" == 6)
if (@isuda("Account", "CalcRound"))
"OFS_Calculated" = @Round(@avgrange(skipnone, "OEP_Forecast"->"OFS_Total Plan"-
>@member(@prevsibling(@currmbr(Years))), @relative("YearTotal", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
"OFS_Calculated" = @avgrange(skipnone, "OEP_Forecast"->"OFS_Total Plan"-
>@member(@prevsibling(@currmbr(Years))), @relative("YearTotal", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 8)
if (@isuda("Account", "CalcRound"))
"OFS_Calculated" = @Round(@prior("OEP_Forecast"->"OFS_Total Plan", 1, @LEVMBRS("Years", 0)) *
(1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
"OFS_Calculated" = @prior("OEP_Forecast"->"OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance");
endif
elseif ("OFS_Trend"->"BegBalance" == 10)
if (@isuda("Account", "calcRound"))
"OFS_Calculated" = @Round(@prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
"OFS_Calculated" = @prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
endif
/* this endif is needed for the trend */
endif
elseif (@ismbr(&OEP_QrtlyPlanStart:&OEP_QrtlyPlanEnd))
If (Not (@ismbr("No Year")))
if (@ismbr(@relative("OEP_Qrtly Plan", 0)))
If ("OFS_Trend"->"BegBalance" == 1)
if (@isuda("Account", "CalcRound"))
if (@isuda("Account", "Flow"))
"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * "PeriodsInQtr" * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance"));
else
"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
endif
else
if (@isuda("Account", "Flow"))
OFS_Calculated = (@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * "PeriodsInQtr" * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance");
else
OFS_Calculated = (@AVGRANGE(SKIPNONE, "OEP_Actual"->"OFS_Load"->&OEP_CurYr,
&OEP_StartMnth:&OEP_CurMnth)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->"BegBalance" == 2)
if (@isuda("Account", "CalcRound"))
if (@isuda("Account", "Flow"))
Page 2 of 5
OFS_Calculated = @Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")
* "PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr-
>"OFS_Load")) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
endif
else
if (@isuda("Account", "Flow"))
OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load") *
"PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
else
OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->"BegBalance" == 4)
if (@isuda("Account", "CalcRound"))
if (@isuda("Account", "Flow"))
OFS_Calculated = @Round((@avgrange(skipnone, "OEP_Actual"->"OFS_Load"-
>&OEP_PriorYr, @relative("YearTotal", 0)) * "PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance"));
else
OFS_Calculated = @Round((@avgrange(skipnone, "OEP_Actual"->"OFS_Load"-
>&OEP_PriorYr, @relative("YearTotal", 0))) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
endif
else
if (@isuda("Account", "Flow"))
OFS_Calculated = (@avgrange(skipnone, "OEP_Actual"->"OFS_Load"->&OEP_PriorYr,
@relative("YearTotal", 0)) * "PeriodsInQtr") * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
else
OFS_Calculated = (@avgrange(skipnone, "OEP_Actual"->"OFS_Load"->&OEP_PriorYr,
@relative("YearTotal", 0))) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->"BegBalance" == 10)
if (@prior("OEP_Qrtly Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
@Round(@Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
else
@Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_% Increase/(Decrease)"-
>"BegBalance");
endif
else
if (@isuda("Account", "CalcRound"))
if (@ismbr("Qtrly 1"))
@Round(@Prior("OFS_Total Plan"->"Q1", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
elseif (@ismbr("Qtrly 2"))
@Round(@Prior("OFS_Total Plan"->"Q2", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
elseif (@ismbr("Qtrly 3"))
@Round(@Prior("OFS_Total Plan"->"Q3", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
elseif (@ismbr("Qtrly 4"))
@Round(@Prior("OFS_Total Plan"->"Q4", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance"));
Page 3 of 5
endif
else
if (@ismbr("Qtrly 1"))
@Prior("OFS_Total Plan"->"Q1", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
elseif (@ismbr("Qtrly 2"))
@Prior("OFS_Total Plan"->"Q2", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
elseif (@ismbr("Qtrly 3"))
@Prior("OFS_Total Plan"->"Q3", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
elseif (@ismbr("Qtrly 4"))
@Prior("OFS_Total Plan"->"Q4", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
endif
endif
elseif ("OFS_Trend"->BegBalance == 12)
OFS_Calculated = #missing;
elseif ("OFS_Trend"->BegBalance == #missing and "OFS_Adjustment (+/-)"<> #missing)
OFS_Calculated = 0;
OFS_Calculated = #missing;
endif
endif
endif
elseif (@ismbr(&OEP_YrlyPlanStart:&OEP_YrlyPlanEnd))
If (Not (@ismbr("No Year")))
if (@ismbr("OEP_Yearly Plan"))
if ("OFS_Trend"->"BegBalance" == 10)
if (@prior("OEP_Yearly Plan"->"OFS_Total Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Prior("OFS_Total Plan", 1, @LEVMBRS("Years", 0)) * (1 + "OFS_%
Increase/(Decrease)"->"BegBalance");
endif
elseif (@prior("OEP_Qrtly Plan"->"OFS_Total Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@Prior("OFS_Total Plan"->"Qrtly Plan", 1,
@LEVMBRS("Years", 0)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Prior("OFS_Total Plan"->"Qrtly Plan", 1, @LEVMBRS("Years", 0)) * (1
+ "OFS_% Increase/(Decrease)"->"BegBalance");
endif
elseif (@prior("YearTotal"->"OFS_Total Plan", 1, @levmbrs("Years", 0)) <> #Missing)
if (@isuda("Account", "CalcRound"))
OFS_Calculated = @Round(@Prior("OFS_Total Plan"->"YearTotal", 1, @LEVMBRS("Years",
0)) * (1 + "OFS_% Increase/(Decrease)"->"BegBalance"));
else
OFS_Calculated = @Prior("OFS_Total Plan"->"YearTotal", 1, @LEVMBRS("Years", 0)) * (1 +
"OFS_% Increase/(Decrease)"->"BegBalance");
endif
endif
elseif ("OFS_Trend"->BegBalance == 12)
OFS_Calculated = #missing;
elseif ("OFS_Trend"->BegBalance == #missing and "OFS_Adjustment (+/-)"<> #missing)
Page 4 of 5
OFS_Calculated = 0;
OFS_Calculated = #missing;
endif
endif
endif
endif
endif
)
;
endfix
Fix (OFS_Calculated)
calc dim ("Account");
endfix
Endfix
EndFix
/* End Template:SPlan.OEP_FS.OFS_Prepare Plan_T*/
ENDFIX
ENDFIX
Page 5 of 5