Postman collection
Orderlines Write

pixiEstimatedDeliveryUpdates

Recalculates the estimated delivery dates of order lines and items for an order, a shop order number or an item, and queues changed items for export.

Wrapper around the internal procedure Pixi_EstimatedDeliveryUpdates.

  1. OrderNr = 0, ShopOrderNr = '' and ItemRef = 0 are treated as NULL.
  2. If all three parameters are NULL, the call ends immediately and does nothing. A full recalculation for all items cannot be started through this call.
  3. Otherwise the internal procedure runs with the given values.

Selection of items

  • OrderNr: items of the order lines of this Auftrag (not deleted, OrderNr <> 0) with status ANG or HAL, or lines that belong to a bundle line.
  • ShopOrderNr: the same, matched on Orderlines.OrderNrExternal.
  • ItemRef: the item itself. If it is a bundle, its components are added and the bundle is recalculated too.
  • Only non-bundle items are calculated directly. If no item is found, the procedure ends without changes.

Calculation (setting EstimatedDeliveryCalcUsesFIFO)

  • 1 (FIFO): stock units in locations with ParticipateInEstDelivery = 1 and open quantities of confirmed supplier order lines (IsOrderedConfirmed = 1, with an estimated delivery date, at participating locations) are assigned unit by unit to open order lines with status ANG/HAL. The lines are sorted by AutoReservationDone descending, order date and order line key. Each order line gets the date of its last assigned unit and the supplier order line used (RealSorderlineRef). Stock and past dates become today. The item gets the date of the next unit that is still free after all open lines, or NULL.
  • 0 (MAX) / 2 (MIN): the latest or earliest estimated delivery date of confirmed supplier order lines with a participating delivery location. It is used only if the date is after today and open quantity remains. All order lines of the item and the item itself get this date.
  • Any other value calculates nothing.

Cleanup and bundles

  • Unless all three parameters are filled, existing entries in Orderline_EstimatedDelivery and Item_EstimatedDelivery (non-bundle items) that were not recalculated are set to NULL, which deletes them.
  • Bundles get the latest date of their components. If one component has no date, the bundle gets no date.

Saving

  • Item_EstimatedDelivery and Orderline_EstimatedDelivery are updated with MERGE. A NULL result deletes the row, a changed value is updated with a new update date, a new item or line is inserted.
  • Changed bundles, and changed items that already have an InvBinItemLog entry, are written to pixi.ItemRecalculateStockQueue with ForceToExport = 1.
  • Changed items without any InvBinItemLog entry get a log row with quantity 0 and UpdateEmp = 'AutoEstDelExp', so that they are exported.

The call returns no result set.

Notes

  • Pitfall: the cleanup step is not limited to the selected order or item. Unless OrderNr, ShopOrderNr and ItemRef are all filled, every entry in Orderline_EstimatedDelivery and Item_EstimatedDelivery (non-bundle items) that was not recalculated in this run is deleted, across the whole system.
  • If no bundle is involved in the selection, all bundles in the system are recalculated from the current results.
  • In MAX/MIN mode all order lines of the item get the date, regardless of their status. In FIFO mode only open lines with status ANG/HAL are considered.
  • The calculation mode comes from the setting EstimatedDeliveryCalcUsesFIFO, read at runtime through fpixi_GetSetting. Its definition is not attached.
  • The procedure returns 0 if nothing was done and 1 otherwise. The SOAP response does not contain this return value as a row.
  • There is no explicit transaction. Reads use NOLOCK.
  • The FIFO mode expands quantities into single units using dbo.Numbers. This can be slow for large quantities.

Tables used

Orderlines · Read BundleOrderlines · Read BundleItems · Read items · Read Item_EstimatedDelivery · Write Orderline_EstimatedDelivery · Write InvBinItem · Read InvBin · Read Location · Read Numbers · Read SupplierOrderLine · Read SupplierOrder · Read SupplierOrderStatus · Read SupplierOrderLineLocQty · Read OrderHeader · Read ItemRecalculateStockQueue · Write InvBinItemLog · Write
SQL object:
dbo.pipiEstimatedDeliveryUpdates
Updated at 2026-10-30