fix: receipt line items collide with invoice UUIDs
Imported from GitHub pull request El-SaMa/oma#125 by @El-SaMa.
Summary
- Receipts (and credit notes) cloned
invoice_itemsprimary keys from the source invoice, so create failed after the receipt header insert; a retry then hitinvoices_number_key. - Allocate fresh line IDs, make receipt creation idempotent (heal empty orphan receipts), and never fall back to stale
billing_settings.invoice.nextNumber. - Drop the n8n checkout temp-URL hint box.
Test plan
- €0 n8n checkout with TEST-ACCOUNT completes without invoice errors
- Paid invoice gets a receipt with its own line item rows
- Re-running receipt creation for the same invoice is a no-op / heal