The Project WBS form is driven by the ProjWBSUpdateController class and the method updateTrackingSummaries() does a calculation for Actual costs.
I am interested in Actual costs for a report so wanted to ensure I did the correct calculation although I may write it differently to this controller class.
The code listing below shows the postedActualCost Map being populated by Activity number and a cost value over 2 queries.
Functionally, is it possible for the activity have costs from both queries? If not, then why not?
If the activity did have costs in both queries then the cost from the 2nd query overwrites the 1st query's value.
For reporting purposes, I am interested to know what is the intended logic and why?
postedActualCost = new Map(Types::String, Types::Real);
while select ActivityNumber, TotalCost from taskCostView
where taskCostView.ProjId == projTable.ProjId
{
if (taskCostView.ActivityNumber && taskCostView.ActivityNumber != rootActivityNumber)
{
postedActualCost.insert(taskCostView.ActivityNumber, taskCostView.TotalCost);
}
....
}
while select ActivityNumber, TotalCostAmountCur from projCostTrans
where projCostTrans.ProjId == projTable.ProjId
&& projCostTrans.TransactionOrigin == ProjOrigin::BeginningBalance
join RecId from projBegBalJournalTrans_CostSales
where projBegBalJournalTrans_CostSales.TransId == projCostTrans.TransId
&& projBegBalJournalTrans_CostSales.ProjLedgerCostStatus != ProjLedgerStatus::BalanceSheet
{
if (projCostTrans.ActivityNumber && projCostTrans.ActivityNumber != rootActivityNumber)
{
postedActualCost.insert(projCostTrans.ActivityNumber, projCostTrans.TotalCostAmountCur);
}
....
}
*This post is locked for comments
I have the same question (0)