LAFU Sales Reports

fix: receipt line items collide with invoice UUIDs

FeatureOpenView on roadmap· 27 days ago

Imported from GitHub pull request El-SaMa/oma#125 by @El-SaMa.


Summary

  • Receipts (and credit notes) cloned invoice_items primary keys from the source invoice, so create failed after the receipt header insert; a retry then hit invoices_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

Comments (0)

No comments yet.

Join the discussion

Sign in to leave a comment on this thread.

HollahoopGet yours