Docs › Releases › 1.08 › Changelog
Recurnix 1.08 changelog
Every change in 1.08, by kind. For what it means and whether to update, read the release notes.
Fixed
- A recurring service recorded a price but not what currency it was in, and
serviceswas the only money-bearing table in the schema like that — clients, orders, invoices, transactions, credit notes, quotes, product pricing, config options and client groups all carry acurrency_id. The storefront prices a cart fromproduct_pricingfor the client's currency, the order records which one that was, and the service — the thing that will be charged every month for years — did not. - So a renewal was raised in whatever currency the client was set to at the time.
RenewalService::issue()passed the bare number toInvoiceService::create(), which falls back to$client->currency_idwhen it is not told otherwise. Measured on the sandbox: a service billed 10.00 USD; the client's currency was then changed on the ordinary client form — one dropdown, no warning — and the same service, untouched, billed 10.00 EUR. Nothing anywhere recorded which one it had been sold in. - Services now carry a currency, and the migration backfills it. A nullable column everybody leaves null just moves the bug somewhere quieter, so existing rows are given the currency they were actually sold in, in descending order of evidence: the order's, then the client's, then the install default.
- The renewal is raised in the SERVICE's currency now, not the client's. Changing a client's currency is a preference, not a repricing decision, and it no longer touches anything they already have.
- Consolidated invoicing grouped by client alone, which was correct only while services had no currency to differ on. One invoice carries one currency — its total, its tax and its amount due are single numbers — so renewals are now grouped by client and currency, and
RenewalService::batchCurrency()refuses a mixed batch by name rather than adding pounds to yen and calling the result a total. - A one-time product could be billed monthly for ever. The storefront offers a
onetimecycle;advanceCycle()has no case for it and falls through to MONTHLY. The only thing standing between that and a monthly invoice was the service happening to carry a zero recurring amount. One-time services are now excluded from the renewal window outright.
Changed
- Admin > Services form and table, rebuilt from the
--generatescaffold they had been left as. The scaffold was not merely plain, it was wrong in ways that cost money:statusandbilling_cyclewere free-text boxes over what are really enumerations, and because an unrecognised cycle falls back to monthly, typingyearlyinstead ofannualbilled an annual price twelve times a year, silently. Both are now Selects over the values the engine actually understands. The client was picked by raw numeric id and is now picked by name and email; the amounts said nothing about their currency and now sit beside it; the generatedulidis no longer an editable required field. The table shows the client and the currency instead of two numeric ids.
Housekeeping
- 11 of 634 tracked files carried CRLF line endings in the working tree, written that way by the cPanel File Manager API, which rewrites every LF on save.
git statushad never reported it, and that is not a bug in git:.gitattributesalready declares* text=auto eol=lf, so git normalises before comparing and the committed blobs were LF the whole time. It is not cosmetic even so — every edit in this project is authored against the working tree, and one of these files cost this release an aborted edit when a byte-exact anchor stopped matching what was actually on disk. All eleven are normalised, and the end-of-batch sweep now checks for it. - Seven of them were also missing a trailing newline at HEAD — that part really had been committed — and several were mode 755 for no reason. Both corrected.
Added
tests/Unit/RenewalCurrencyTest.php— the batch-currency rule across uniform, mixed and empty batches, plus a regression guard that the nightly run still groups by currency and still tells the invoice which one to use. No database, no booted application. The committed suite is now 20 passing tests (33 assertions), up from 11.
Upgrading
Run php artisan migrate. The new migration adds one nullable column and backfills it; nothing is dropped and no issued document changes. Note the deliberate behaviour change: if you have ever changed a client's currency, the services they already have will now renew in the currency they were sold in rather than the client's current one — which is the point. To move a service to a different currency, edit the service and set both the currency and the amounts; that change is recorded in the audit log, as a repricing should be.