I recently received a bug report: a reprinted invoice total didn’t match the original hard copy. Getting your financials wrong never feels good…
Fortunately, after restoring backups in a test database for far too long, I found the missing line item.
Long story short, one of the administrators deleted a line item the was flagged as already invoiced, ie are you really really sure you want to delete this?
Here’s the problem. When this was originally built about 6 years ago, I strongly recommended not allowing it at all. The concern was that there might be a time where we must be able to delete something that we now think deleted. So I said fine, and it was built.
If I were doing this today, I would have recommended a different approach:
One of the differences between a junior and a senior engineer is that a junior will just do as told. A senior engineer has seen that go badly enough times to know to push back.