project QadFinancials > class BBudget > method ValidateComponentBudgetFDS
Description
This method will validate Budget FDS.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bbudget.p)
for each t_sBudget where t_sBudget.tc_Status <> "D":U:
assign viIsUsedForProportionalAlloc = 0.
for each t_sBudgetFDS where t_sBudgetFDS.tc_ParentRowid = t_sBudget.tc_Rowid and
t_sBudgetFDS.tc_Status <> "D":U:
if t_sBudgetFDS.BudgetFDSIsAllocationTotal = true
then do:
assign viIsUsedForProportionalAlloc = viIsUsedForProportionalAlloc + 1.
if t_sBudgetFDS.BudgetFDSType <> {&BUDGETFDSTYPE-DIVISION} and
t_sBudgetFDS.BudgetFDSType <> {&BUDGETFDSTYPE-PROJECT} and
t_sBudgetFDS.BudgetFDSType <> {&BUDGETFDSTYPE-COSTCENTRE} and
t_sBudgetFDS.BudgetFDSType <> {&BUDGETFDSTYPE-SAF}
then do:
assign vcMessage = trim(substitute(#T-3'You can only use the types &1, &2, &3 and &4 for proportional allocation:.':255(15887)t-3#, {&BUDGETFDSTYPE-DIVISION-TR}, {&BUDGETFDSTYPE-PROJECT-TR}, {&BUDGETFDSTYPE-COSTCENTRE-TR}, {&BUDGETFDSTYPE-SAF-TR})).
<M-1 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-3826':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BBudget>
assign oiReturnStatus = -1.
end.
end.
end.
if viIsUsedForProportionalAlloc > 1
then do:
assign vcMessage = #T-4'Only one WBS level can be marked as ready for proportional allocation.':200(15882)T-4#.
<M-2 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-3827':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BBudget>
assign oiReturnStatus = -1.
end.
end.