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:
-
Loads every live invoice already linked to the sales order.
-
Totals the quantity billed per order line across all those invoices.
-
Computes each line's remaining-to-invoice balance:
Ordered quantity − Cancelled quantity − Already-invoiced quantity
-
Caps the new shipment invoice's line quantities at those remaining balances.
-
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
| Scenario | Before this fix | After this fix |
|---|---|---|
| Second shipment arrives after order is fully invoiced | Duplicate invoice created with full quantities | Invoice skipped; log message recorded |
| Two shipments arrive simultaneously for a partially-invoiced order | Race condition could invoice the same units twice | Each shipment is serialized; second shipment is capped at remaining balance |
| WMS reports the same shipment twice | Over-invoiced lines possible | Second 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:
- Open Operations → Sales Orders and find the order.
- Click Actions → Create Invoice from Sales Order.
- Review the line quantities and adjust if needed.
- Save to generate the invoice directly.