Recurnix docs

Docs › Releases › 1.04 › Changelog

Recurnix 1.04 changelog

Every change in 1.04, by kind. For what it means and whether to update, read the release notes.

Fixed

  • An invoice-level discount was subtracted wholly from the TAXABLE base, so any document mixing taxable and non-taxable lines under-declared tax. 100.00 taxable + 100.00 exempt, discount 50.00 at 20%: the tax came out 10.00 and the total 160.00 where they should be 15.00 and 165.00. The merchant under-collects and owes the difference out of their own pocket.
  • The max(0, ...) around it hid the damage. With 30.00 taxable against 170.00 exempt and a 50.00 discount the taxable base clamped to zero and the tax vanished outright - 0.00 where 4.50 was due. It reads like a safety clamp; it was the mechanism that silently zeroed legitimate tax.
  • The discount is now apportioned in the ratio the taxable lines bear to the whole document. The client is still credited the full discount - only the tax base moves. When every line is taxable the share IS the whole discount, so an ordinary invoice is arithmetically unchanged, to the cent.
  • The identical line existed in QuoteService, and that matters more than a duplicate usually would: a quote's total is the figure the client ACCEPTED, and conversion deliberately reproduces agreed figures, so fixing only the invoice side would have made an accepted quote disagree with its own invoice. Both are corrected together, and the test asserts the two files carry the same expression.
  • An explicit discount larger than the subtotal produced a NEGATIVE total. The invariant was already written in a comment one line up - "a discount may zero an invoice, never invert it" - and was only enforced on the client-group path. QuoteService already clamped; now both do.

Notes

  • Under tax-inclusive pricing the total does not move at all; only the declared tax portion changes, which is exactly the point.
  • Nothing is retro-corrected: issued documents are frozen by design. No invoice on this install was affected - none mixing taxability carried a discount.
  • Verified with 37 assertions against the real engine, including a quote and an invoice built from identical inputs and asserted equal.

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