project QadFinancials > class BReportTree > method LoadGLChartCompletenessCheck
Parameters
tGLChartForCheck | output | temp-table | |
icFRWTreeNodeIDList | input | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program3/breporttree.p)
empty temp-table tGLChartForCheck.
<M-66 run DataLoad
(input '':U (icRowids),
input '':U (icPkeys),
input icFRWTreeNodeIDList (icObjectIds),
input '':U (icFreeform),
input false (ilKeepPrevious),
output viFcReturnSuper (oiReturnStatus)) in BReportTree>
for each tFRWTreeNode break by tFRWTreeNode.FRWChart_ID:
<Q-34 run FRWAnCodeByCodeChartForGLChart (all) (Read) (NoCache)
(input tFRWTreeNode.FRWAnCode_ID, (FRWAnCode_ID)
input tFRWTreeNode.FRWChart_ID, (FRWChart_ID)
output dataset tqFRWAnCodeByCodeChartForGLChart) in BFRWAnalysisCode>
find first tqFRWAnCodeByCodeChartForGLChart no-error.
if available tqFRWAnCodeByCodeChartForGLChart then
do:
if first-of(tFRWTreeNode.FRWChart_ID) then
do:
<Q-93 run GLBySharedSetForFRW (all) (Read) (NoCache)
(input ?, (CompanyId)
input tqFRWAnCodeByCodeChartForGLChart.tiGLSharedSet_ID, (SharedSetID)
output dataset tqGLBySharedSetForFRW) in BGL>
for each tqGLBySharedSetForFRW:
create tGLChartForCheck.
assign tGLChartForCheck.tcGLCode = tqGLBySharedSetForFRW.tcGLCode
tGLChartForCheck.tcGLDescription = tqGLBySharedSetForFRW.tcGLDescription
tGLChartForCheck.tiGLCntInTree = 0
tGLChartForCheck.tcBalancePL = if tqGLBySharedSetForFRW.tlGLIsBalanceAccount then {&GLNATURE-BALANCE-TR}
else {&GLNATURE-PROFITLOSS-TR}
tGLChartForCheck.tiGL_ID = tqGLBySharedSetForFRW.tiGL_ID.
end.
end.
for each tqFRWAnCodeByCodeChartForGLChart:
if tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeAnalyseType <> "A":U or
tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemCOAType <> {&FRWANALYSISCOATYPE-GL}
then next.
if (tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange1 <> "" and
tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange1 <> ?) or
(tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange2 <> "" and
tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange2 <> ?)
then do:
if (tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange1 <> "" and
tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange1 <> ?) and
(tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange2 = "" or
tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange2 = ?) then
do:
for each tGLChartForCheck where
tGLChartForCheck.tcGLCode >= tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange1:
assign tGLChartForCheck.tiGLCntInTree = tGLChartForCheck.tiGLCntInTree + 1.
end.
end.
else do:
for each tGLChartForCheck where
tGLChartForCheck.tcGLCode >= tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange1 and
tGLChartForCheck.tcGLCode <= tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMaskRange2:
assign tGLChartForCheck.tiGLCntInTree = tGLChartForCheck.tiGLCntInTree + 1.
end.
end.
end.
else do:
if tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMask <> "" and
tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMask <> ? then
do:
for each tGLChartForCheck where
tGLChartForCheck.tcGLCode begins tqFRWAnCodeByCodeChartForGLChart.tcFRWAnCodeElemMask:
assign tGLChartForCheck.tiGLCntInTree = tGLChartForCheck.tiGLCntInTree + 1.
end.
end.
else do:
<Q-16 run FRWAnCodeElemDetForGLChart (all) (Read) (NoCache)
(input tqFRWAnCodeByCodeChartForGlChart.tiFRWAnCodeElem_ID, (FRWAnCodeElem_ID)
output dataset tqFRWAnCodeElemDetForGLChart) in BFRWAnalysisCode>
for each tqFRWAnCodeElemDetForGLChart:
for each tGLChartForCheck where
tGLChartForCheck.tiGL_ID = tqFRWAnCodeElemDetForGLChart.tiFRWAnCodeElemDetValue:
assign tGLChartForCheck.tiGLCntInTree = tGLChartForCheck.tiGLCntInTree + 1.
end.
end. /* for each tqFRWAnCodeElemDetForGLChart */
end. /* else do */
end. /* else do */
end. /* for each tqFRWAnCodeByCodeChartForGLChart */
end. /* if available tqFRWAnCodeByCodeChartForGLChart */
else do:
oiReturnStatus = -1.
return.
end.
end.