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$resource_assignments = $project->getResourceAssignments()->toList();
 3$i = 0;
 4$asn = new Asn();
 5while ($i < sizeof($resource_assignments))
 7    $assignment = $resource_assignments -> get($i);
 8    print "Percentage of the Completed Work: " . (string)$assignment -> get($asn -> PERCENT_WORK_COMPLETE);
 9    print "\n--------------------------------------------------------";
10    $i += 1;

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.