Handling Overtime, Remaining Costs and Work Values
Contents
[
Hide
Show
]Handling Overtime, Remaining Costs and Work
The ResourceAssignment class exposes a number of properties for handling an assignment’s overtime, remaining costs and work:
- OvertimeCost represents the sum of the actual and remaining overtime costs of an assignment (decimal).
- OvertimeWork represents the scheduled overtime work for an assignment (TimeSpan).
- RemainingCost represents the remaining projected cost for completing an assignment (decimal).
- RemainingOvertimeCost represents the remaining projected overtime cost for completing an assignment (decimal).
- RemainingWork represents the scheduled remaining work for an assignment (TimeSpan).
- RemainingOvertimeWork represents the scheduled remaining overtime work for an assignment (TimeSpan).
To see assignment overtime, remaining cost and work in Microsoft Project:
- On the Task Usage screen, select the Insert menu, then Column.
- Add the desired columns.
Overtime, remaining costs and work columns added in Microsoft Project
Getting Assignment Overtimes in Aspose.Tasks
The following example shows how to get assignment overtimes, remaining costs and work using Aspose.Tasks.
1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(OvertimeRemainingCostsWork.class);
4
5Project project = new Project(dataDir + "project5.mpp");
6
7for (ResourceAssignment ra : project.getResourceAssignments()) {
8 System.out.println(ra.get(Asn.OVERTIME_COST));
9 System.out.println(ra.get(Asn.OVERTIME_WORK).toString());
10 System.out.println(ra.get(Asn.REMAINING_COST));
11 System.out.println(ra.get(Asn.REMAINING_OVERTIME_COST));
12 System.out.println(ra.get(Asn.REMAINING_OVERTIME_WORK).toString());
13}