January 23, 2011 at 2:17 pm
Hi,
I have been tasked with creating stored procedures to calculate UK payroll (PAYE). It would seem obvious to me that this has been done many times before. Although, after some time with google I haven't found anything.
Therefore, I just wanted to ask if anyone else had seen, or already has something on this. Bit of a longshot, but costs nothing to ask !
Thanks,
Matt
January 23, 2011 at 9:59 pm
Considering many local taxes based on address and the like not to mention constantly changing tax laws, my suggestion would be to not do it in SQL Server. Use something that already knows how to do it and has been tested out the wahzoo. In the U.S., I'd recommend something like "Quick Books". I don't know if that's available in a UK version.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 25, 2011 at 3:04 am
The typical way of doing this is to use SQL Server as the data store, and have a separate layer of business code to do the calculations.
If the application is intended for a small organisation, then I recommend you check out the HMRC online PAYE calculator, as this could be an alternative to your development plans. Also the HMRC site has (somewhere in its frustratingly hard to find pages) some very useful information on what you need to consider when calculating PAYE.
You need to look at your target customers when designing your process. Many smaller organisations only need to deal with gross pay, PAYE codes, and tax and NI deduction which can be quite simple to code. Larger organisations will have many additional deductions and additions: pension, SMP, OMP, sick pay, student loans, season ticket loans, overtime, shift pay, bonuses, salary changes, etc, etc, etc and these need a properly planned project to cover the design, coding and testing.
Any process you set up needs to provide the information needed for end of tax year processing, so you need to consider the data needs for the P60, P9, P9D, P30, P11 and P11D forms (to name but a few).
Finally, any system you do set up must be able to provide enough information to satisfy an HMRC inspector that you are including all taxable pay elements and deducting the right amount of tax and NI. If your system is opaque you risk being fined even if the calculations are right. For this reason many systems provide a report that is similar in style to the P8 form used for manual PAYE calculations.
Enjoy!
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
January 25, 2011 at 7:54 am
All the above plus it needs to be readily amendable as everything changes at year end and often calculation methods change too but you have to be able to retain the old values and show old ways of calculating too for audit.
Best advice - don't do it unless you really have to and can support it for many years to come. Use HMRC or buy something with good support as pay is the one area that really needs annual support for the updates.
January 25, 2011 at 9:25 am
Hi,
Thank you to everyone for your input. The application already exists as a legacy payroll system. The problem is that the old code is cusoring through large tables collecting gross pay data. After reading some comments, we've decided not to re-invent the wheel and I'm now tasked just to SQL'ise the summing of the gross data.
Thanks,
Matt
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply