An employer called me after looking at the contribution list for the month. The payroll list for the same month had eight people on it, the contribution list had ten. The extra two had both stopped working there. They were gone from the payroll calculation and still in the contribution calculation. Every amount was exactly what the calculation said it should be. What was wrong was that the names were there at all.
Let me put the shape of the scheme down first. Contributions to SSS, PhilHealth and Pag-IBIG are monthly, and the employer and the employee each carry a share. The employee share is withheld from the salary, the employer share is added on top, and the whole thing is remitted together. When employment ends, that person's contribution stops. But stopping it is something the employer does: until somebody notices and stops it, nothing in the scheme stops it on its own.
Our software held "employment has ended" as a flag. There is one switch on a person's screen for whether they are still employed, and turning it off removes them from the payroll list. It removes them from the contribution list too. On screen, that is the end of it. The flag has no date. Nothing anywhere records when it was turned off, or when the employment is supposed to have ended.
The month's contributions are calculated once, together, at the end of the month. The calculation looks at the flag as it stands at the moment it runs. So a person whose employment ended in the middle of a month, and whose flag came off at the start of the following month, stays in the contributions for the month they left. Worse, they stay in the month after that as well. Until the flag comes off, their share goes out every month.
I recounted across 4 companies. About forty people's salaries are calculated in our software. Over 5 months, nine people's employment ended, and six of them stayed on the contribution list after the month they left. That came to 14 months of contributions in total. The employer share runs between 1,400 and 1,900 pesos per person per month, and added up it was 23,160 pesos.
The three who did not stay were the ones whose flag came off before the end-of-month calculation ran. Which means being right depended on how fast the paperwork moved. And since the employee share cannot be withheld from a salary that is no longer being paid, everything that went out was carried by the employer alone. The payroll list and the contribution list were separate screens, and we had built no place at all where you could see whether the headcounts matched.
The mistake in the other direction came from the same place. We prorated the contribution for someone who joined mid-month by days. Salaries are prorated, so we applied the same thinking straight across. The scheme uses a monthly amount set by bracket, not a prorated one. Five people joined mid-month, 7 months of contributions went out prorated, and the gap against the correct amount was 4,310 pesos in total.
The fix came in 3 parts. The first was to drop the flag and hold the period of employment as dates: the day it started and the day it ended. The contribution calculation asks, by date, whether the employment was still running on the last day of that month. When it was entered does not matter. I can enter last month today and the answer is the same.
The second was to stop prorating contributions. The bracket amount for the month goes out as it is. Proration is for salaries only. To a person it looks reasonable that a month only half worked should cost half as much. The scheme is not built that way, so what we took off the screen was the intuition.
The third was a screen that reconciles headcounts. Month by month, the number of people in payroll sits next to the number of people in contributions, and the months that do not match come to the top. Every past month shows up too. I wanted us to see it before an employer has to call. Right now the number of months listed as not matching is 0.
What I had confused was a state with an event. A flag can only say what is true now. The moment you need to recount a past month, something that can only speak about now is no longer usable. The end of employment is an event, and an event has a date. Hold the period as dates, and the last day of any month gets the same answer. The amounts in a scheme can change, the schemes themselves differ from one country to the next, and this shape still holds. Forgetting to stop is heavy because in every scheme, stopping is the employer's job.
I estimated 2 days and it took 8. Holding the period as dates took 3 hours. The rest was opening all 5 months for all 4 companies and going through the months that moved together with each employer. The 23,160 pesos that went out does not come back because we fixed our software. How that gets handled is something each company is discussing with their own accountant. What we could do was make it printable, one line at a time: whose share, in which month, and by how much.
One thing I should say. I am not a tax practitioner. This is a record of work on our own software, and it is not enough as an explanation of the contribution scheme or of the filings. Confirm any decision about when to stop, or about what to remit, with a professional.