CluPilotCloud/app
nexxo 79564947d4
tests / pest (push) Failing after 7m24s Details
tests / assets (push) Successful in 20s Details
tests / release (push) Has been skipped Details
Actually issue the invoice when the money arrives
Everything was built — numbering, the frozen snapshot, the PDF, the mail, the
archive and its retention — and none of it was connected to anything. IssueInvoice
was called from nowhere but its own tests. So on a real server no invoice had
ever been created, the handover directory was empty, and rsync was correctly
copying nothing. Reported as "nothing gets copied", which it was.

One mail, not two. The invoice is issued the moment the payment lands, so an
order confirmation and an invoice mail would otherwise go out in the same second
for the same event — a defect rather than a preference. The invoice mail carries
the document and says everything the confirmation said, so it replaces it
whenever there is an invoice; the confirmation stays for when there cannot be
one.

Issuing is allowed to fail without taking the purchase with it. IssueInvoice
refuses while the company details are incomplete, and that refusal is correct —
an invoice without a registered name or a VAT number is not a valid invoice, and
issuing one consumes a number that can never be handed out again. The order
still stands, the machine is still built, and the invoice can be issued later.
Nothing here may throw at the webhook either: Stripe retries anything that is
not a 2xx, and a retry would re-enter provisioning and build a second machine
over a missing VAT number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 03:25:56 +02:00
..
Actions Actually issue the invoice when the money arrives 2026-07-29 03:25:56 +02:00
Console Let a destination say how it is laid out and how long anything stays 2026-07-29 03:08:27 +02:00
Exceptions Refuse a portal login for an address that already belongs to an operator 2026-07-28 14:42:16 +02:00
Http Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
Jobs Let the export have as many destinations as somebody wants 2026-07-29 02:43:15 +02:00
Listeners Recognise the devices an account signs in from, and warn about a new one 2026-07-28 23:28:34 +02:00
Livewire Let a destination say how it is laid out and how long anything stays 2026-07-29 03:08:27 +02:00
Mail Send the invoice with the invoice attached 2026-07-29 02:13:41 +02:00
Models Let a destination say how it is laid out and how long anything stays 2026-07-29 03:08:27 +02:00
Notifications Add the SSH identity to the vault, and give deployment config a console page 2026-07-29 00:52:44 +02:00
Policies Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
Providers Move host DNS names off the public zone into vpn-dns's internal hostsdir 2026-07-28 23:44:31 +02:00
Provisioning Add the SSH identity to the vault, and give deployment config a console page 2026-07-29 00:52:44 +02:00
Services Let a destination say how it is laid out and how long anything stays 2026-07-29 03:08:27 +02:00
Support List issued invoices in the console, with no way to change one 2026-07-29 02:21:15 +02:00