while (queryRun.next())
{
assetTable = queryRun.get(tableNum(AssetTable)) as AssetTable;
assetIdRange = queryValue(assetTable.AssetId);
select assetBook where assetBook.AssetId == assetTable.AssetId;
bookIdRange = queryValue(assetBook.BookId);
select * from assettableLoc where assettableLoc.AssetId == assetTable.AssetId;
acquisitionDate = assetTable.book().AcquisitionDate;
//AssetTrans::findFirstType_W(assetTable.AssetId, assetBook.BookId, AssetTransType::Acquisition).TransDate;
if (acquisitionDate <= toDate)
{
prev = AssetSumCalc_Trans::newAssetPeriod(assetIdRange, bookIdRange, dateNull(), fromDate - 1);
if (!prev.isScrapped())
{
curr = AssetSumCalc_Trans::newAssetPeriod(assetIdRange, bookIdRange, fromDate, toDate);
assetDepreciationSummaryTmp.clear();
assetDepreciationSummaryTmp.AssetGroup = assetTable.AssetGroup;
assetDepreciationSummaryTmp.AssetId = assetTable.AssetId;
//SFA added 9-Dec-2024
assetDepreciationSummaryTmp.Reference = assetTable.Reference;
//SFA ended 9-Dec-2024
assetDepreciationSummaryTmp.CategoryId = assetTable.CategoryId_LV;
assetDepreciationSummaryTmp.Name = assetTable.Name;