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
@DaysBackdays ago until the end of today. - The order creation date is the first
ANGstatus change of its orderlines inOrderHistorywithin the range. The ship date is the earliestShipDateof its orderlines. - Only orders whose
OrderHeader.ShipDateis empty and that have at least one orderline in statusANGorAUS. IfShopIDis 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
InvBinItemLogon locations without special stock, minus the cumulated open demand per Artikel. - Orders with an orderline in status
ANGwhose Artikel stock is at most 1. The stock isItemLocationSpecific.LocationQuantityif special stock locations exist, otherwiseItems.Quantity.
Date adjustments
- Orders created on Friday, Saturday or Sunday are moved to the following Monday.
- Days without an invoice with
total > 0count 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.
DaysToShipis 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
DaysToShipvalue, with the count and its share of all counted orders. - An additional fixed row with
DaysToShip = 99and 0 orders is always appended. - The rows are sorted by
DaysToShip.
Notes
- The parameter
OnlyItemsOnStockis passed on topipiReport_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
DaysBackvalues. - If no order qualifies, only the row with
DaysToShip = 99is returned andAllPackagesis 0. - Columns
PercentageandAllPackagesare floating-point values.Percentageis 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.
Related calls
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
DaysBack
|
int | 14 |
Number of days back from today that are evaluated. Example: |
ShopID
|
varchar(3) string |
– |
Shop filter on the orderline shop ( Example: |
OnlyItemsOnStock
|
bit boolean |
1 |
Passed on to the detail procedure but not evaluated there; has no effect. Example: |
Result set 1 · Always
One row per number of days to ship, plus a fixed row with DaysToShip = 99, sorted by DaysToShip.
| Column | Type | Description |
|---|---|---|
DaysToShip
|
int |
Full 24-hour periods between the adjusted order date and the ship date (minimum 0). The value 99 marks the fixed closing row. |
NRofORders
|
int |
Number of orders with this |
Percentage
|
float decimal |
Share of these orders in all counted orders, as a fraction between 0 and 1. |
AllPackages
|
float decimal |
Total number of counted shipped orders. |
Response example
<SqlRowSet1>
<row>
<DaysToShip>0</DaysToShip>
<NRofORders>152</NRofORders>
<Percentage>0.76</Percentage>
<AllPackages>200</AllPackages>
</row>
<row>
<DaysToShip>99</DaysToShip>
<NRofORders>0</NRofORders>
<Percentage>0</Percentage>
<AllPackages>200</AllPackages>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiReport_LogisticQuality_NonCached>
<!-- <DaysBack>14</DaysBack> -->
<!-- <ShopID>SH1</ShopID> -->
<!-- <OnlyItemsOnStock>1</OnlyItemsOnStock> -->
</ns1:pixiReport_LogisticQuality_NonCached>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiReport_LogisticQuality_NonCached>
<!-- <DaysBack>14</DaysBack> -->
<!-- <ShopID>SH1</ShopID> -->
<!-- <OnlyItemsOnStock>1</OnlyItemsOnStock> -->
</ns1:pixiReport_LogisticQuality_NonCached>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'DaysBack' => '14',
// 'ShopID' => 'SH1',
// 'OnlyItemsOnStock' => '1',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiReport_LogisticQuality_NonCached', $soapArguments);
- SQL object:
- dbo.pipiReport_LogisticQuality_NonCached