Enter formulae for payments and deductions
Description

Formulae can be useful to set up complex calculations to deal with special requirements or automate your manual calculations.

Cause
Resolution

Standard references

  • CURE - The current hours / value entered on the time sheet for this element / deduction
  • CURR - The current rate on the time sheet for this element / deduction
  • CURV - The calculated value for this element / deduction
  • PENP - Pensionable pay. This is the sum of payments marked as pens. on the Payroll Payments men
  • DEDX - The number of deduction weeks. This is useful when an amount is to increase for holidays
  • INSX - The number of insurance weeks
  • TAXP - Taxable pay. This is the sum of payments marked as taxable on the Payroll Payments menu
  • NETP - Net pay. Use this only in the formula for the calculation of split net pay

Formula operators

You can use standard mathematical operators in formulae.
SymbolMeaning
+Add
-Subtract
*Multiply
/Divide
%Percent
(Left bracket
)Right bracket

TIP: Formulas use the mathematical order of operations - equations in brackets calculate first.


Specific payments

  • VC[x] - The calculated value for payment number x
  • VE[x] - The entered value / hours for payment number x
  • VR[x] - The effective rate for payment number x

Specific deductions

  • XC[x] - The standard / calculated employee value for deduction number x
  • XD[x] - The standard / calculated employer value for deduction number x
  • XE[x] - The entered amount for deduction number x

Common employee details fields

Field nameDescription
STD_HOURSStandard Hours
HRLY_RATE1Hourly Rate 1
HRLY_RATE2Hourly Rate 2
HRLY_RATE3Hourly Rate 3
HRLY_RATE4Hourly Rate 4
MVALUE1Memo Value 1
MVALUE2Memo Value 2
MVALUE3Memo Value 3
MVALUE4Memo Value 4
GROSS_TEGross Pay This Employment
GROSS_TYGross Pay To Date
PENS_PAYPensionable Pay To Date
NETT_YTDNett Pay To Date
HOL_BFHolidays Brought Forward
HOL_ALLHolidays Entitlement (Allowance)
HOL_TAKHolidays Taken
CSICK_BFSick Cert Brought Forward
CSICK_ALLSick Cert Entitlement (Allowance)
CSICK_TAKSick Cert Taken
USICK_BFSick Un-Cert Brought Forward
USICK_ALLSick Un-Cert Entitlement (Allowance)
USICK_TAKSick Un-Cert Taken
OTHER_BFOther Brought Forward
OTHER_ALLOther Entitlement (Allowance)
OTHER_TAKOther Taken

Example formulae

  • PENP * 0.03 - pensionable pay (payments ticked as pensionable) multiplied by 3%
  • PENP * HRLY_RATE4 - pensionable pay multiplied by Hourly Rate 4 from the employee record, where Hourly Rate 4 contains a different percentage amount for each employee
  • (PENP - 120.00) * 0.03 - pensionable pay less 120.00, all multiplied by 3%
  • 0 – CURE - this formula will turn the current entered value to a negative amount
  • (VC[1] + VC[2] + VC[3]) * 0.15 calculates the sum of payments 1, 2, and 3, multiplies by 15%, such as a Shift Premium

General notes

  • Always use all upper case letters
  • By default, the formula applies to all employees. To exclude specific employees, set them up with a profile that omits the payment or deduction
  • Unknown Token or Unexpected Symbol - If this message appears, the payment/deduction formula format on the timesheet is incorrect. This includes incorrect brackets, or an invalid field reference on the formula. A comment can also appear on the calculated payslip to indicate which payment or deduction is incorrect

Enter a formula for a payment

  1. Click Company / Payroll, then click Payments.
  2. Select the relevant payment, then click Edit.
  3. In the Advanced section, in the Formula box, enter the content.
  4. Click Save, then click Close.

Enter a formula for a deduction

  1. Click Company / Payroll, then click Deductions.
  2. Select the relevant deduction, then click Edit.
  3. In the Advanced section, in the Employee Formula box, enter the content.
  4. To enter a formula for the employer's contribution, in the Employer Formula box, enter the content.
  5. Click Save, then click Close.

External formula

Sometimes, the formula you require is too long to fit in the formula fields in the payment or deduction element settings. Enter the required formula in a text file with a .fml extension. Store the .fml file in the Sage Payroll Data Directory. In the formula field in the formula section of the payment or deduction, enter the following:

program "formula.fml"

This will enable a longer and more complex formula to apply to your employee's timesheets.

Have a formula designed for you

To save you time, we offer a chargeable formula design service. Our senior specialist can create a custom formula for all types of scenarios that require processing each pay period. For more information, Contact us.

[BCB:22:IE - Sales message :ECB]
Steps to duplicate
Related Solutions