Managing Task Costs in PHP

Aspose.Tasks - Managing Task Costs

To manage Task Costs using Aspose.Tasks Java for PHP, simply invoke ManagingTaskCosts module. Here you can see example code.

PHP Code

 1$project = new Project();
 2$task = $project->getRootTask()->getChildren()->add("Task");
 3$tsk = new Tsk();
 4$bigDecimal = new BigDecimal();
 5$task->set($tsk->COST, $bigDecimal->valueOf(800));
 6print "Task Remaining Cost: " . (string)$task->get($tsk->REMAINING_COST);
 7print "\nTask Fixed Cost: " . (string)$task->get($tsk->FIXED_COST);
 8print "\nTask Cost Variance: " . (string)$task->get($tsk->COST_VARIANCE);
 9print "\nProject Cost: " . (string)$project->getRootTask()->get($tsk->COST);
10print "\nProject Fixed Cost: " . (string)$project->getRootTask()->get($tsk->FIXED_COST);
11print "\nProject Remaining Cost: " . (string)$project->getRootTask()->get($tsk->REMAINING_COST);
12print "\nProject Variance Cost: " . (string)$project->getRootTask()->get($tsk->COST_VARIANCE);

Download Running Code

Download Managing Task Costs (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.