Managing Task Costs in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Managing Task Costs
To manage Task Costs using Aspose.Tasks Java for Ruby, simply invoke ManagingTaskCosts module. Here you can see example code.
Ruby Code
1project = Rjb::import('com.aspose.tasks.Project').new
2task = project.getRootTask().getChildren().add("Task")
3tsk = Rjb::import('com.aspose.tasks.Tsk')
4task.set(tsk.COST, Rjb::import('java.math.BigDecimal').valueOf(800))
5puts "Task Remaining Cost: " + task.get(tsk.REMAINING_COST).to_string
6puts "Task Fixed Cost: " + task.get(tsk.FIXED_COST).to_string
7puts "Task Cost Variance: " + task.get(tsk.COST_VARIANCE).to_string
8puts "Project Cost: " + project.getRootTask().get(tsk.COST).to_string
9puts "Project Fixed Cost: " + project.getRootTask().get(tsk.FIXED_COST).to_string
10puts "Project Remaining Cost: " + project.getRootTask().get(tsk.REMAINING_COST).to_string
11puts "Project Variance Cost: " + project.getRootTask().get(tsk.COST_VARIANCE).to_string
Download Running Code
Download Managing Task Costs (Aspose.Tasks) from any of the below mentioned social coding sites: