• It also occurred to me that the problem statement was a gross oversimplification of a full-blown accounting system.  It is also stated that this is currently being done manually, so we're not talking about a full accounting system.  But the problem, as stated, has a simple solution in T-SQL.

    My guess is they only trust the computer to handle the invoices & payments that do balance to the penny, and humans will still have to manually look at the accounts with discrepancies.

    Hopefully the day will come when they can buy an accounting system, rather than asking you to build it one piece at a time.