function returns decimal
Parameters
iiFAAssetBookId | input | integer | |
iiPrevYear | input | integer | |
idFAAssetBookDeprecAmountLC | input | decimal | |
oiReturnStatus | output | integer | |
Internal usage
QadFinancials
program code (program1/bfixedassetdepreciation.p)
/* Sum what has been stored in the database - in case of real depreciation */
if iiFAAssetBookId <> 0 and
iiFAAssetBookId <> ?
then do:
<M-2 run GetCumulDBDeprAmountLC (input iiFAAssetBookId (iiFAAssetBookId),
input iiPrevYear (iiPrevYear),
output vdFADeprecByAssetBookPrevYear (odFADeprecByAssetBookPrevYear),
output viFcReturnSuper (oiReturnStatus)) in BFixedAssetDepreciation>
end.
/* Add what has been generated by the current instance */
for each btNewDepreciation where
btNewDepreciation.tiNewDeprYear <= iiPrevYear:
accumulate btNewDepreciation.tdNewDeprAmountLC (total).
end.
/* In case we are running the Simulation - the tNewDepreciation is already cleared, so we have to take tDepreciationSimul */
for each btDepreciationSimul where
btDepreciationSimul.tiAssetBookDeprecYear <= iiPrevYear:
accumulate btDepreciationSimul.tdAssetBookDeprecAmountLC (total).
end.
assign vdFADeprecByAssetBookPrevYear = vdFADeprecByAssetBookPrevYear +
(accum total btNewDepreciation.tdNewDeprAmountLC) +
(accum total btDepreciationSimul.tdAssetBookDeprecAmountLC).
return vdFADeprecByAssetBookPrevYear.