Managing Resource Overtimes
Contents
[
Hide
Show
]The Calendar class exposes a number of properties for managing resource overtime:
- Overtime represents the overtime rate (decimal).
- OvertimeRate represents the overtime rate from the current date, if a rate table exists for the resource (decimal).
- OvertimeRateFormat represents the units used for the overtime rate (RateFormatType).
- OvertimeCost represents the sum of an actual and remaining overtime cost (decimal).
- OvertimeWork represents the amount of overtime work scheduled for a task
Working with Resource Overtimes
To see overtime cost, overtime rate and overtime work in Microsoft Project:
- On the Resource sheet, select the Insert menu and then select Column.
- Add the columns.
Overtime columns added to the Resource sheet in Microsoft Project
Getting Resource Overtimes in Aspose.Tasks
The following example shows how to get resource overtimes 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(OvertimesResource.class);
4
5Project prj = new Project(dataDir + "project5.mpp");
6for (Resource res : prj.getResources()) {
7 if (res.get(Rsc.NAME) != null) {
8 System.out.println(res.get(Rsc.OVERTIME_COST));
9 System.out.println(res.get(Rsc.OVERTIME_WORK).toString());
10 System.out.println(res.get(Rsc.OVERTIME_RATE_FORMAT).toString());
11 }
12}