Timesheet Variables

Revision as of 14:27, 24 July 2014 by Arthur Lathrop (talk | contribs)

Revision as of 14:27, 24 July 2014 by Arthur Lathrop (talk | contribs)

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~

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>

<tr><th> [#(?object=timesheet;criteria=isagainstjob=1;groupfunction=sum)~totalhours~#]</th>

<th> [#(?object=timesheet;criteria=isagainstjob=0;groupfunction=sum)~totalhours~#]</th>

<th> [#(?object=timesheet;criteria=tsinvoiceid>0 and isagainstjob=1;groupfunction=sum)~totalhours~#]</th>

<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>#]

See Also