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/18 10:41] Scott McMullensa_ratescriptlanguage [2024/11/19 14:19] (current) Shelley Hunter
Line 53: 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). 
 \\ \\ \\ \\
Line 134: Line 147:
 --add Basic --add Basic
 thresholdsplit 37.5 Basic|Overtime thresholdsplit 37.5 Basic|Overtime
 +post
 +</sxh>
 +
 +When a minimum number of hours are to be paid.
 +
 +<sxh>
 +foreach shift
 +-foreach dayslice
 +--foreach timeslice 06:00 18:00
 +---if intimeslice
 +----addmin 10 Day
 +---addmin 10 Night
 post post
 </sxh> </sxh>
  • sa_ratescriptlanguage.1681814512.txt.gz
  • Last modified: 2023/04/18 10:41
  • by Scott McMullen