Difference between revisions of "Timesheet Variables"
From SmartWiki
(Created page with "The following variables can be used when creating a {{WPV}} or in other custom fields when referencing Timesheets: On the Web Page View Field|Web ...") |
(→Examples) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
− | :<font size=3>[#(?object=timesheet)~''variablename''~#]</font> | + | :'''<font size=3>[#(?object=timesheet)~''variablename''~#]</font>''' |
'''where''' ''variablename'' is one of: | '''where''' ''variablename'' is one of: | ||
Line 15: | Line 15: | ||
* Billable: '''~billable~''' | * Billable: '''~billable~''' | ||
* Notes: '''~itemdescription~''' | * Notes: '''~itemdescription~''' | ||
+ | * Timecode: '''~timecode~''' | ||
+ | * Is Billable: '''~isagainstjob~''' - ''will return 1 when timecode used is marked as'' billable'', 0 when timecode is not'' | ||
− | == | + | ==Examples== |
− | The following | + | The following are examples that could be used on a {{WPV}} to create a table listing timesheet items: |
− | <pre> | + | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><table cellspacing=0 cellpadding=2 border=1> |
− | <table> | + | |
− | <tr> | + | <tr><th>Staff</th><th>Details</th><th>Date</th><th>Effort</th><th>Status</th><th>Billable</th><th>Billed</th></tr> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </tr> | ||
− | + | [#(?object=timesheet;orderby=actiondate) | |
− | [#(?object= | ||
− | <tr> | + | <tr><td nowrap>~username~</td><td>~itemdescription~</td><td>~actiondate~</td><td>~totalhours~</td><td>~status~</td><td>~billable~</td><td>~if(tsinvoiceid>0,'Yes','No') as billed~</td></tr> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </tr> | ||
#] | #] | ||
− | |||
− | < | + | </table></pre> |
− | + | ||
− | + | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> | |
− | </ | + | |
− | + | <table cellspacing=0 cellpadding=2 border=0> | |
− | + | ||
− | + | <tr><th>Billable Hours</th><th>Not Billable Hours</th><th>Billed Hours</th><th>Unbilled Hours</th></tr> | |
− | </tr> | + | |
− | < | + | |
− | + | <!--Billable Hours:--> | |
− | + | <tr><th> [#(?object=timesheet;criteria=isagainstjob=1;groupfunction=sum)~totalhours~#]</th> | |
− | + | ||
− | < | + | <!--Not Billable Hours:--> |
− | + | <th> [#(?object=timesheet;criteria=isagainstjob=0;groupfunction=sum)~totalhours~#]</th> | |
− | + | ||
+ | <!--Billed Hours:--> | ||
+ | <th> [#(?object=timesheet;criteria=tsinvoiceid>0 and isagainstjob=1;groupfunction=sum)~totalhours~#]</th> | ||
+ | |||
+ | <!--Unbilled Hours:--> | ||
+ | <th> [#(?object=timesheet;criteria=tsinvoiceid=0 and isagainstjob=1;groupfunction=sum)~totalhours~#]</th> | ||
+ | |||
</tr> | </tr> | ||
− | </table> | + | </table></pre> |
− | </pre> | ||
+ | The code between the '''[#(?object=timesheet)''' and closing '''#]''' will be repeated for each timesheet item to be included. | ||
− | + | Other examples include: | |
+ | ===Last Timesheet Entry Date=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=timesheet;groupfunction=max)~actiondate~#] | ||
+ | </pre> | ||
+ | ===Non-Invoiced Hours=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=tsinvoiceid=0 and isagainstjob=1;groupfunction=sum)~totalhours~#]",",",""))*1)--> | ||
+ | </pre> | ||
+ | ===Invoiced=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=tsinvoiceid>0 and isagainstjob=1;groupfunction=sum)~totalhours~#]",",",""))*1)--> | ||
+ | </pre> | ||
+ | ===Non-billable hours=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=isagainstjob=0;groupfunction=sum)~totalhours~#]",",",""))*1)--> | ||
+ | </pre> | ||
+ | ===Billable Hours=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=isagainstjob=1;groupfunction=sum)~totalhours~#]",",",""))*1)--> | ||
+ | </pre> | ||
+ | ===Actual Hours (total hours)=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><!--@sscalculation(REPLACE("[#(?object=timesheet;groupfunction=sum)~totalhours~#]",",","")*1)--> | ||
+ | </pre> | ||
+ | ===Timecodes=== | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=timesheet;)~timecode~<BR>#] | ||
+ | </pre> | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Implementation Note: Saving timesheet records does not trigger the template formulas of Level 1 objects to which they are associated. To have fields summing timesheet items on the Level 1 record, use Read Only - System Variable fields.</pre> | ||
==See Also== | ==See Also== | ||
* [[Invoice UTA|Invoice Configuration Page]] | * [[Invoice UTA|Invoice Configuration Page]] | ||
+ | * [[Invoice Module Variables]] | ||
* [[Web Page View Field Variables]] | * [[Web Page View Field Variables]] | ||
[[Category:Universal Tracking Application]][[Category:Variables]] | [[Category:Universal Tracking Application]][[Category:Variables]] |
Latest revision as of 11:11, 25 July 2014
The following variables can be used when creating a Web Page View or in other custom fields when referencing Timesheets: On the Web Page View you can refer to each Timesheet field using special terminology which allows them to be generated as a list:
Contents
Syntax
- [#(?object=timesheet)~variablename~#]
where variablename is one of:
- Date: ~actiondate~
- User: ~username~
- Status: ~status~
- Client: ~client~
- Project: ~project~
- Duration: ~totalhours~
- Billable: ~billable~
- Notes: ~itemdescription~
- Timecode: ~timecode~
- Is Billable: ~isagainstjob~ - will return 1 when timecode used is marked as billable, 0 when timecode is not
Examples
The following are examples that could be used on a Web Page View to create a table listing timesheet items:
<table cellspacing=0 cellpadding=2 border=1> <tr><th>Staff</th><th>Details</th><th>Date</th><th>Effort</th><th>Status</th><th>Billable</th><th>Billed</th></tr> [#(?object=timesheet;orderby=actiondate) <tr><td nowrap>~username~</td><td>~itemdescription~</td><td>~actiondate~</td><td>~totalhours~</td><td>~status~</td><td>~billable~</td><td>~if(tsinvoiceid>0,'Yes','No') as billed~</td></tr> #] </table>
<table cellspacing=0 cellpadding=2 border=0> <tr><th>Billable Hours</th><th>Not Billable Hours</th><th>Billed Hours</th><th>Unbilled Hours</th></tr> <!--Billable Hours:--> <tr><th> [#(?object=timesheet;criteria=isagainstjob=1;groupfunction=sum)~totalhours~#]</th> <!--Not Billable Hours:--> <th> [#(?object=timesheet;criteria=isagainstjob=0;groupfunction=sum)~totalhours~#]</th> <!--Billed Hours:--> <th> [#(?object=timesheet;criteria=tsinvoiceid>0 and isagainstjob=1;groupfunction=sum)~totalhours~#]</th> <!--Unbilled Hours:--> <th> [#(?object=timesheet;criteria=tsinvoiceid=0 and isagainstjob=1;groupfunction=sum)~totalhours~#]</th> </tr> </table>
The code between the [#(?object=timesheet) and closing #] will be repeated for each timesheet item to be included.
Other examples include:
Last Timesheet Entry Date
[#(?object=timesheet;groupfunction=max)~actiondate~#]
Non-Invoiced Hours
<!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=tsinvoiceid=0 and isagainstjob=1;groupfunction=sum)~totalhours~#]",",",""))*1)-->
Invoiced
<!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=tsinvoiceid>0 and isagainstjob=1;groupfunction=sum)~totalhours~#]",",",""))*1)-->
Non-billable hours
<!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=isagainstjob=0;groupfunction=sum)~totalhours~#]",",",""))*1)-->
Billable Hours
<!--@sscalculation((REPLACE("[#(?object=timesheet;criteria=isagainstjob=1;groupfunction=sum)~totalhours~#]",",",""))*1)-->
Actual Hours (total hours)
<!--@sscalculation(REPLACE("[#(?object=timesheet;groupfunction=sum)~totalhours~#]",",","")*1)-->
Timecodes
[#(?object=timesheet;)~timecode~<BR>#]
Implementation Note: Saving timesheet records does not trigger the template formulas of Level 1 objects to which they are associated. To have fields summing timesheet items on the Level 1 record, use Read Only - System Variable fields.