Postman collection
Items Read

pixiItemSearch

Searches items by name or item code, EAN/UPC, configuration type and supplier, and returns item rows including supplier prices and open supplier order quantities.

Wrapper around the internal procedure GOSItemSearch1. It passes its parameters on and always requests supplier prices and statistics. No user name is passed, so supplier (purchase) prices are always visible.

Steps:

  1. If SupplNr is empty, ShowOnlyItemsForExactSupplier is forced to 0.
  2. RowCount = 0 is replaced by the setting ItemSearchLimit. If that setting is also 0, 300 is used.
  3. If EANUPC is set, the item IDs whose code in pixi.ItemCode matches exactly are collected. Only code types flagged as scannable count.
  4. If ItemName is set and the EAN step found nothing, ItemName is compared with all item codes:
    • If exactly one code matches exactly, that item is the result. The free-text search is then switched off and code type 1 is used.
    • Otherwise all items whose code starts with ItemName are collected. ItemName is then also used as a smart search term.
  5. ConfigType is passed on as the configuration type filter (TonTrArt).
  6. SupplNr is passed on as the supplier filter. LocID selects the location (default 001).
  7. The database currency is always used. No exchange rate is passed.
  8. For each item, the open quantity on supplier orders is calculated: ordered minus delivered minus undelivered quantity. Only supplier orders with a fully open status and quantities for the selected location are counted. If SupplNr is given, only that supplier's orders count.
  9. The final query returns SELECT DISTINCT TOP (RowCount) rows. It is built dynamically.

The query has no ORDER BY; the ORDER BY clause is commented out in the code. The row order is therefore not guaranteed.

Notes

  • The result columns, the item filters (supplier, configuration type, smart search) and the joins come from the procedure pixi_ItemSearchPrepareDynamicQuery. Its definition is not attached, so the exact column list cannot be documented here.
  • All reads use NOLOCK, so results may include uncommitted data.
  • Behaviour depends on the settings ItemSearchLimit, MultiCurrencyEnabled and HalOrdersActiveDays. The legacy setting ShowSupplPriceOnlyToTheseUsers is read but has no effect, because no user name is passed.
  • ShowStatistics = 1 is passed to GOSItemSearch1, but the attached code of that procedure does not use this parameter.
  • Pitfall: on an exact single code match via ItemName, the code sets ItemName to NULL first and then copies it into EANUPC. As a result EANUPC also becomes NULL.
  • Single quotes in ItemName and SupplNr are escaped before they are put into the dynamic SQL.

Tables used

Settings · Read Location · Read ItemCode · Read ItemCodeType · Read Suppliers · Read Items · Read SupplierOrderLine · Read SupplierOrder · Read SupplierOrderStatus · Read SupplierOrderLineLocQty · Read
SQL object:
dbo.pipiItemSearch
Updated at 2026-10-30