Table of Contents

Class PensionContributionCalculator

Namespace
Payetools.Pensions
Assembly
Payetools.Pensions.dll

Abstract class that represents different types of pension contribution calculators.

public abstract class PensionContributionCalculator : IPensionContributionCalculator
Inheritance
PensionContributionCalculator
Implements
Derived
Inherited Members

Constructors

PensionContributionCalculator(PensionTaxTreatment, decimal?)

Initialises a new instance of PensionContributionCalculator with the supplied tax treatment and optional basic rate of tax (needed for relief at source pensions only).

public PensionContributionCalculator(PensionTaxTreatment taxTreatment, decimal? basicRateOfTax = null)

Parameters

taxTreatment PensionTaxTreatment

Tax treatment i.e., relief at source vs net pay arrangement.

basicRateOfTax decimal?

Basic rate of tax to use for relief at source pensions. Optional.

Exceptions

ArgumentException

Thrown if no basic rate of tax is supplied for a relief at source pension.

Properties

EarningsBasis

Gets the earnings basis of this pension contribution calculator i.e., Qualifying Earnings vs Pensionable Pay Set X.

public abstract PensionsEarningsBasis EarningsBasis { get; }

Property Value

PensionsEarningsBasis

TaxReliefFactor

Gets the tax relief factor to apply for relief at source pensions. For example, if the basic rate of tax is 20%, then the tax relief factor is 0.8.

protected decimal TaxReliefFactor { get; }

Property Value

decimal

Methods

Calculate(decimal, decimal, bool, decimal, bool, decimal?, decimal?, out IPensionContributionCalculationResult)

Calculates the appropriate employee and employer pension contributions based on the supplied employer and employee rates. Also supports the ability to supply a fixed employee contribution as an alternative to an employee percentage rate.

public virtual void Calculate(decimal pensionableSalary, decimal employerContribution, bool employerContributionIsFixedAmount, decimal employeeContribution, bool employeeContributionIsFixedAmount, decimal? avcForPeriod, decimal? salaryForMaternityPurposes, out IPensionContributionCalculationResult result)

Parameters

pensionableSalary decimal

Pensionable salary to be used for calculation.

employerContribution decimal

Employer contribution level, either expressed in percentage points (i.e., 5% = 5.0m) or as a fixed amount (i.e. £500.00), as indicated by employerContributionIsFixedAmount.

employerContributionIsFixedAmount bool

True if the employerContribution parameter should be treated as a fixed amount; false if it should be treated as a percentage.

employeeContribution decimal

Employee contribution level, either expressed in percentage points (i.e., 5% = 5.0m) or as a fixed amount (i.e. £500.00), as indicated by the following parameter.

employeeContributionIsFixedAmount bool

True if the employeeContribution parameter should be treated as a fixed amount; false if it should be treated as a percentage.

avcForPeriod decimal?

Any Additional Voluntary Contribution (AVC) on the part of the employee.

salaryForMaternityPurposes decimal?

Used to override the employer contribution when an individual is on maternity leave and should be paid employer contributions based on their contracted salary rather than their pensionable pay.

result IPensionContributionCalculationResult

An instance of a IPensionContributionCalculationResult implementation that contains the results of the calculation.

CalculateContributions(decimal, decimal, decimal, bool, decimal?)

Abstract method signature for calculating pension contributions based on the supplied inputs.

protected abstract (decimal earningsForPensionCalculation, decimal employerContribution, decimal employeeContribution) CalculateContributions(decimal pensionableSalary, decimal employerContributionPercentage, decimal employeeContribution, bool employeeContributionIsFixedAmount, decimal? salaryForMaternityPurposes = null)

Parameters

pensionableSalary decimal

Pensionable salary to be used for calculation.

employerContributionPercentage decimal

Employer contribution level, expressed in percentage points (i.e., 3% = 3.0m).

employeeContribution decimal

Employee contribution level, either expressed in percentage points (i.e., 5% = 5.0m) or as a fixed amount (i.e. £500.00), as indicated by the following parameter.

employeeContributionIsFixedAmount bool

True if the previous parameter should be treated as a fixed amount; false if it should be treated as a percentage.

salaryForMaternityPurposes decimal?

Used to override the employer contribution when an individual is on maternity leave and should be paid employer contributions based on their contracted salary rather than their pensionable pay.

Returns

(decimal earningsForPensionCalculation, decimal employerContribution, decimal employeeContribution)

A tuple containing the earnings used for the calculation (employee only if maternity override applies), and the employer and employee contribution levels.

CalculateUnderSalaryExchange(decimal, decimal, bool, decimal, decimal, decimal, bool, decimal?, decimal?, out IPensionContributionCalculationResult)

Calculates the appropriate employee and employer pension contributions based on the supplied employer and employee rates, but under salary exchange arrangements. Here the output employee contribution will always be zero. Also supports the ability to supply a fixed employee contribution as an alternative to an employee percentage rate.

public void CalculateUnderSalaryExchange(decimal pensionableSalary, decimal employerContribution, bool employerContributionIsFixedAmount, decimal employerNiSavings, decimal employerNiSavingsReinvestmentPercentage, decimal employeeSalaryExchanged, bool employeeSalaryExchangedIsFixedAmount, decimal? avcForPeriod, decimal? salaryForMaternityPurposes, out IPensionContributionCalculationResult result)

Parameters

pensionableSalary decimal

Pensionable salary to be used for calculation.

employerContribution decimal

Employer contribution level, either expressed in percentage points (i.e., 5% = 5.0m) or as a fixed amount (i.e. £500.00), as indicated by employerContributionIsFixedAmount.

employerContributionIsFixedAmount bool

True if the employerContribution parameter should be treated as a fixed amount; false if it should be treated as a percentage.

employerNiSavings decimal

Savings in employer's NI due to the salary exchanged.

employerNiSavingsReinvestmentPercentage decimal

Percentage of employer NI savings to be reinvested in the employee's pension, expressed in percentage points (i.e., 100% = 100.0m).

employeeSalaryExchanged decimal

The level of employee's salary forgone as set out in the salary exchange arrangements. Expressed either as a percentage in percentage points (e.g., 5% = 5.0m), or as a fixed amount, as indicated by the following parameter. NB If fixed amount is given, it relates to the pay period (as opposed to annually).

employeeSalaryExchangedIsFixedAmount bool

True if the previous parameter should be treated as a fixed amount; false if it should be treated as a percentage.

avcForPeriod decimal?

Any Additional Voluntary Contribution (AVC) on the part of the employee.

salaryForMaternityPurposes decimal?

Used to override the employer contribution when an individual is on maternity leave and should be paid employer contributions based on their contracted salary rather than their pensionable pay.

result IPensionContributionCalculationResult

An instance of a IPensionContributionCalculationResult implementation that contains the results of the calculation.

GetEarningsForPensionCalculation(decimal)

Gets the earnings to be used for the pensionable salary calculation. For Pensionable Pay Set X, this is the same as the earnings; for QualifyingEarnings, this is the banded amount.

protected abstract decimal GetEarningsForPensionCalculation(decimal pensionableSalary)

Parameters

pensionableSalary decimal

Original pensionable salary.

Returns

decimal

Earnings to be used for the pensionable salary calculation.

GetSalaryExchangedAmount(decimal, decimal, bool)

Gets the absolute amount of employee salary exchanged, either as a result of a fixed amount being passed in, or as a percentage of pensionable salary (banded in the case of Qualifying Earnings.

public decimal GetSalaryExchangedAmount(decimal pensionableSalary, decimal employeeSalaryExchanged, bool employeeSalaryExchangedIsFixedAmount)

Parameters

pensionableSalary decimal

Pensionable salary to be used for calculation.

employeeSalaryExchanged decimal

The level of employee's salary forgone as set out in the salary exchange arrangements. Expressed either as a percentage in percentage points (e.g., 5% = 5.0m), or as a fixed amount, as indicated by the following parameter. NB If fixed amount is given, it relates to the pay period (as opposed to annually).

employeeSalaryExchangedIsFixedAmount bool

True if the previous parameter should be treated as a fixed amount; false if it should be treated as a percentage.

Returns

decimal

Value of employee salary being exchanged.