Introduction The Complete Solution Starter Kits Software Hardware

Pricing Availability Reports Documentation Downloads

 
Running Totals

Required Level : Standard
Required Version : 3.06c or later


TNA 4 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 4 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;

  1. Use the Configuration module, Setup / Shifts 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.

  1. 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.

  1. 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 4 techniques to do this. Here are some examples of the common methods;

Using Balancing
Balancing is one obvious technique.  For example if the maximum normal time is set to 8:30 hours, then any excess can be moved into Flexi+ time. Similarly if the time worked is less than 8:30 hours then time will be taken from Flexi- to make up the required 8:30 hours.

In the example below we are going to define that an employee is required to work 8:30 hours per day, any extra time will be moved to the flexi time category and if they are short of time the time required to make up the 8:30 hours will be taken from the Flexi time category. This is to be implemented daily - there for will be set using Daily Shifts (if it is required to be adjusted when processing payroll hours then the Balancing will be done using Payroll Shifts).

  1. Select Daily Shifts option from the toolbar Setup / Shifts menu.
  2. When the Browse Daily Shifts window is displayed, select the particular Shift to which the Flexi time is to be associated and then select the Balancing settings option.

  1. Set the Category for the Flexi Time Total category, the Min time to be that of the minimum hours that have to be worked (8:30), the Get From category to be that of the subtract time category (Flexi-), the Max time to be that of the maximum hours to be worked and the Send to Category for the add time category (Flexi+) where any time above that of the required 8:30 hours will be stored.
  2. Select Save to save these settings.

Now when the Daily Hours processing is performed, if the employee works more than the required Daily Hours (8:30) then the additional hours will be added to the flexi time category and if the daily hours are less than the required daily hours, then the balance will be taken from the flexi time category to make up the required hours (8:30).



Using Macro 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.

 

© 2005 by CapeSoft Software (Pty) Ltd       Disclaimer