Skip to content

Main content

Lot Expiry First Out Order Pair Tool

Order expiry dates ascending, breaking equal-date ties by explicit receipt sequence.

Loading tool…

Description

Order expiry dates ascending, breaking equal-date ties by explicit receipt sequence.

A logistics record separates ordered, reserved, dispatched, received, lost, and available quantities. It can also distinguish volume, mass, packaging, and cost bases. A balance or ratio checks supplied records and assumptions without verifying physical inventory, a contract, or safe loading.

Order expiry dates ascending, breaking equal-date ties by explicit receipt sequence.

When to use this tool

Use Lot Expiry First Out Order Pair when you need the particular supplied count, loading-budget, timing, or cost term in a logistics record.

How to use the tool and how it works

  1. Enter firstExpiry, secondExpiry, firstReceipt, secondReceipt. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read order. Use the output convention below.

Parse expiry dates as exact real YYYY-MM-DD dates. Return sign(firstExpiry-secondExpiry), breaking an equal-expiry tie with sign(firstReceipt-secondReceipt).1

Input fieldMeaning and unitsAccepted input
firstExpiryFirst ExpiryRequired. Text; maximum UTF-16 length 8192.
secondExpirySecond ExpiryRequired. Text; maximum UTF-16 length 8192.
firstReceiptFirst ReceiptRequired. Safe integer.
secondReceiptSecond ReceiptRequired. Safe integer.
Output fieldInterpretationReturned shape
orderNegative means the first lot sorts earlier; expiry ties use receipt order.Required. Safe integer.
json
{
  "input": {
    "firstExpiry": "2026-11-01",
    "secondExpiry": "2026-12-01",
    "firstReceipt": 20,
    "secondReceipt": 10
  },
  "output": {
    "order": -1
  }
}

Limitations and assumptions

  • Negative order places the first lot earlier; zero means both comparisons tie. Receipt coordinates are supplied, and no lot sorting, stock change, or suitability for use is performed.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.

Alternative or Complementary methods

Check the original stock, shipment, measurement, and contract records before acting on a balance. A full packing, routing, procurement, or load assessment may require more than the returned term.

References

  1. Calculation and input contract: supply-chain/lot-expiry-first-out-order-pair — tool.io

Similar or alternative tools

  • Lot Expiry Priority Gap

    Return gap=secondExpiry-firstExpiry and earlierLot first, second, or tie under direct numeric comparison.

  • Order Fill Line Versus Unit Gap

    Return lineFill as the share of fully delivered lines and unitFill as total delivered divided by total ordered, then gap=lineFill-unitFill.