Calculation rules for T4, T4A, RL1 boxes

Overview

There is one table in TBL (Admin > Tables) for each government form: T4, RELEVE1, T4A, etc.

There is one entry in the table for each box on the form. There can also be entries in the table which contain intermediate results (i.e. used in other boxes) but are not actually on the form.

Each box on each government year-end form (T4, RL1, etc.) contains a section called the CALC RULE. This topic explains how the CALC RULE section is coded.

The CALC RULE is a kind of script which basically lists the pay codes that should get totaled into the box. There are other fancier options as well.

Processing order

The process for producing tax forms is straightforward:

  1. One employee is processed at a time.

  2. For each employee, each TBL entry (boxes on the form) is processed, one box at a time, in the order of the SORT field.

  3. For each box (TBL entry), each line in the the CALC RULE is processed, accumulating the results.

CALC RULE line contents

There are 3 different formats used for CALC-RULE lines:

  1. A Comment line starts with an asterisk
  2. A Pay code line starts with a letter (or a minus sign + a letter)
  3. An Expression starts with a tilde (~)
Example for Box 14 on the T4 form
*** Accumulate all FTAX-able earning codes
E;FTAX;AMTYTD
B;INS;EPRYTD        && Add group insurance, employer share
B;ADD;EPRYTD        && ADD insurance, employer share

1. Comment lines

Put an asterisk at the beginning of a line to make it comment.

Comments are ignored by the processing engine, but make your rule more readable. You can also have blank lines.

2. Pay code lines

Each line is

  • A series of 3 to 4 arguments separated by a semicolon (;) and optionally preceded by a minus sign [-].
  • A minus sign placed before the type, tells the program to SUBTRACT instead of add the amount in question

[-] type; paycode; field; [maximum]

Possble Combinations

(1) Type ( 2) PayCode (3) Field
H = from TIMEOPT A code in the table PD_AMTYTD
A = from ABSENCE A code in the table PD_AMTYTD
R = from AMTOPT A code in the table PD_AMTYTD
P = from PRIME A code in the table PD_AMTYTD
M = from MISCBANK A code in the table PD_AMTYTD
-   -   -   -   -   -   - -   -   -   -   -   - -   -   -   -   -   -   -
E = All taxable/
applicable earnings
A DEDSTAT code PD_AMTYTD
--------------------- ------------------- --------
B = Benefit A Benefit plan PD_EPEYTD or PD_EPRYTD or a DEDSTAT
S = Statutory
deduction
A DEDSTAT code PD_EPEYTD or PD_EPRYTD
Type

The Type is represented by a single letter. The possibilities are:

  • "T" (Earnings Codes from the Table TIMEOPT)
  • "R" (Earnings Codes from the table AMTOPT)
  • "A" (Earnings Codes from the Table ABSENCE)
  • "P" (Earnings Codes from the table PRIME)
  • "M" (Earnings Codes from the Table MISCBANK)
  • "E" (All Earnings codes subject to a specific tax - see below)
  • "B" (Benefits and Deductions)
  • "S" (statutory deductions)

PayCode

The PayCode contains the Earnings or benefit code, employer deductions or a statutory deduction code.

  • Leave blank to include all earnings, benefits and statutory deductions
  • With Type = E, indicate the statutory deduction code (from the DEDSTAT table), and you will obtain all the earnings subject to that tax.

Field

The Field is extracted from net pay (PAYDT table). The allowed values are:

  • PD_AMTYTD (The earnings paid amount, from the TIMEDT table)
  • PD_EPEYTD (the employee contribution paid to the net pay)
  • PD_EPRYTD (the employer contribution paid to the net pay)
  • PD_BASEYTD (the employee earnings on which the calculations are based)

For Benefits and Deductions (Type = B), you can also extract the taxable benefit from PD_TAXABLE by putting a DEDSTAT code. This extracts the benefit’s taxable amount:
FTAX, PTAX, UIC or EI, CPP, QPIP, RRQ, FSS, CNT, CSST.

Maximum

The maximum is a number or expression. This information is optional.
This value represents the maximum annual amount and is used when there is a maximum to be achieved in the year as is the case with employment insurance. It would normally be:

  • A number representing the maximum insurable

  • A property of the function " loDedstat " such as: loDedstat.nUICmaxAdm = Maximum insurable for EI

    • loDEDSTAT. < property name > to access maximums and minimums, etc.

EXAMPLES

  • The calc rule for Box 14 employment income:

  • E;FTAX;PD_AMTYTD;
    B;LIFE;PD_EPRYTD
    B;MMA;PD_EPRYTD

    This translates to: include all Federally taxable Earnings paid,
    include Life benefit employER contribution,
    include MMA benefit employER contribution

  • The calc rule for Box 44 for union dues deducted:
    B;UNION1;PD_EPEYTD
    This translates to employee paid UNION1 dues

    B;UNION2;PD_EPEYTD
    This translates to employee paid Union2 dues (where Union1 & Union2 represent two separate unions)

  • The calc rule for Box 56 to indicate the employee’s pensionable earnings for RQAP, would contain the following formula:

    E;RQAP;PD_AMTYTD;loDedstat.nRQAPmaxAdm
    Earnings paid on which RQAP was applied upto the maximum (where the expression RQAPmaxAdm represents the maximum pensionable RQAP earnings)

3. Expression lines

A tilde(~) followed by an expression, tells Umana to evaluate the expression and accumulate (or use as is) the result.

~expression, or ~~expression

If the line starts with 2 tildes (~~) the result of the expression is used as is, rather than accumulating it into the previous total.

The expression can refer to:

  • BOX<nn> = the value of box id already calculated. E.g. BOX14, BOXUICBASE, etc.

  • loDEDSTAT.<property-name> to have access to maximums and minumums, etc.

  • lnAmt = the running total so far for this box (from the previous lines)

    For example, after a number of lines summing up the CPP base amount, you might add the line:
    ~~ iif ( lnAmt >= loDedstat.nCppMaxadm, null, lnAmt)


© Carver Technologies, 2024 • Updated: 07/16/21
Comment or report a problem with this topic