Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
| oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bfixedassetrevaluation.p)
<ANCESTOR-CODE>
<Q-1 run FARevalByAssetBook (Start) in BFixedAssetRevaluation >
for each tFAReval
group by tFAReval.FAAssetBook_ID:
/*calc the date of the last revaluetion*/
if first-of (tFAReval.FAAssetBook_ID)
then do:
<Q-3 run FARevalByAssetBook (last) (Read) (NoCache)
(input tFAReval.FAAssetBook_ID, (FAAssetBookId)
output dataset tqFARevalByAssetBook) in BFixedAssetRevaluation >
find first tqFARevalByAssetBook no-error.
end.
if available tqFARevalByAssetBook
then assign tFAReval.ttFARevalLastDate = tqFARevalByAssetBook.ttFARevalDate.
/*calc NetBookLC value*/
assign tFAReval.tdFARevalNetBookLC = tFAReval.tdFAAssetBookAmountLC -
tFAReval.tdFAAssetBookDeprAmountLC -
tFAReval.tdFAAssetBookDisposedLC + tFAReval.tdFAAssetBookDisposedDeprLC.
end.
<Q-2 run FARevalByAssetBook (Stop) in BFixedAssetRevaluation >