How to Fix Sage Error 7866

Sage Error 7866

It is quite obvious that businesses use Sage 50 for managing various aspects concerned with their employees including their payrolls, leaves, reimbursements, etc. There are instances when companies want to make changes to their employees after hiring them. It is important to keep a record of these changes in the accounting software or errors like error code 7866 can cause problems.

In this blog, we will discuss the reason you have been facing this error and how you can resolve them using methods that are simple and easy to implement.  

Read also: How to Fix Sage Installation Error

What is Sage Error 7866?

Sage error code 7866 is caused when an employee changes the tax/financial year. An employee may belong to a particular category depending on his work status as there are different categories based on age, marital status, etc. Thus, when a complete payroll or a full payment submission is being done. Then error code 7866 prompts that this change has not been made in Sage 50 causing a mismatch by displaying the message:

‘Error 7866 – The amount in [EMPLOYEESCONTRIBUTIONSONALLEARNINGSYEARTODATE] must be 0.00 if the [NILETTER] is ‘X’, ‘C’, or ‘W’.’

This error has been faced mostly by users with Sage payroll versions 19,20,21,22 and Sage Instant Payroll.

What is Causing Sage Error 7866 While Working on Sage 50?

The reasons for Sage accounting application to display error 7866 are more or less related to modifications being made to the National insurance category. These are –

  1. Employees can change the National Insurance category during a tax year.
  2. The value of the category which should have been zero like X, C, or W has instead been assigned a value greater or less than zero.
  3. The refund of National Insurance has been made under the wrong category.
  4. Manual NIC and deduction of the Employee’s NIC have been done based on an incorrect category. 

How you Can Fix Sage 50 Payroll Error 7866?

If you encounter error 7866 while working on accounting applications of Sage. Then you can use the rollback feature to revert back the changes that were made earlier and enter the correct data related to the employee(s).

What is a Rollback?

Rollback is a feature that helps you in going back to a specific pay period of your employees and deletes any processing done with respect to payroll done during that pay period. Using rollback you can delete any processing done in payments. Using payroll you can remove any errors that had been during the generation of payroll like pay histories, cumulative values, and absence records are deleted but basic details of your employees such as address and contact information remain unaffected. Also, the corresponding Employer Payment Record EPR (P32 replacement values are adjusted accordingly when an employee’s pay has been rolled back.

Important things you must know, before using the rollback wizard:

  1. If you have made changes to the payment schemes in the previous version of Sage 50 and have not completed a rollback, then you have to verify if your pension schemes are correct.
  2. The pension AVC amount of an employee that has been processed earlier will not go back to the old amount if you have rolled back to a previous period.
  3. We need to manually delete days from sick leave if the rollback is done after a specific date.
  4. You have to roll back to a previous period if you have already entered the absence and/or leaves of your employees. To clear your absence, you must clear all the partial values for the day.
  5. If you have processed a paid leave for your employees then you have to make sure that the period that you roll back to is the one where the holiday pay has been advanced.
  6. To clear previous P45 figures input data and press the backspace key to clear previous cumulative values input.
  7. When you first go to your payroll settings, find the employee accounts that you need to change. Change those records, and then you can go back one more time to the last tax period for another account. After that, you have to process their payments again to date.
  8. A change to the tax rollback period for a financial year can affect your tax returns when you file them at the end of an earlier year.

You May Also Read: Sage 50 Payroll Tax Update

Starting the rollback process

To start a rollback process for a current employee, follow the steps below-

  1. Click on Others and choose Rollback Employees from the drop-down menu.
  2. Now, click on Rollback Active Employee. This will roll back the pay periods.
  3. Then, click on the Rollback link for the employee for which details have to roll back.
  4. Push the buttons on the rollback menu to choose the period you want to roll back and click ‘Continue’.
  5. Confirm the rollback by entering your user ID and password. You can now roll back your employee’s payroll data until the pay interval that you choose.


Sage payroll error 7866 can sometimes be an indicator of serious problems with your employee records. It helps in ensuring that you and your employee have the right data about their National Insurance liability so that neither you nor your employees have to face the difficulties related to correcting the data later. 

Now that we have provided you the necessary information for a very important aspect of your employee’s payroll which is insurance, neither your employees will face any problem if they have to claim it if required, and neither you have any inconsistencies in your records. 


What is the meaning of a Full Payment Submission (FPS)?

It is a document which the employers have to submit to Her Majesty’s Revenue and Customs when they pay their employees. It contains starter and leaver information, employee information, information related to payments and deductions and TX, NI and student loan contributions.

What is a National Insurance Category?

It is a letter used by the employers to calculate the National Insurance liability for the employees and their company.

Are all details rolled back using the Rollback Employee wizard?

No, some details like pay elements and rates, which may have changed to which you roll back, but they are not reverted by the Rollback Employee wizard. Therefore you should verify your employee details before processing the payroll.