CluPilotCloud/app/Console/Commands
nexxo 2277dfe4cb
tests / pest (push) Failing after 8m24s Details
tests / assets (push) Successful in 26s Details
tests / release (push) Has been skipped Details
Ask the EU register whether a VAT number is real
vat_id_verified_at was declared on the customer and read by TaxTreatment, and
set by no code anywhere. hasVerifiedVatId() therefore never returned true, so
reverse charge could not trigger for anybody - and every EU business customer was
invoiced Austrian VAT they cannot reclaim in their own country, which is not a
pass-through for them but a real cost until the invoice is corrected.

The check has THREE outcomes, and the third is why VatIdCheck exists. VIES is a
gateway onto twenty-seven national registers and any of them is regularly down.
Reading "I could not ask" as "not registered" would clear a verification that has
stood for months, move that customer onto the domestic rate, and change what
their next invoice says - because a register was asleep. Reading it as
"registered" would put reverse charge on an unchecked number, which is our
liability. So on UNAVAILABLE nothing at all is written.

Asked at the moment the number is entered, because that is when somebody is
looking at the field and can fix a typo. The save has already happened by then
and the check cannot undo it: a register that is down must not cost a customer
their address change.

Shape and membership are refused before a request is spent, and the fake refuses
on the same rule as the real verifier. A fake that answers where VIES would never
have been asked is not a simplification but a different product, and free text
normalises into a well-formed number more easily than it looks - "not a number"
becomes NOTANUMBER, which the shape rule alone reads as a Norwegian one.

clupilot:verify-vat-ids re-asks about the numbers reverse charge rests on, since
a registration can be withdrawn. Deliberately not scheduled: it queries a public
service with a concurrency limit on behalf of somebody else's tax position, and
the cadence is the owner's to set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 22:42:29 +02:00
..
ApplyDuePlanChanges.php Book a downgrade for a date that cannot move, and sell a module once 2026-07-29 17:51:37 +02:00
ApplyStorageQuotas.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
ArchiveUnexportedInvoices.php Let the export have as many destinations as somebody wants 2026-07-29 02:43:15 +02:00
AutoUpdate.php Update on a schedule if the owner wants one, and say where incidents go 2026-07-29 15:01:54 +02:00
CheckDnsZone.php Put customer instances on their own domain, and say which domains are ours 2026-07-29 16:03:13 +02:00
CheckPlanCatalogue.php feat(billing): the plan catalogue becomes three tables, and config stops selling 2026-07-26 12:05:56 +02:00
ConsoleAccess.php Make the private hostnames look like nothing is there, and close the way past the proxy 2026-07-27 11:26:48 +02:00
CreateAdmin.php Check users directly for the reverse operator-identity collision, not just customers 2026-07-28 15:36:29 +02:00
EndCancelledAddons.php Bill a booked module every month, and put it on the invoice 2026-07-29 20:22:02 +02:00
EndDueServices.php Restart a machine, enforce the quota that was sold, end a route that ended 2026-07-29 18:28:28 +02:00
FetchInboundMail.php Read the support mailbox into the console 2026-07-29 21:41:29 +02:00
PruneExportFolders.php Let a destination say how it is laid out and how long anything stays 2026-07-29 03:08:27 +02:00
PruneHostDns.php Move host DNS names off the public zone into vpn-dns's internal hostsdir 2026-07-28 23:44:31 +02:00
RepriceStripeSubscriptions.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00
SampleServiceStatus.php Rebuild the status page as a status page 2026-07-29 12:45:18 +02:00
SyncStripeCatalogue.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00
SyncStripeSubscriptions.php Bill a booked module every month, and put it on the invoice 2026-07-29 20:22:02 +02:00
VerifyCustomDomains.php Serve the custom domain, not just announce it 2026-07-29 16:44:52 +02:00
VerifyVatIds.php Ask the EU register whether a VAT number is real 2026-07-29 22:42:29 +02:00