Invoice delete is now guarded

Luminous blocks invoice deletion in two situations to protect financial data integrity.


Situation 1 — The invoice has a linked sales order

Error message: "Cannot delete invoice. This invoice has an associated sales order (SO-XXXXX). Please void the invoice instead."

When an invoice was approved and a sales order was generated from it, deleting the invoice would leave the sales order in an inconsistent state. Instead:

  1. Go to Sales → Invoices and open the invoice.
  2. Use Actions → Update Status → Void to void the invoice. This preserves the record while marking it inactive and keeping the sales order intact.
  3. If the underlying fulfillment should also be cancelled, update the linked sales order status separately from Operations → Sales Orders.

Note: The existing How to Delete or Mark an Invoice as Cancelled article describes the delete flow for invoices that do not have a linked sales order, and the void flow for those that do.


Situation 2 — A payment has already been applied (when enabled for your account)

Error message: "Cannot delete invoice. A payment has already been applied to it. Please reverse the payment before deleting."

This guard is enabled per-tenant. If your account has it on:

  • Non-credit-memo payments (card charges, manual check/Zelle entries, etc.): You must reverse or remove the payment first, then retry the delete.
  • Credit-memo payments: Luminous will automatically reverse the credit-memo application as part of the delete — restoring the customer's credit balance and backing the paid amount out of the invoice — all in a single atomic step. No manual reversal is needed.

If the delete still fails after reversing a non-credit-memo payment, check whether another payment type is still applied.


Quick decision guide

SituationRecommended action
Invoice has a linked sales orderVoid the invoice (Actions → Update Status → Void)
Invoice has an applied payment (card/check)Reverse the payment first, then delete
Invoice has an applied credit-memo paymentDelete — credit-memo reversal is automatic
Invoice has no SO and no applied paymentsDelete as normal

Why was this changed?

Previously, deleting an invoice with an applied credit-memo payment left the payment log live — the customer's credit-memo balance stayed locked and paid amounts appeared inflated in the Payments report. The new guard prevents those silent data problems.