How to get cost based on labor rate card and time card for a task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2016 10:22 PM
How can I relate the time spent on a Service Catalog Task to the Labor Rate Card to calculate the total cost of a resource for a task? I am trying to get the task to be listed in the expense lines in the Labor Rate Card form with the cost for each task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2016 06:24 PM
Do you have a blended rate for all resources or individual labor rate. If the former, it's simply
Total Labor Cost for Task = sc_task.time_worked x blended_cost
If the latter, which more sounds like your case, and since a task might be worked on my more than one resource,
Total Labor Cost for Task = SUM( task_time_worked.time_worked x labor_rate(task_time_worked.user) ) for task_time_worked.task
So the table to use is task_time_worked [Time Worked] which tracks all time spent for all tasks. You'd filter (or join) this on the task reference field: sc_task.sys_id = task_time_worked.task
Then iterate over all rows you find, multiply task_time_worked.time_worked by the labor rate of task_time_worked.user, and sum them up for the total cost for the task.
Hope this helps.
Please feel free to connect, follow, mark helpful / answer, like, endorse.
John Chun, PhD PMP ![]() | ![]() |
Winner of November 2016 Members' Choice Award
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2017 09:36 PM
Hey John,
Can you please elaborate a little more on the above on how and where to use the above info to get the result that I am looking for.
Please note that I have created a Time Worked field on the Service Catalog task form and once the task is closed I need this time to generate an Expense Line in the Labor Rate Card for a particular resource.
I would appreciate it if you could please share screen shots of the process.
Thanks
Sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 06:27 AM
Can you provide some details:
- Does only 1 resource always work on a task?
- How are you getting the labor rate for a resource? For example, are you using sys_user_group.hourly_rate [Hourly rate] or fm_labor_rate_card.rate_code [Rate code] and, if so, how do you look it up for a resource?
- Can you create only 1 Expense Line or is it OK to create multiple per a task (for example, if multiple resources are involved)?
- Do you use parent-child relationships for Expense Lines for a task (for example, if multiple resources are involved)?
- Do you insert Expense Lines only when a task is Closed (if so, what's the task value for Closed)? Or do you do that while a task is in progress?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2016 06:52 PM
FYI, time_worked is a duration field type. task_time_worked.time_in_seconds gives time worked in seconds.