Postman collection
Suppliers Read

pixiReadDeliveryHeaders

Returns supplier delivery headers from `SDelHeader`, paged by key and optionally filtered by creation and/or update date.

Reads delivery header records (supplier deliveries / goods receipts) from the table SDelHeader.

Preparation

  • If SDelHKey is not passed, it is set to 0.
  • If RowCount is NULL, it is set to 1000.

Filter selection – exactly one filter mode is applied, in this priority:

  1. CreateAndUpdateDateFrom / CreateAndUpdateDateTo: a record matches the lower bound if its creation date or its update date is >= the From value, and the upper bound if its creation date or its update date is < the To value.
  2. CreateDateFrom / CreateDateTo: filter on SDelHCreateDate (From inclusive, To exclusive).
  3. UpdateDateFrom / UpdateDateTo: filter on SDelHUpdateDate (From inclusive, To exclusive).
  4. No date parameter: all records.

Parameters of a lower-priority mode are ignored as soon as a higher-priority mode is used (e.g. CreateDateFrom is ignored if CreateAndUpdateDateFrom is set).

Paging In every mode only records with SDelHKey greater than SDelHKey are returned, at most RowCount rows, sorted by SDelHKey ascending. To read the next page, pass the highest SDelHKey of the previous page.

Notes

  • SDelHKey is not an exact-match filter: passing a key returns the records after that key. The code contains a branch for an exact key lookup and an empty-result branch, but both are unreachable because SDelHKey and RowCount are never NULL after the initial defaults. To read one specific header, pass SDelHKey = key − 1 and RowCount = 1 and check the returned key.
  • The combined create/update filter uses OR on both bounds, so it is wider than a strict range: e.g. a record created before From but updated after To can still match both bounds.
  • The table is read with NOLOCK; uncommitted data may be returned.
  • A negative RowCount causes a SQL error in TOP; 0 returns no rows.
  • Column SDelHfinalDicsount is spelled this way in the database.

Tables used

SDelHeader · Read
SQL object:
dbo.pipiReadDeliveryHeaders
Updated at 2026-10-30