> For the complete documentation index, see [llms.txt](https://help.allwage.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.allwage.com/modules/payroll/payrun-templates.md).

# Payrun Templates

Set up earning, deduction and benefit templates: link them to hours and other metrics, set or link their rate (including to other templates), and use unit constraints, value limits, monthly limits and

## Introduction

A pay run template defines one line on the payslip: an earning, a deduction or a benefit. It says what is measured (for example hours worked), the rate it is paid at, and which SARS code it is reported under. You set a template up once and use it for all the employees it applies to.

Templates are managed on **Payroll > Pay run templates**.

### How to create a new pay run template

You can create a new pay run template at any time if you have the correct permissions. Pay run templates are shared by your whole organisation, so only Admins, or users whose role gives **Input templates** **Read / Write** access, can create or change them. See [Payroll permissions](https://help.allwage.com/fundamentals/users-and-employees/user-permissions/payroll-permissions.md).

#### Before you create the template

Answer these questions first. You can't change the pay run type or the SARS code after the template is created.

1. **What type of template is it?**
   * **Earning**: an amount paid to the employee, such as wages, overtime or an allowance.
   * **Deduction**: an amount taken off the employee's pay, such as a union fee or a shop deduction.
   * **Benefit**: a company contribution or a fringe benefit.
2. **Which SARS code (tax total) does it need to be reported under?** The SARS code decides how the amount is taxed and how it is reported on the IRP5. See [SARS codes](https://help.allwage.com/modules/payroll/payrun-templates/sars-codes.md). If you're unsure, check with your accountant.
3. **How does the template work?**
   * Should AllWage read the quantity from the Employee Overview Report (EOR)? See [Read the quantity from the Employee Overview Report](#read-the-quantity-from-the-employee-overview-report).
   * Should the template use another template to do its calculation? See [Calculate the amount from another template](#calculate-the-amount-from-another-template).
   * Should the amount be the same for each person with this template? See [Pay the same amount to everyone with the template](#pay-the-same-amount-to-everyone-with-the-template).
   * Should the user enter their own amount? See [Let the user enter their own amount](#let-the-user-enter-their-own-amount).
   * Should the user enter their own quantity of hours or days? See [Let the user enter their own quantity](#let-the-user-enter-their-own-quantity).
   * Should the user enter both their own quantity and their own amount? See [Let the user enter both a quantity and an amount](#let-the-user-enter-both-a-quantity-and-an-amount).

#### Pay run template descriptions and terminology

On **Payroll > Pay run templates**, click **Add template**. The **Add a new template** panel opens.

1. **Template name**: required. It can't be the same as, or very similar to, the name of another template, including templates that were deleted. If it is, AllWage shows "Similar template name already exists".
2. **Add a description (Optional)**: what the template is for.
3. **Pay run type**: **Earning**, **Deduction** or **Benefit**. You can't change this after the template is created.
   * For a deduction, also choose the **Deduction type**: **Default**, **Saving** or **Loan**. Savings and loans work differently: see [Savings](https://help.allwage.com/modules/payroll/loans-and-savings/savings.md) and [Loans](https://help.allwage.com/modules/payroll/loans-and-savings/loans.md).
4. **SARS Code**: click the card and choose the code the template is reported under. You can't change it after the template is created. See [SARS codes](https://help.allwage.com/modules/payroll/payrun-templates/sars-codes.md).
5. **Link a metric or quantity (Optional)**: what the template measures. See [Link a metric or quantity](#link-a-metric-or-quantity). Leave it empty for a fixed amount.
6. **Set the rate**: a rate in rand, or a link to a system rate or to other templates. See [Set the rate](#set-the-rate).
7. Optional settings:
   * **Set value limits**: a minimum or maximum rand amount, and how many times a month the template can apply. See [Value limits](#value-limits).
   * **Enable pro-ration**: pay part of a fixed amount when the employee only worked part of the period. See [Pro-ration](#pro-ration).
   * **Show benefit on payslip** (benefits only): see [Seeing both amounts on the payslip](https://help.allwage.com/modules/payroll/payrun-templates/sars-codes.md#seeing-both-amounts-on-the-payslip).
8. Click **Add**.

The line's amount is the quantity times the rate. If no quantity is linked, the quantity is 1.

{% hint style="info" %}
**Tax treatment comes from the SARS code.** There are no separate PAYE or UIF settings on a template. Whether an earning is taxable, and how it is reported on the IRP5, is decided by the SARS code you choose.
{% endhint %}

#### Read the quantity from the Employee Overview Report

Use this when the template pays or deducts for something AllWage measures from clocks and captured data, the same figures the Employee Overview Report (EOR) shows, such as normal hours, overtime or leave.

1. Go to **Payroll > Pay run templates**.
2. Click **Add template**.
3. Enter the **Template name**. It has to be unique.
4. Choose the relevant **Pay run type**: **Earning**, **Deduction** or **Benefit**.
5. Click **Link to SARS code** and select the appropriate SARS tax total.
6. Click **+** next to **Link a metric or quantity (Optional)**.
7. Choose what to measure: [working hours, leave, absent days, activities, harvesting, packing, assets or a custom metric](#link-a-metric-or-quantity). For example, for normal hours choose **Working hours**, then **Normal** as the **Working hours type** and **Hourly** as the **Measurement unit**, choose the days of the week, and click the metric to add it.
8. Under **Set the rate**, click the link icon, choose **System rates** and select the system rate you want to use, for example your minimum wage. If you want to change the amount yourself from time to time, type your own rate in rand instead.
9. Click **Add**.

On each pay run, AllWage multiplies what it measured by the rate. You can't change the quantity on an employee's pay run, because it comes from the clocks. To change what is measured, correct the clocking data or the metrics linked to the template.

#### Calculate the amount from another template

Use this when the amount depends on other templates, for example a fringe benefit equal to an employer contribution, or a union fee of 1% of taxable earnings.

1. Go to **Payroll > Pay run templates**.
2. Click **Add template**.
3. Enter the **Template name**. It has to be unique.
4. Choose the relevant **Pay run type**: **Earning**, **Deduction** or **Benefit**.
5. Click **Link to SARS code** and select the appropriate SARS tax total.
6. Leave **Link a metric or quantity (Optional)** empty.
7. Click the link icon next to **Set the rate**.
8. Choose **Pay run templates** and select the templates to calculate from. To use a percentage of all taxable earnings instead, choose **All taxable earnings**.
9. In **Add a factor e.g X 1,5 (default 1)**, type the factor as a decimal. Leave it at 1 for the same amount. For a percentage, divide it by 100, for example:
   * **0.055** for 5.5%
   * **0.1** for 10%
   * **0.005** for 0.5%
10. Click **Add**.

This is a good option for amounts that are usually calculated as a percentage of the hourly wage or basic salary, such as union fees or accommodation. Select the template that pays the hourly wage or basic salary in step 8. It is also a good way to link your fringe benefit (FB) templates to your company contribution (CC) templates, for example for retirement funds, so that the FB amount follows the CC amount.

What a template can link to depends on its pay run type. See [Linking to other pay run templates](#linking-to-other-pay-run-templates).

#### Pay the same amount to everyone with the template

Use this when every employee who has the template gets the same fixed amount on each pay run, such as a monthly allowance or a fixed deduction.

1. Go to **Payroll > Pay run templates**.
2. Click **Add template**.
3. Enter the **Template name**. It has to be unique.
4. Choose the relevant **Pay run type**: **Earning**, **Deduction** or **Benefit**.
5. Click **Link to SARS code** and select the appropriate SARS tax total.
6. Leave **Link a metric or quantity (Optional)** empty.
7. Under **Set the rate**, add the amount that needs to be added to all employees who have this template.
8. Click **Add**.

Every employee with the template gets this amount on each pay run. If you change the rate on the template later, the new amount applies to everyone who has it, in pay runs that aren't finalised. To pay one employee a different amount, click **Edit** next to the template's line on that employee's pay run, enter the amount as the rate, and click **Create override**.

To pay only part of the amount when an employee worked part of the pay run, for example in their first or last month, switch on **Enable pro-ration**. See [Pro-ration](#pro-ration).

#### Let the user enter their own amount

Use this when the amount is different for each employee or each pay run, such as notice pay, a bonus or a shop deduction.

1. Go to **Payroll > Pay run templates**.
2. Click **Add template**.
3. Enter the **Template name**. It has to be unique.
4. Choose the relevant **Pay run type**: **Earning**, **Deduction** or **Benefit**.
5. Click **Link to SARS code** and select the appropriate SARS tax total.
6. Leave **Link a metric or quantity (Optional)** empty.
7. Under **Set the rate**, type **0**, or the amount most employees get.
8. Click **Add**.

To enter the amount for an employee:

1. Add the template to the employee's pay run. See [Manage Pay Run Templates](https://help.allwage.com/modules/payroll/recurring-pay-runs/current-pay-run.md#manage-pay-run-templates).
2. On the pay run, click the employee's name.
3. Click **Edit** next to the template's line.
4. Enter the amount as the rate.
5. Click **Create override**.

To enter amounts for many employees at once, use [Import Pay run templates](https://help.allwage.com/modules/payroll/recurring-pay-runs/current-pay-run.md#add-adhoc-templates-to-employees). For an amount that should only be paid once, add the template as a once-off template. See [Notice pay and other ad-hoc earnings](#notice-pay-and-other-ad-hoc-earnings).

#### Let the user enter their own quantity

Use this when the user should enter a number of hours, days or other units for each employee, and the template pays a set rate for each unit.

1. Go to **Payroll > Pay run templates**.
2. Click **Add template**.
3. Enter the **Template name**. It has to be unique.
4. Choose the relevant **Pay run type**: **Earning**, **Deduction** or **Benefit**.
5. Click **Link to SARS code** and select the appropriate SARS tax total.
6. Click **+** next to **Link a metric or quantity (Optional)** and open the **Custom Quantity** tab.
7. In **What is your unit of measure?**, type the unit, for example days or hours.
8. In **How many units should be added?**, type the usual number of units, or 0.
9. Click **Add** to close the panel.
10. Under **Set the rate**, click the link icon, choose **System rates** and select the system rate to pay for one unit, for example your minimum wage.
11. Click **Add**.

To enter the quantity for an employee:

1. Add the template to the employee's pay run. See [Manage Pay Run Templates](https://help.allwage.com/modules/payroll/recurring-pay-runs/current-pay-run.md#manage-pay-run-templates).
2. On the pay run, click the employee's name.
3. Click **Edit** next to the template's line.
4. Change the **Quantity**.
5. Click **Create override**.

The line pays the quantity times the rate. See [Custom quantity](#custom-quantity).

#### Let the user enter both a quantity and an amount

Use this when the user should enter both the number of units and the rate for each employee.

1. Go to **Payroll > Pay run templates**.
2. Click **Add template**.
3. Enter the **Template name**. It has to be unique.
4. Choose the relevant **Pay run type**: **Earning**, **Deduction** or **Benefit**.
5. Click **Link to SARS code** and select the appropriate SARS tax total.
6. Click **+** next to **Link a metric or quantity (Optional)** and open the **Custom Quantity** tab.
7. In **What is your unit of measure?**, type the unit, for example days or hours.
8. In **How many units should be added?**, type the usual number of units, or 0.
9. Click **Add** to close the panel.
10. Under **Set the rate**, type **0**. Don't link the rate to a system rate.
11. Click **Add**.

To enter both for an employee:

1. Add the template to the employee's pay run. See [Manage Pay Run Templates](https://help.allwage.com/modules/payroll/recurring-pay-runs/current-pay-run.md#manage-pay-run-templates).
2. On the pay run, click the employee's name.
3. Click **Edit** next to the template's line.
4. Change the **Quantity** and enter the amount as the rate.
5. Click **Create override**.

The line pays the quantity times the rate. If the rate is linked to a system rate, you can only change the quantity on the employee's pay run.

### SARS Source codes

SARS codes are grouped by pay run type: you only see the codes that fit an earning, a deduction or a benefit. Each code has a short description and examples of when to use it. Lump-sum codes aren't offered: a lump sum is paid through a [tax directive](https://help.allwage.com/modules/payroll/filing/tax-directives.md).

<figure><img src="https://4190935239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQs9GZ7QOfs5wHesuQLQh%2Fuploads%2FHG8FTOifeVwRKrG2tsVv%2F3%20-%20SARS%20codes.png?alt=media&amp;token=3089308c-3fec-422b-b0a9-7c910ec014c3" alt="The Link to SARS code list, showing each code with its description"><figcaption><p>Link to SARS code</p></figcaption></figure>

[Learn more](https://help.allwage.com/modules/payroll/payrun-templates/sars-codes.md) about SARS codes and how to use them.

### Link a metric or quantity

Click **+** next to **Link a metric or quantity (Optional)**. The **Choose a quantity type** panel has two tabs: **Metrics** and **Custom Quantity**. A template uses either linked metrics or a custom quantity, not both.

**Metrics** link the template to what AllWage measures from clocks and captured data:

* **Activities, harvesting, packing and Assets**: units captured against an activity, harvest, pack item or asset transfer, for piecework. Choose the item, then what to measure (for example measured units, units over target or total hours).
* **Working hours**: choose the **Working hours type** (**Normal**, **Overtime** or **Public Holidays**), the **Measurement unit** (**Daily** or **Hourly**) and, for normal hours and overtime, which days of the week. Click a metric to add it.
* **Leave**: leave hours or days by leave type, such as annual, sick, family responsibility or special leave.
* **Absent days**: days the employee was expected to work but wasn't present.
* **Custom metric**: any system or custom metric, including the custom metrics you create for time and attendance. Select the metrics to link. See [Custom metrics](https://help.allwage.com/modules/time-and-attendance/custom-metrics.md) for what they can measure and why a payslip that uses one can differ from the Employee Overview.

If you link more than one metric, AllWage adds them together.

#### Unit Constraints

After you link a metric or quantity to a template, you can open **Set unit constraints** and enter a **Min**, a **Max**, or both. Leave a box empty if you don't need it. If you link more than one metric, AllWage adds them together first, and the constraints apply to that total for the pay run's period.

* **Max** caps the total. Units above the maximum aren't paid on this template.
* **Min** is subtracted from the total. Only the units above the minimum are paid, and a total at or below the minimum pays 0.
* When both are set, AllWage caps the total at the Max first and then subtracts the Min. So the most the template can pay is Max minus Min.

Example, measured in hours:

| Min     | Max     | Hours measured | Hours paid |
| ------- | ------- | -------------- | ---------- |
| 90      | (empty) | 100            | 10         |
| 90      | (empty) | 85             | 0          |
| (empty) | 90      | 100            | 90         |
| 90      | 130     | 150            | 40         |

Unit constraints only apply to linked metrics, not to custom quantities. They are also different from **Set value limits**, which set a minimum or maximum rand amount for the template.

#### Bucket Hours

AllWage's Time and Attendance module calculates overtime daily by default. That means employees will only earn overtime if they exceed their regular working hours. However, some employers prefer to combine all hours worked and only allocate overtime when a certain threshold of hours is reached. Unit constraints let you do this.

Bucket hours are one of three ways to count overtime over a week or a pay period. For the other two, and what must be agreed before you use any of them, see [Overtime over a week or a pay period](https://help.allwage.com/modules/time-and-attendance/how-hours-are-calculated.md#overtime-over-a-week-or-a-pay-period).

For example, an employer pays their employees fortnightly. They work 5 days a week for 9 hours a day from Monday to Friday. On Saturdays, they are paid at a 1.5 rate, and on Sundays, at a 2 times rate. The regular working hours in a fortnight total to 9 hours per day x 5 days per week x 2 weeks = 90 hours.

To implement bucket hours, you need to configure an earning template for Normal Hours and link the following metrics:

* Normal hours: All regular hours worked between Monday to Friday
* Normal overtime: All overtime hours worked between Monday to Friday
* Public Holiday Total Hours Clocked: If an employee works on a public holiday, those hours must also be accounted for in the 90 total hours for the fortnight period.

After linking all three metrics, you add a unit constraint with a maximum of 90. This will limit the total number of hours for all three metrics to 90.

The next step is to create an earning template for Overtime Hours. Link the same metrics as the Normal Hours template, but now add a unit constraint with a minimum of 90. AllWage subtracts the 90 hours, so only the hours above 90 are paid as overtime. If an employee works 96 hours in the fortnight, the Normal Hours template pays 90 hours and the Overtime Hours template pays 6.

Saturdays and Sundays are seen as irregular working days, and they can be added to their own respective pay run templates.

{% hint style="warning" %}
**Set the threshold for the pay run's period.** The minimum and maximum apply to the hours in one pay run. Use the number of regular hours in a fortnight for a fortnightly pay run, and in a month for a monthly pay run.

**Link every kind of hour you want counted.** **Normal hours** are weekday hours up to the daily budget, and **Normal overtime** is weekday hours above it. Neither includes Saturday, Sunday or public holiday hours, which are separate metrics.

**Leave and public holiday hours count like worked hours.** If you link leave metrics (approved leave hours) or **Public holiday hours** (budget hours on a public holiday, paid but not worked), AllWage adds them to the total in the same way as clocked hours. In a period with a lot of leave or public holidays, employees reach the threshold sooner.
{% endhint %}

#### Overtime on the Employee Overview but none on the payslip

The [Employee Overview](https://help.allwage.com/modules/time-and-attendance/reports/employee-overview.md) report and payroll use the same clocks and the same daily overtime calculation. The report shows the overtime whether or not it is paid. Payroll only pays what the employee's earning templates measure. If the report shows overtime but the payslip doesn't, check:

1. **The employee has an overtime earning.** Payroll only calculates the templates in the employee's pay run earnings. Check that the overtime template is listed for the employee in the [pay run](https://help.allwage.com/modules/payroll/recurring-pay-runs/employee-pay-run-view.md).
2. **The template measures the right hours.** Only the metrics linked to the template count. The report's **Overtime** column is weekday overtime. If the template links **Normal hours** only, weekday overtime isn't counted.
3. **The minimum is reached.** If the template has a **Min** unit constraint, only hours above it are paid. When the total is at or below the minimum, the template pays 0 and the line doesn't appear on the payslip at all.
4. **No days are missing a clock-in or clock-out.** A day with a missing clock counts no hours, in the report and in payroll, which makes a minimum harder to reach. See [Changing when a day ends](https://help.allwage.com/modules/time-and-attendance/reports/employee-overview.md#changing-when-a-day-ends).
5. **The template doesn't read a custom metric.** A template linked to a [custom metric](https://help.allwage.com/modules/time-and-attendance/custom-metrics.md) pays what the metric calculates, for example hours less a break or only some days' overtime. That can differ from the report, because a custom metric never changes the report's daily hours. Check the metrics linked to the template under **Link a metric or quantity**.

To see what each template measured, generate payslips with **Include detailed payroll calculations report (additional page)**. It shows each template's daily running totals after the unit constraints, and marks the days where a Min or Max was applied. See [Detailed Payroll Calculations Report](https://help.allwage.com/modules/payroll/payslip.md#detailed-payroll-calculations-report). The payslip line also shows the quantity paid, for example "12.00 @ R45.00". No screen shows the total before the minimum is subtracted. For that, use the matching metric on the Employee Overview report.

If hours other than overtime differ between the report and the payslip, see [Troubleshooting hours](https://help.allwage.com/modules/time-and-attendance/troubleshooting-hours.md#hours-on-the-payslip-differ-from-the-employee-overview).

{% hint style="info" %}
A template is shared by every employee who has it. When you change a template, the change applies to all of them in pay runs that aren't finalised yet. Finalised pay runs don't change.
{% endhint %}

### Notice pay and other ad-hoc earnings

For an earning whose amount differs every time, such as notice pay, a once-off bonus or a back payment, set up one template with no fixed amount and enter the amount on each employee's pay run.

**Example: notice pay**

2. Name it, for example "Notice Pay", and choose **Earning** as the **Pay run type**.
3. Choose the SARS code, for example **3601** (Income). The SARS code decides the tax treatment, so check it with your accountant if you're unsure.
4. Leave **Link a metric or quantity (Optional)** empty and set the **Rate** to 0. Click **Add**.
5. Add the template to the employee as a once-off template: on the pay run, select the employee, click **Manage pay run templates** and add it under **Link once-off templates** (see [Recurring or Once-off](https://help.allwage.com/modules/payroll/recurring-pay-runs/current-pay-run.md#recurring-or-once-off)).
6. Click the employee's name, click **Edit** next to the template's line, enter the amount as the rate, and click **Create override**.

The line pays that amount in this pay run only. Because the template is once-off, it isn't on the employee's next pay run. To add amounts for several employees at once, use [Import Pay run templates](https://help.allwage.com/modules/payroll/recurring-pay-runs/current-pay-run.md#add-adhoc-templates-to-employees) and choose **Once off**.

### Custom quantity

Use a custom quantity for an arrangement that isn't measured from clocks, such as deductions for food or tokens, or payments per unit of work. On the **Custom Quantity** tab:

1. **What is your unit of measure?**: for example rows, metres or tokens.
2. **How many units should be added?**: the number of units on each pay run.
3. Click **Add**.

Unit constraints don't apply to custom quantities.

### Set the rate

Under **Set the rate**, either type a **Rate** in rand, or click the link icon to open **Link input rates**. It has four options:

| Option                   | The rate is                                                                                                                                         |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pay run templates**    | The total of one or more other templates you choose, on the same employee's pay run                                                                 |
| **All taxable earnings** | The total of all the employee's earnings that are taxable income (their SARS code counts towards PAYE)                                              |
| **Tax codes**            | The total of all the employee's templates reported under the SARS codes you choose                                                                  |
| **System rates**         | A [system rate](https://help.allwage.com/modules/payroll/payrun-templates/system-rates.md), such as your minimum wage, that you manage in one place |

When the rate is linked, a factor field appears: **Add a factor e.g X 1,5 (default 1)**. The rate is the linked value times the factor. For example, a factor of 1.5 on a system rate of R30 gives a rate of R45, and a factor of 0.01 on all taxable earnings gives 1% of them.

#### Linking to other pay run templates

Linking a template to other templates lets one line be calculated from others, for example a union fee of 1% of taxable earnings, an employer contribution equal to an employee deduction, or a fringe benefit equal to an employer contribution.

* AllWage uses the final amounts of the linked templates on the same employee's pay run, after their own value limits. If templates link to each other in a chain, AllWage works out the order for you.
* What you can link to depends on the template's pay run type:
  * an earning can link to earnings;
  * a deduction can link to earnings and deductions;
  * a benefit can link to earnings, deductions and benefits.
* PAYE, UIF and SDL can't be linked.
* AllWage won't save a template that would include itself: a template that links back to itself, directly or through other templates, a template linked to its own SARS code, or an earning set to **All taxable earnings**.
* A linked template can't also use pro-ration, and loans and savings can't be linked.
* If a template you chose under **Pay run templates** isn't on an employee's pay run, it adds nothing for that employee, and the line shows a **Linked missing** badge.
* You can't delete a template while another template links to it by name. Remove the link first.

**Example:** a deduction "Union Contribution" linked to **All taxable earnings** with a factor of 0.01, a minimum of R50 and a maximum of R100 (see [Value limits](#value-limits)):

| Taxable earnings | 1%   | Deducted                             |
| ---------------- | ---- | ------------------------------------ |
| R3,000           | R30  | R50 (raised to the minimum)          |
| R7,500           | R75  | R75                                  |
| R15,000          | R150 | R100 (capped at the maximum)         |
| R0               | R0   | R0 (the minimum doesn't apply to R0) |

### Value limits

Click **Set value limits** to open **Value limits**:

* **Set minimum value**: the lowest amount the template pays or deducts. If the amount works out lower, it is raised to the minimum. An amount of R0 stays R0.
* **Set maximum value**: the highest amount. If the amount works out higher, it is capped. The minimum can't be more than the maximum.
* **Calendar month limit**: the most times the template can apply in one calendar month, for weekly and fortnightly pay runs. AllWage counts the employee's finalised pay runs that end in the same calendar month and in which this template had an amount. Once the limit is reached, the template pays R0 in that month's later pay runs. It doesn't apply to monthly pay runs, and a new period of employment starts the count again.

Value limits are rand amounts. They are different from [unit constraints](#unit-constraints), which limit the quantity. Value limits apply after pro-ration, and the calendar month limit wins over the minimum.

### Pro-ration

**Enable pro-ration** pays a part of a fixed amount when the employee only worked for part of the pay run, for example in their first or last month. It's offered on templates without a linked metric or custom quantity, and not on loans, savings or linked templates.

* **None**: the full amount is paid, even if the employee starts or leaves part-way through the pay run.
* **Active Period**: the amount is multiplied by the calendar days the employee was active in the pay run, divided by the calendar days in the pay run (both counting the first and last day). It doesn't look at working schedules or clock templates. For example, an employee who starts on the 11th of a 30-day pay run is active for 20 days and is paid 20/30, or 67%, of the amount.
* **Working Days**: the amount is multiplied by the required working days the employee was active, divided by the required working days in the pay run, from their clock template. Days marked optional on the clock template don't count; public holidays do. Every employee on the template must have a clock template for the whole pay run, or the pay run can't be finalised: see [Working days pro-ration with missing clock templates](https://help.allwage.com/modules/payroll/recurring-pay-runs/pay-run-health-checks.md#working-days-pro-ration-with-missing-clock-templates).

### How templates show on the pay run

On an employee's payroll lines (columns **Name**, **Quantity**, **Rate** and **Value**), badges under the template name show how the amount was worked out. Hover over a badge to see the detail.

| Badge                       | Meaning                                                                                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Linked**                  | The rate is linked to other templates, all taxable earnings or tax codes. The detail shows the percentage and what it is of, for example "Linked: 1.00% of all taxable earnings". |
| **Linked missing**          | A template this one links to isn't on the employee's pay run, so it added nothing. The detail names it.                                                                           |
| **Pro-rated N%**            | The amount was pro-rated to N%, by active period or by working days.                                                                                                              |
| **Value capped**            | The amount was capped at the maximum value. The detail shows the original amount.                                                                                                 |
| **Value floored**           | The amount was raised to the minimum value. The detail shows the original amount.                                                                                                 |
| **Frequency limit reached** | The calendar month limit was reached, so the template paid R0 on this pay run.                                                                                                    |

For a linked template, the **Rate** column shows the worked-out rate: the factor times the total of what it links to.

### Manage your templates

The **Pay run templates** page lists all your templates:

* Filter by **All**, **Earnings**, **Deductions** or **Benefits**, or use **Search**.
* Each card shows the template's type, its quantity (the linked metrics, or "Fixed"), its rate, and tags such as **Linked**, **Min**, **Max** and its SARS code.
* **System templates** shows or hides templates that AllWage provides. System templates can't be changed.
* Each card has **Duplicate**, **Edit** and **Delete**. **Duplicate** creates a copy named "\[name] Duplicate".

**What you can change later.** After a template is created you can't change its pay run type, deduction type or SARS code. Once a template has been used in a finalised pay run, you also can't add metrics to a template that had none, or remove all of them. Changes to a template apply to every employee who has it, in pay runs that aren't finalised. Finalised pay runs don't change.

**Deleting a template.** Click **Delete** on the card, or tick several templates and click **Delete templates**. The **Remove input templates** window asks you to confirm. If the template is on open pay runs, it lists the employee pay runs it will be removed from, and you must type **PERMANENTLY DELETE** before **Remove** works. A deleted template is removed from open pay runs, employees' recurring templates and pay run defaults, and can't be restored. It is kept in the background for history, so its name can't be reused. You can't delete a system template, a template used in a payment, or a template that another template links to by name.

### System Rates

Refer to this page:

{% content-ref url="/pages/wLI944uhoaqgfutZ2okP" %}
[System Rates](https://help.allwage.com/modules/payroll/payrun-templates/system-rates.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.allwage.com/modules/payroll/payrun-templates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
