Postman collection
Suppliers Read

pixiGetSOrdersBySupplier

Returns confirmed supplier orders of one supplier for a delivery location, or the list of suppliers with such orders, as a basis for delivery templates.

The call forwards both parameters to the internal procedure Pixi_GetSOrdersBySupplier. It helps select supplier orders from which a delivery template (supplier delivery) can be created.

Pre-filter: Supplier orders that already have at least one order line referenced by a supplier delivery in status NEW (SDelHeader.SDelHStatus = 'NEW') are excluded in both modes.

Status filter: Only orders whose status has IsConfirmed = 1 are considered. If the setting ConfirmOrderedDocumentOnDelivery is 1, orders whose status has IsOrderedConfirmed = 1 are included as well.

Location filter: The delivery location of the order (DeliveryLocationId) must match LocID.

Mode depends on SupplNr:

  • SupplNr is set: returns the matching orders of this supplier (OrderNr, ExternalCode, Code, OrderDate), sorted by internal order number descending. The status code BES is returned as ORD.
  • SupplNr is NULL: returns the distinct suppliers (SupplNr, SupplName) that have at least one matching order at the location.

Notes

  • Both parameters have no default in this wrapper, so they must be sent. The supplier-list mode is only reached if SupplNr is explicitly passed as NULL; an empty string is not NULL and returns no orders.
  • If LocID is NULL, no rows are returned, because the comparison lo.LocID = @LocID never matches NULL.
  • The wrapper does not pass @LanguageID, so the inner procedure always uses 1: BES becomes ORD; the translation of CON to BGT (language 2) never applies.
  • All reads use NOLOCK, so uncommitted data may be returned.
  • The setting ConfirmOrderedDocumentOnDelivery is read at runtime via fpixi_GetSetting.

Tables used

SupplierOrderLine · Read SDelDetail · Read SDelHeader · Read SupplierOrder · Read Location · Read Suppliers · Read SupplierOrderStatus · Read
SQL object:
dbo.pipiGetSOrdersBySupplier
Updated at 2026-10-30