Recurnix docs

Docs › Releases › 1.09 › Release notes

Recurnix 1.09 release notes

Released 2026-07-30. Recurnix 2.11 is newer.

Delete a payment and the invoice went on saying it was paid.

An invoice's settlement state is not so much stored as derived: what is owed is the total, minus what has been paid, minus any account credit applied. Only one place in the entire codebase ever did that derivation, and it was the code that records a payment. Everything else that could change what had been paid — deleting a transaction in the admin, editing its amount, moving it to a different invoice — changed the money and left the conclusion untouched. The invoice kept its zero balance and its "paid" stamp with nothing paid against it, and because dunning only chases unpaid and overdue invoices, nothing chased it. Ever.

The obvious fix is to recompute when a transaction is deleted, and the interesting thing about this bug is that the obvious fix would not have worked. The recompute could only ever go one way: it knew how to mark an invoice paid and had no path back. Calling it by hand after the deletion produced an invoice reading "paid" with the full amount outstanding — a document contradicting itself in two adjacent fields. So the rule now derives both directions, and every write to a transaction re-derives it: created, updated, deleted, and a payment moved between invoices re-settles both ends rather than one.

Some statuses are decisions rather than arithmetic, and those are left alone. A draft has not been issued. A cancelled invoice was withdrawn. And a fully refunded one has a positive balance by construction — reading its status off the money would walk it straight back to "unpaid" and into the dunning ladder, which is exactly the kind of well-meaning cleverness that turns a fix into the next bug. "Collections" is treated more carefully still: it is kept while an invoice is genuinely owed, because that is where the ladder put it, but once the invoice settles that episode is over, and money removed afterwards reopens it as unpaid or overdue rather than reviving a state that had already been resolved.

Underneath all of it was a familiar shape. The settle arithmetic had been written out three separate times — on the invoice model, in the refund service and in the credit service — and not one of the three could reopen an invoice. There is one implementation now, and the status rule inside it is a pure function with no database anywhere near it, so it can be tested exhaustively and cannot quietly grow a fourth copy.

Two smaller things. Transactions are now written to the audit log: a payment is a financial record, and deleting one used to leave no trace at all — no row, no log line, nothing to say it had existed or who removed it. Deleting is still allowed, because an operator who recorded a payment against the wrong invoice needs a way back, but it is no longer silent. And the list of transaction types on the model named two of the five the services actually write, which is the sort of stale contract somebody eventually trusts.

Thirty-six passing tests now, up from twenty.

Upgrading needs nothing at all: no schema change, no stored figure rewritten. Do expect the behaviour change to be visible, though. If you have ever deleted or reduced a payment, the invoice concerned will reopen and start appearing in dunning — as it should have been doing all along.


Last modified: 16 November 2026 · This page documents Recurnix, self-hosted billing and automation. Ask a question.