Support for timephased cost for cost type resources
Multi platform library to read and write schedule data
Brought to you by:
joniles
The current code correctly handles timephased costs for Work or Material resource assignments, but does not work for Cost resources because their values are calculated off of the assignment's manually entered cost value.
I have attached a patch to add the ability to return timephased cost/actual cost values for these types of assignments. Let me know if I'm approaching this in the wrong way. It seems to work okay so far.
Patch for supporting timphased cost with cost resources
I've also discovered that the current code for getTimephasedCostSingleRate() does not correctly handle overtime work that only spans a subset of the days that the standard work spans (ie the timephasedWork item for the overtime has a different finish date than the TimephasedWork for the normal work). I've fixed this by checking for this situation and then splitting the cost into two TimephasedCost items instead of lumping it into one. It uses a method I created for supporting the Cost resources above, so I'm attaching an updated patch that includes this fix.
Patch for supporting timphased cost with cost resources and properly handling overtime cost.
You'll also notice in this patch a check for null values when getting the overtime rate from the CostRateTableEntry. I had an xml file that was returning null for the overtime rate, which was crashing that method.
Thanks for the patches, I'll commit the changes to CVS this weekend.
The code now in CVS fixes this issue.