Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • IF a rule exists on this line

  • ELSE if no rules above match, use this result

  • $value_type value type name

  • $empty special handler for empty values

  • == equals

  • != does not equal

  • AND links multiple conditions

  • THEN result follows

  • + concatenate with another value type or text

...

These variables are available in both your condition, and in your output. Prefix these variables with a $ so they are recognised as a variable rather than plain text.

  • Standard fields

    • date

    • finish_time

    • from_date

    • hourly_rate

    • hourly_rate_adjusted

    • pdrst_hours

    • hours

    • job_notes

    • rate_autoselect

    • rate_type

    • rate_type_text

    • role

    • start_time

    • start_time__finish_time

    • to_date

    • total

    • unit_rate

    • units

    • units_autoselect

    • unpaid_break

    • row_split

    • submitted_late

    • unpaid_break_start_times

    • unpaid_break_end_times

    • multiplier

  • Association fields

    • absence__code

    • absence__comment

    • absence__name

    • block__codes

    • block__costing_code

    • block__names

    • block_name__task_name

    • client__code

    • client__costing_code

    • client__division

    • client__subdivision

    • client_name__location_name__block_name

    • costing_code

    • costing_code__task_code

    custom
    • employee__

    logic
    • division

  • date

    • employee__email

    • employee__full_name

    • employee__recruitment_type

    • employee__staff_id

    finish
    • employee__

    time
    • subdivision

    from
    • employee__

    datejob_notes
    • groups

  • hourly_rate

  • hourly_rate_adjusted

  • hours

    • job__leader__full_name

    • location__costing_code

    • location_

    name__block_name__task_name
  • rate_autoselect

  • rate_type

  • rate_type_text

  • role

  • row_name

  • row_type

  • start_time

  • start_time__finish_time
    • _division

    • location__subdivision

    • location_name__block_name__task_name

    • task_category__code

    • task_category__name

    • task_code__code

    • task_code__name

  • Costs

    • base_cost

    • topups_cost

    • pdrst_cost

    • performance_bonus_cost

      • Proportion of total performance bonus earned, applied to this timesheet

    • performance_

    date
  • total

  • unit_rate

  • units

  • units_autoselect

  • unpaid_break

  • row_split

  • unpaid_break_start_times

  • unpaid_break_end_times
    • bonus

      • Performance of the timesheet. Useful for per-timesheet performance comparisons.

      • Positive when unit rate (converted to hourly) is above hourly rate.

      • Negative when unit rate (converted to hourly) is below hourly rate.

    • foreign_cost

    • additional_cost

    • overtime_cost

    • total_cost

    • cost_per_unit

  • Other fields

    • custom_logic

    • row_name

    • row_type

Row types

Each row has two further variables that are useful when creating logic based on the type of row we’re working with.

  • row_type will be one of:

    • summary

    • timesheet_entry

    • absence

  • row_name can be one of:

    • paid_rest_break

    • topup

    • contract_hours

    • hourly_hours

    • performance_hours

    • total_hours

    • ordinary_hours

    • overtime_hours

      • If multiple overtime rates, then these will be in the format overtime_hours_RATE, for example overtime_hours_2.0

    • days_worked

    • pay_contract_summary summary

    • agreed_hours_topup

    • minimum_earnings_topup

    • pay_performance_summary

    • performance_bonus

    • absence_hours

Examples

Example 1

Code Block
IF $row_type == summary THEN $hours
  • If the row is a summary row, then return the row’s $hours

  • Example result

    Result: “1.25”

Example 2

Code Block
IF $unit_rate == 1.5 THEN piece rate+_+$unit_rate
  • If the row’s unit rate is 1.5, then concatenate text with

    unit rate

    “unit rate”

  • Example result: “piece rate_1.5”

Example 3

Code Block
IF $row_name == topup THEN

...

 $total
IF $row_name == paid_rest_break THEN

...

 $hours
IF $row_type == timesheet_entry AND $rate_type == contract THEN $unit_

...

rate
ELSE $hourly_rate
  1. If the row is the top-up summary row, then return the total value ($total); otherwise

  2. If the row is the paid breaks summary row, then return the number of hours ($hours); otherwise

  3. If the row is a contract timesheet entry, then return the unit rate ($unit_rate); otherwise

  4. Return the hourly rate ($hourly_rate)

Example 4

Code Block
IF $location__division != $empty THEN $location__division
IF $client__division != $empty THEN $client__division
IF $row_type == timesheet_entry THEN No Division
  1. If the row has a Location Division, then return its name

  2. If the row has a Client Division, then return its name

  3. If the row is a timesheet entry return the text “No division”

  4. Otherwise, return nothing