Skip to content

What's the correct join path from inventory transaction history to customer order invoices, to see the individual cost elements behind an invoiced order line — including cases where a single order line was delivered (and invoiced) across multiple separate deliveries?

Answer

Bridge the two through the delivery-to-invoice reference table rather than joining them directly: join the invoice join-view to the delivery/invoice reference table on company, invoice ID, and item ID to resolve the actual delivery number, then join that delivery number (together with the order number, line number, release number, and line item number) into inventory transaction history's own source-reference columns, filtering to the customer-order source-reference type and the shipment transaction code. Going through the delivery reference table this way correctly handles order lines that were delivered and invoiced across multiple separate shipments, which a direct date-proximity-based join can't reliably do.

← Browse Distribution, CRM, and commerce questions