Skip to main content

Lot Consumption in Sales

When a sale is recorded, Partsemble consumes finished good lots using FIFO — the same method used when builds consume component lots. This connects your sales directly to the specific production batches that fulfilled them, giving you accurate cost-of-goods-sold figures and full traceability from sale back to production.

Sale detail page showing lot consumption per line with FIFO allocations

How FIFO Consumption Works in Sales

For each line item on a sale, Partsemble looks at the finished good's available lots in order from oldest to newest (by receipt or build date) and consumes quantity until the sale line is fulfilled.

Example: You sell 50 units of Industrial Enclosure. The product has three build lots:

LotAvailable QtyUnit Cost
LOT-ASM-00120$145.00
LOT-ASM-00230$148.00
LOT-ASM-00325$152.00

Partsemble consumes all 20 from LOT-ASM-001 ($145.00 each), then 30 from LOT-ASM-002 ($148.00 each), totaling 50 units. LOT-ASM-003 is untouched.

The cost for this sale line is (20 × $145.00) + (30 × $148.00) = $2,900.00 + $4,440.00 = $7,340.00, giving a unit cost of $146.80 per enclosure.

What Gets Created

Each lot consumed by a sale line produces a SaleLotConsumption record that tracks the lot, quantity consumed, and cost per unit. These records are the source of truth for the sale's cost calculations and are also used to reverse consumption if the sale is later voided.

Stock transactions of type SALE are created for each consumption, appearing in the product's stock transaction history.

Lot Statuses After Consumption

When a lot's available quantity reaches zero, it's considered fully consumed. Lots with remaining quantity stay active and available for future sales or other consumption. Partially consumed lots show their reduced available quantity across the system.

Traceability

The lot consumption records create a direct link between a sale and the production lots that fulfilled it. From any sale, you can see which lots were consumed. From any lot, you can see which sales consumed it. This forward and backward traceability is useful for quality investigations — if a customer reports an issue, you can trace the sale back to the exact production batches involved.

When Stock Is Insufficient

If there aren't enough lots to fulfill a sale line, Partsemble doesn't block the sale. Instead, it consumes whatever lots are available and flags the shortfall as a stock shortage. The shortage quantity is costed at the product's weighted average cost rather than a specific lot cost. See Stock Shortages for details.

Manual Sales and Synced Sales

Both manual sales and synced sales use the same FIFO lot consumption process. There's no difference in how lots are consumed — the only difference is how the sale entered Partsemble.