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. But there are instances when an employee has certain changes done or they have been done by various agencies as per the category which they belong to. A record of these changes needs to be made and updated by the employers in the accounting software as well, otherwise it leads to errors like error code 7866.

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 national insurance category during a 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 version 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. The National Insurance category has been changed by the employee during a tax year.
  2. The value of category which should have been zero like X, C or W has instead 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 has been done based on an incorrect category. 

How you Can Fix Sage 50 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 which 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, absence record are deleted but basic details of your employees such as address and contact information remains 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 roll back wizard:

  1. If you have made changes to the pay schemes in the previous version of Sage 50 and have not completed a roll back, 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. The number of accrued days is not cleared if the roll back is done after you enter the sickness leave for an employee. These should be manually deleted from an employee’s record.
  4. You have to roll back to a previous period, if you have already entered absence and/or leaves of your employees. These absences are not cleared from the Absence diary unless you have cleared the cumulative values.
  5. If you have processed a paid leave for your employees then you have to make sure that period that you roll back to is the one where the holiday pay has been advanced.
  6. For clearing the P45 figures that has been already entered, the oldest update needs to be selected and all cumulative values need to be cleared when prompted.
  7. Only when you first roll back everything which has been processed, that you can roll back to the pay periods with the previous tax records for a particular employee. After that, you have to process their payments again till date.
  8. Your tax returns in the end of a financial year may get affected when you roll back to a period to an earlier tax year. 

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. Tick against the period(s) for which rollback has to be initiated and click on the Continue button.
  5. Confirm the rollback by entering your user ID and password. Your employee’s payroll data will now be rolled back till the pay interval you have chosen.


Sage error 7866 should not be viewed as a bug, instead it acts more as an alert for you, the user of Sage accounting software, to make necessary changes in the employee details. 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 employees 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.

Recent Posts