Postman collection
Reports Read

pixiReport_LogisticQuality_NonCached

Returns the distribution of shipped orders by days from order to shipment for the last days, as used for the pixi* shipping seal (Versandsiegel) percentage.

Wrapper used by the pixi* Seal app and the Dashboard app. NULL values are replaced by the defaults (14, '', 1). The call then runs pipiReport_LogisticQuality_Details with @CalcSeal = 1, which computes the data directly (not from a cache).

Order selection

  • Date range: from the start of the day @DaysBack days ago until the end of today.
  • The order creation date is the first ANG status change of its orderlines in OrderHistory within the range. The ship date is the earliest ShipDate of its orderlines.
  • Only orders whose OrderHeader.ShipDate is empty and that have at least one orderline in status ANG or AUS. If ShopID is not empty, that orderline must belong to this shop (OrdShopID).
  • Orders of customers that were locked (CustomersHist.HSLocked = 'Y') during the range are excluded.

Exclusions

  • Orders that were changed manually: the orderline creation times differ by more than 5 minutes.
  • Orders where the stock was not sufficient at the order date. Stock is calculated from InvBinItemLog on locations without special stock, minus the cumulated open demand per Artikel.
  • Orders with an orderline in status ANG whose Artikel stock is at most 1. The stock is ItemLocationSpecific.LocationQuantity if special stock locations exist, otherwise Items.Quantity.

Date adjustments

  • Orders created on Friday, Saturday or Sunday are moved to the following Monday.
  • Days without an invoice with total > 0 count as holidays. Orders on such a day, or on a day whose next day is such a day, are moved to the first invoice date of a later working day.

Result

  • Only orders with a ship date are counted.
  • DaysToShip is the number of full 24-hour periods between the adjusted creation date and the ship date. Negative values become 0.
  • One row is returned per DaysToShip value, with the count and its share of all counted orders.
  • An additional fixed row with DaysToShip = 99 and 0 orders is always appended.
  • The rows are sorted by DaysToShip.

Notes

  • The parameter OnlyItemsOnStock is passed on to pipiReport_LogisticQuality_Details, but that procedure does not use it. It has no effect.
  • All reads use NOLOCK, so the numbers can include uncommitted data.
  • The calculation runs on every call and can be expensive for large DaysBack values.
  • If no order qualifies, only the row with DaysToShip = 99 is returned and AllPackages is 0.
  • Columns Percentage and AllPackages are floating-point values. Percentage is a fraction between 0 and 1, not a value multiplied by 100.
  • Holidays are derived from days without invoices, so days without invoicing also count as non-working days.

Tables used

Location · Read OrderHeader · Read Orderlines · Read OrderHistory · Read CustomersHist · Read Reservation · Read InvBinItemLog · Read OrderStates · Read ItemLocationSpecific · Read Items · Read Invoices · Read
SQL object:
dbo.pipiReport_LogisticQuality_NonCached
Updated at 2026-10-30