HomeRunning Totals
Required Level : Standard

Required Version : 3.06c or later

TNA 2000 allows you to categorise the time worked by the employee. Typical categories include Normal Time, Excess Time, Overtime  1, Double Time and so on. Depending on the time of day worked, the employee accrues time in different categories.

Some categories may contain a "Running Total" of time. Flexitime is a good example of this. On any particular day an employee may have earned extra time, or indeed lost some time. This is collected in a running total so that at any time the employee can know how much they have. 

TNA 2000  supports this running total process, and this document explains how to implement it.

Related Articles

Shift Categories

Concepts

The basic idea revolves around time categories. As you probably know by now you will build up shifts using blocks of time marked at a particular category. Normally the employee is paid directly out of this. 

With Running Totals 3 categories are used. One category is for Time added, one for time removed, and the last category is the actual Total category.

Note that you should never manually, or automatically, assign time directly into the Running Total category. If you do this then the processor will almost certainly overwrite your changes. You should always manipulate the Add, and Subtract categories instead.

At the end of each pay period (ie each "week") then Daily Hours are consolidated into Payroll Hours. During this process the Running Total may be altered according to the shift rules. For example you may have a macro script that implements a cap to the number of hours that can be carried forward.

Thus at the beginning of the following week, the Daily Running Total may need to be reset to the Total as set at the end of the previous week. Alternatively you could decide to reset it to zero (ie start each week with a fresh total) or not reset it at all. 

Configuration

1) Create 3 time categories using the Configuration module, The first is to hold the "Running Total" time, the others contain the Add and Subtract categories. To do this;

A) Use the Configuration module, Shift Setup menu, Shift Time Categories option. Add a category. Call it say Flexitime. For this category set the type to Total, and make it a Daily Total. Set the Reset field as desired. 

B) Add a second category. Call this one say Flexi+ (This is the category we will use to Add time to the Flexitime total.) For this one set the Category as Add and set the Affected total to be Flexitime.

C) Lastly add a third category. This will be the category used to subtract time from the total. Call this one say Flexi-. Set the category as Subtract, and as with the previous one set the affected total to be Flexitime.

Some Processing examples

So now the categories are set up, but unless the system is completely manual, you will need to add some shift processing rules to get time into the Add and Subtract categories. You can obviously use any of the usual TNA 2000 techniques to do this. Here are some examples of the common methods;

Balancing

Balancing is one obvious technique.  For example if the maximum normal time is set to 8 hours, then any excess can be moved into Flexi+ time. 

Scripts

Using a script allows for the most flexible rules, and hence is the approach most often used. Simply put you can manipulate the time calculated, moving time from one category to another. There are 2 embed points created especially for this purpose. The one is called
Before Daily Running
and the other is
Before Payroll Running
An example script might look like this;

At Before Daily Running
  If Dai:Hours2 > 2880000
    Dai:Hours6 = Dai:Hours2 - 2880000
    Dai:Hours2 = 2880000
  Else
    Dai:Hours7 = 2880000 - Dai:Hours2
    Dai:Hours2 = 2880000
  End

In the above script the normal time is set to 8 hours (remember in the scripts time is measured in hundredths of a second - ie 1 hour is 360000 and 8 hours is 2880000). If the person has worked more than 8 hours then the excess is moved to the Flexi+ category (category 6) and the normal time is limited to 8 hours. If they've worked less than 8 hours then the missing time is added to the Flexi- time, and the normal hours is again set to 8.

A slightly more complicated script might not allow the flexitime to become negative. In other words the normal time is only padded out if sufficient flexitime exists. In this case the script might look like this;

At Before Daily Running
  If Dai:Hours2 > 2880000
    Dai:Hours6 = Dai:Hours2 - 2880000
    Dai:Hours2 = 2880000
  Else
    If Dai:Hours8 > Dai:Hours2 - 2880000
      Dai:Hours7 = 2880000 - Dai:Hours2
      Dai:Hours2 = 2880000
    Else
      Dai:Hours7 = Dai:Hours8
      Dai:Hours2 = Dai:Hours2 + Dai:Hours8
    End
  End

In both of the above scripts the Add category is category number 6, the subtract is number 7 and the total is in 8. The Normal time is in category 2.

Of course these are just 2 common examples. You will need to adjust the rules depending on the rules required on your site. For more information on macros click here.

Manually Editing the Running Totals 

You can manually edit the employee's Running Total in the User module. The important thing to note however is that you should not edit the Running Total category directly. Rather you should add time to either the Add or Subtract columns 

For this reason, when editing Daily and Payroll hours records, you will not be able to see any of the Categories which are marked as Running Totals.

When viewing Daily and Payroll hours the Running Totals column will appear in Blue.

 

This page last updated on 30 April 2002