set_remaining_cost

Set the remaining cost for an activity in a tracking period. 

Setting the remaining cost of an activity can be done in two ways, following the logic of the following formula: 

  • Remaining Cost = Planned Remaining Cost + Planned Remaining Cost Deviation

The two parameters at the right hand side of this equation are as follows:

  • Planned Remaining Cost (PRC): The planned remaining cost is, similar to the planned actual cost, calculated automatically based on the remaining duration ( P2Tracking:set_remaining_duration) input. 
  • Planned Remaining Cost Deviation (PRCDev): In order to give a realistic estimate of the remaining cost, the planned remaining cost value can be modified using the optional planned remaining cost deviation field

Consequently, setting the actual cost using the P2Tracking:set_remaining_cost

will automatically change the PRCDev value and vice versa, changing the PRCDev value using the P2Tracking:set_planned_remaining_cost_deviation function will automatically change the actual cost for an activity. The value of the Planned Remaining Cost Deviation can be obtained by calling the P2Tracking:get_planned_remaining_cost_deviation function.

Parameters: 
I/O Type Name Description
input integer ID activity ID
input float cost remaining cost
input integer ID ID of the tracking period
Learn More: 

Step inside PMKC.

Example: 
function ()
        io.write('\n')
end
Class: 
P2Tracking