Dealing Variances in PHP

Aspose.Tasks - Dealing Variances

To see resource assignment variance using Aspose.Tasks Java for PHP, simply invoke AssignmentVariance 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))
 6{
 7    $assignment = $resource_assignments->get($i);
 8    print "Work Variance: " . (string)$assignment -> get($asn -> WORK_VARIANCE);
 9    print "\nCost Variance: " . (string)$assignment -> get($asn -> COST_VARIANCE);
10    print "\nStart Variance: " . (string)$assignment -> get($asn -> START_VARIANCE);
11    print "\nFinish Variance: " . (string)$assignment -> get($asn -> FINISH_VARIANCE);
12    print "\n--------------------------------------------------------";
13    $i += 1;
14}

Download Running Code

Download Dealing Variances (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.