Calculating Percentages in PHP

Aspose.Tasks - Calculating Percentages

To Calculate Percentage of the completed work using Aspose.Tasks Java for PHP, simply invoke AssignmentPercentWorkComplete module. Here you can see example code.

PHP Code

 1$project = new Project('test_tasks.mpp');
 2
 3$resource_assignments = $project->getResourceAssignments()->toList();
 4
 5$i = 0;
 6
 7$asn = new Asn();
 8
 9while ($i < sizeof($resource_assignments))
10
11{
12
13    $assignment = $resource_assignments -> get($i);
14
15    print "Percentage of the Completed Work: " . (string)$assignment -> get($asn -> PERCENT_WORK_COMPLETE);
16
17    print "\n--------------------------------------------------------";
18
19    $i += 1;
20
21}

Download Running Code

Download Calculating Percentages (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.