Postman collection
Reports Read

pixiReportGetShippableOrders

Returns the order lines that can be shipped from current stock, either as line details or as totals (orders, value, shipping cost, picks), optionally per location.

Evaluates open orders and checks, line by line, whether there is enough stock to ship them. It then returns either the shippable lines or summary figures.

Candidate orders and lines

  • Only order lines with status ANG or EIN, a non-NULL ItemRef and Qty > 0 are considered.
  • The order's customer must belong to ShopId (Customers.CustomerOf). An empty ShopId means all shops.
  • Orders are excluded if the invoice address (AddrRef) or the shipping address (ShipAdrRef) is locked (ASlocked = 'Y').
  • Orders are also excluded if the order itself is locked (OhSLocked = 'Y').
  • Unless IncludeOrdersWithAnyShipDate = 1, only orders with no Shipdate or a Shipdate before tomorrow (today or earlier) are included.

Stock check The internal procedure pixi_CalculateStockForOrderLines sets a shippable flag on each candidate line. It runs with zero-stock items skipped, so lines of items without stock are not shippable.

  • The calculation takes into account the stock in locations with SpecialStock = 0, existing reservations and earlier unreserved order lines.
  • Lines with status EIN always count as shippable.
  • An order counts as partial or unshippable if at least one of its candidate lines is not shippable.

Filter by delivery mode

  • OnlyPartDelivery = 0, IncludePartDelivery = 0: only lines of orders whose candidate lines are all shippable (complete orders).
  • OnlyPartDelivery = 0, IncludePartDelivery = 1: all shippable lines, from complete and from partial orders.
  • OnlyPartDelivery = 1: only the shippable lines of partial orders. IncludePartDelivery is ignored in this case.

Currency If the setting MultiCurrencyEnabled is 1, Price and ShipCost are converted into the database currency. The conversion uses the exchange rate of the database rate source that has the same currency and date as the order's exchange rate. If no such rate exists, the values are not converted. dbCurrency then contains the database currency code; otherwise it is NULL.

Output Exactly one result set is returned, chosen by ViewDetails and PerLocation:

  • ViewDetails = 1: one row per shippable line, sorted by OrderNr and OrderlineRef. With PerLocation = 1 the column LocationId is added.
  • ViewDetails = 0, PerLocation = 0: one total row.
  • ViewDetails = 0, PerLocation = 1: one total row per location.

Notes

  • All reads use NOLOCK, so the figures can include uncommitted data.
  • The setting UseFIFObyLocation controls the stock basis inside pixi_CalculateStockForOrderLines:
    • 0: total stock of all locations with SpecialStock = 0.
    • 1: stock of the line's own location.
  • Only lines in status ANG/EIN decide whether an order is complete. Lines of the same order in other statuses are ignored, both in the check and in the output.
  • ShipCost is the shipping cost of the order header. In the detail result sets it is repeated on every line of the order. In the totals it is counted once per order, or once per order and location with PerLocation = 1. An order with lines in several locations therefore contributes its shipping cost to each of those locations.
  • OrderTotal is computed as SUM(Price * Qty).
  • NULL values for the bit parameters are treated as 0. PerLocation is marked in the code as the "old way".
  • The helper procedure calls log.EventDurationInsert (definition not attached), which probably writes a duration log entry.
  • On large databases the call can be expensive, because it calculates stock for all open lines.

Tables used

OrderStates · Read Orderlines · Read OrderHeader · Read Customers · Read Addresses · Read ExchRate · Read Currency · Read Settings · Read Location · Read Reservation · Read ItemLocationSpecific · Read
SQL object:
dbo.pipiReportGetShippableOrders
Updated at 2026-10-30