Overview

When a channel's Invoice push timing creates invoices from shipments or When a Shipment is created (multiple invoices possible), End of day batch (wait for freight/tracking, then invoice once), or Invoice at shipment, send email + QuickBooks at batch time — Luminous now caps each automatic shipment invoice at the quantity still left to invoice on the order.


How the cap works

Before generating a new shipment invoice, Luminous:

  1. Loads every live invoice already linked to the sales order.

  2. Totals the quantity billed per order line across all those invoices.

  3. Computes each line's remaining-to-invoice balance:

    Ordered quantity − Cancelled quantity − Already-invoiced quantity

  4. Caps the new shipment invoice's line quantities at those remaining balances.

  5. If every line's remaining balance is zero or negative, the invoice is skipped entirely — no empty or zero-quantity invoice is created.

This applies to both the line-item consolidation on and consolidation off paths, and correctly handles sales orders that have two separate lines for the same SKU.


What you will see in practice

ScenarioBefore this fixAfter this fix
Second shipment arrives after order is fully invoicedDuplicate invoice created with full quantitiesInvoice skipped; log message recorded
Two shipments arrive simultaneously for a partially-invoiced orderRace condition could invoice the same units twiceEach shipment is serialized; second shipment is capped at remaining balance
WMS reports the same shipment twiceOver-invoiced lines possibleSecond event produces zero remaining → invoice skipped

How do I know an invoice was skipped?

If an order is already fully invoiced, Luminous doesn't create another invoice when a later or duplicate shipment arrives. Open the order (Operations → Sales Orders) and check the Invoices tab. The existing invoices should cover the full ordered quantity, minus any cancellations.


If you need to adjust an invoice manually

If you believe an invoice was skipped in error, create it manually:

  1. Open Operations → Sales Orders and find the order.
  2. Click Actions → Create Invoice from Sales Order.
  3. Review the line quantities and adjust if needed.
  4. Save to generate the invoice directly.