CluPilotCloud/app/Services/Billing
nexxo 4de44e7ab0 Recognise the price Stripe already has
An abandoned run leaves an orphan: Stripe made the Price, our insert never
happened, and the table that decides everything afterwards does not know it
exists. The key covers a day; after that the next run makes a second live Price
for the same money.

What may be taken over is narrow. Same amount, currency and interval — a Price
at another figure would move money, and nothing here may: a running contract
keeps the Price it was sold on, and a booking stays frozen at what it cost that
day. Plus proof in the metadata, because an unexplained active Price at the
right money is what somebody clicking through Stripe's dashboard leaves behind,
and adopting that is worse than minting a second one.

Several orphans: the oldest is adopted — likeliest to be the one a lost row was
billing on — and the rest are archived, which stops them being sold and moves
nobody.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 11:02:49 +02:00
..
AddonCatalogue.php Ask whether they are a consumer, and let one change their mind 2026-07-29 21:06:06 +02:00
AddonPrices.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
AdoptStripePrice.php Recognise the price Stripe already has 2026-07-30 11:02:49 +02:00
CustomDomainAccess.php Serve the custom domain, not just announce it 2026-07-29 16:44:52 +02:00
DowngradeCheck.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
InvoiceArchive.php Leave the archive readable by whoever collects from it 2026-07-29 03:48:03 +02:00
InvoiceDocument.php Say the same thing to the customer, the register and the bank 2026-07-30 01:30:24 +02:00
InvoiceMath.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00
InvoiceNumbers.php Lay the foundation for self-issued invoices: series, numbers, frozen documents 2026-07-29 00:57:06 +02:00
InvoiceRenderer.php Say the same thing to the customer, the register and the bank 2026-07-30 01:30:24 +02:00
IssueInvoice.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
PlanCatalogue.php Paketversionen: Verkauf wieder aufnehmen und saubere Übergabe 2026-07-29 14:58:11 +02:00
PlanChange.php Book a downgrade for a date that cannot move, and sell a module once 2026-07-29 17:51:37 +02:00
PlanPrices.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
SampleInvoice.php Print every line at full price and take the discount off once, in euros 2026-07-29 01:59:56 +02:00
SetupFee.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
StorageAllowance.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
StripeInvoiceLines.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
TaxTreatment.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00
WithdrawalRight.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00