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
 3$resources = $project->getResources()->toList();
 4
 5$rsc = new Rsc();
 6
 7$i = 0;
 8
 9while ($i < sizeof($resources))
10
11{
12
13    $resource = $resources -> get($i);
14
15    if ($resource -> get($rsc -> NAME) != null) {
16
17        print "Cost: " . (string)$resource -> get($rsc -> COST);
18
19        print "\nACWP: " . (string)$resource -> get($rsc -> ACWP);
20
21        print "\nBCWS: " . (string)$resource -> get($rsc -> BCWS);
22
23        print "\nBCWP: " . (string)$resource -> get($rsc -> BCWP);
24
25        print "\n---------------------------------------------";
26
27    }
28
29    $i += 1;
30
31}

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.