sa_ratescriptlanguage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sa_ratescriptlanguage [2023/04/11 14:07] Scott McMullensa_ratescriptlanguage [2023/04/19 14:22] (current) – [Indenting] Scott McMullen
Line 2: Line 2:
 ==== Introduction ==== ==== Introduction ====
 Temp Rate Scripts provide the mechanism for converting shifts into timesheet lines when the timesheet is completed. The script must be attached to the Rate Scheme which is being applied.\\ \\  Temp Rate Scripts provide the mechanism for converting shifts into timesheet lines when the timesheet is completed. The script must be attached to the Rate Scheme which is being applied.\\ \\ 
 +
 The Commands are listed below, followed by Examples. The Commands are listed below, followed by Examples.
 <note warning>Scripts are case sensitive.</note> <note warning>Scripts are case sensitive.</note>
Line 42: Line 43:
 |addupto time paybandname | an alternative method of time-slicing. E.g. addupto 06:00 Early. Must be used inside a foreach dayslice but NOT inside a foreach timeslice. May have a series of adduptos with increasing times to slice up the day. Each one reduces the residual amounts in the block to prevent double posting. As with timeslice, breaks are deducted from the largest slice.| |addupto time paybandname | an alternative method of time-slicing. E.g. addupto 06:00 Early. Must be used inside a foreach dayslice but NOT inside a foreach timeslice. May have a series of adduptos with increasing times to slice up the day. Each one reduces the residual amounts in the block to prevent double posting. As with timeslice, breaks are deducted from the largest slice.|
 |showrate paybandname | the payband is added to the timesheet but with zero hours, as a place-holder for edits at completion time.| |showrate paybandname | the payband is added to the timesheet but with zero hours, as a place-holder for edits at completion time.|
 +
 +
 +
  
  
Line 49: Line 53:
 \\ \\
 ==== Indenting ==== ==== Indenting ====
 +
 +Nesting the Commands
 +
 +We start off with
 +<sxh>
 +foreach shift
 +-foreach dayslice
 +--foreach timeslice
 +--foreach timeslicedefault  (same as foreach timeslice)
 +</sxh>
 +Within each band we add the required details for days and times. You don’t need to use all, but it needs to be in that order. \\ \\
 +
 +
 The number of leading spaces indenting each command is used to determine which commands are affected by //foreach// and //if// commands. E.g. if the leading space is removed from the final //post// command in the second example above, it will be outside the //foreach// shift loop, and the effect will be to post summary pay band totals for the timesheet as a whole (i.e. not more than one timesheet line per pay band).  The number of leading spaces indenting each command is used to determine which commands are affected by //foreach// and //if// commands. E.g. if the leading space is removed from the final //post// command in the second example above, it will be outside the //foreach// shift loop, and the effect will be to post summary pay band totals for the timesheet as a whole (i.e. not more than one timesheet line per pay band). 
 \\ \\ \\ \\
  • sa_ratescriptlanguage.1681222071.txt.gz
  • Last modified: 2023/04/11 14:07
  • by Scott McMullen