Resource Cost in PHP

Aspose.Tasks - Resource Cost

To get Resource Cost using Aspose.Tasks Java for PHP, simply invoke ResourceCost module. Here you can see example code.

 1$project = new Project('test_tasks.mpp');
 2$resources = $project->getResources()->toList();
 3$rsc = new Rsc();
 4$i = 0;
 5while ($i < sizeof($resources))
 6{
 7    $resource = $resources -> get($i);
 8    if ($resource -> get($rsc -> NAME) != null) {
 9        print "Cost: " . (string)$resource -> get($rsc -> COST);
10        print "\nACWP: " . (string)$resource -> get($rsc -> ACWP);
11        print "\nBCWS: " . (string)$resource -> get($rsc -> BCWS);
12        print "\nBCWP: " . (string)$resource -> get($rsc -> BCWP);
13        print "\n---------------------------------------------";
14    }
15    $i += 1;
16}

Download Running Code

Download Resource Cost (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.