pixiDatevExportPosWires
Returns POS (point of sale) cash payments and, optionally, cash drawer session events in a period as booking lines for a DATEV export.
The call passes all parameters unchanged to the internal procedure Pixi_DatevExportPOSWires and returns its result. Each row is one booking line for a DATEV export.
Date range
DateFromis moved to the start of its day.DateTois moved to the end of its day.- Records are included if their date lies between
DateFromand one second before the adjustedDateTo.
Part 1 – POS payments (POSPayment, joined to the POS receipt header and the customer address)
- If the setting
ConsiderAllPosEventsis0(default), only payments with payment codeBare exported. If it is1, payments with any payment code are exported. ShopIdfilters on the shop of the customer address (AddrShopID).Countryfilters on theCountrycolumn.AmoutFrom/AmoutTofilter on the absolute amount; both limits are inclusive.Signis the minus sign for payment code-(change) or negative amounts, otherwise the plus sign.CustomerNris the first 10 characters of the external customer number. If that is empty, the settingDefaultCustomerAccountNumberis used, otherwise0.InvoiceNris the document number of the POS receipt.WireTextisChangefor payment code-, otherwise empty.
Part 2 – Session events (POSSession_event)
- Only included if
ConsiderAllPosEventsis1. - Covers the event types
D(Drawer Open),E(Session Stop) andS(Session Start) within the date range. ShopId,Countryand the amount filters do not apply to this part.Amountis the absolute value of incoming minus outgoing amount.Signis plus if that difference is ≥ 0, otherwise minus.CustomerNris the default customer account number.InvoiceNris empty.WireTextis the event name, followed by-and the event comment if there is one.
Signs
If the setting BookExportDatevPro is set (not 0), the signs are s (debit) and h (credit). Otherwise they are + and -.
Common columns
Currencyis alwaysEUR.BankAccountNris the settingAccountNumberPOSPayment, or0if it is not set.- The columns
Empty1–Empty6are empty placeholders for the DATEV file layout.
Sort order: BankAccountNr, then BankDate, then Sign descending.
Notes
- The parameter names
AmoutFromandAmoutToare misspelled in the code (missingn). They must be sent exactly like this. - The behaviour depends on the settings
BookExportDatevPro,AccountNumberPOSPayment,DefaultCustomerAccountNumberandConsiderAllPosEvents. They are read at runtime viadbo.SettingGet. - The exact day boundaries come from
fPixi_GetDateStartOfDay/fPixi_GetDateEndOfDay, which are not attached. The code comment says one second is subtracted from the end so that lines at 00:00:00 are not exported twice. - Both parts are combined with
UNION, notUNION ALL. Completely identical rows therefore appear only once. This can happen, for example, with two equal payments on the same receipt at the same time. - All tables are read with
NOLOCK, so uncommitted data may be included. - The
ShopIdfilter only matches payments that have a linked customer address. - The currency is always reported as
EUR, regardless of the actual payment currency. - Read-only; no data is changed.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
DateFrom
Required
|
datetime dateTime |
– |
Start of the period. It is moved to the start of the day. Example: |
DateTo
Required
|
datetime dateTime |
– |
End of the period. It is moved to the end of the day, so the given day is included. Example: |
ShopId
|
varchar(3) string |
NULL |
Optional shop filter on the shop of the customer address ( Example: |
Country
|
varchar(3) string |
NULL |
Optional filter on the Example: |
AmoutFrom
|
money decimal |
NULL |
Optional minimum absolute payment amount (inclusive). Applies only to POS payments. Note the spelling. Example: |
AmoutTo
|
money decimal |
NULL |
Optional maximum absolute payment amount (inclusive). Applies only to POS payments. Note the spelling. Example: |
Result set 1 · Always (may be empty).
DATEV booking lines for POS payments and, depending on ConsiderAllPosEvents, session events. Sorted by BankAccountNr, BankDate, Sign descending.
| Column | Type | Description |
|---|---|---|
Currency
|
varchar(3) string |
Always |
Sign
|
char(1) string |
|
Amount
Nullable |
money decimal |
Absolute amount of the payment, or incoming minus outgoing amount for session events. |
Empty1
|
varchar(1) string |
Empty placeholder. |
CustomerNr
|
varchar(255) string |
External customer number (max. 10 characters), or the default customer account number, or |
InvoiceNr
Nullable |
string |
Document number of the POS receipt; empty for session events. |
Empty2
|
varchar(1) string |
Empty placeholder. |
BankDate
|
datetime dateTime |
Receipt date or event time. |
BankAccountNr
|
varchar(255) string |
Value of the setting |
Empty3
|
varchar(1) string |
Empty placeholder. |
Empty4
|
varchar(1) string |
Empty placeholder. |
Empty5
|
varchar(1) string |
Empty placeholder. |
Empty6
|
varchar(1) string |
Empty placeholder. |
WireText
|
varchar string |
|
Response example
<SqlRowSet1>
<row>
<Currency>EUR</Currency>
<Sign>+</Sign>
<Amount>49.9000</Amount>
<Empty1/>
<CustomerNr>10000</CustomerNr>
<InvoiceNr>POS-2024-001234</InvoiceNr>
<Empty2/>
<BankDate>2024-03-05T14:22:10</BankDate>
<BankAccountNr>1000</BankAccountNr>
<Empty3/>
<Empty4/>
<Empty5/>
<Empty6/>
<WireText/>
</row>
<row>
<Currency>EUR</Currency>
<Sign>-</Sign>
<Amount>0.1000</Amount>
<Empty1/>
<CustomerNr>10000</CustomerNr>
<InvoiceNr>POS-2024-001234</InvoiceNr>
<Empty2/>
<BankDate>2024-03-05T14:22:10</BankDate>
<BankAccountNr>1000</BankAccountNr>
<Empty3/>
<Empty4/>
<Empty5/>
<Empty6/>
<WireText>Change</WireText>
</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:pixiDatevExportPosWires>
<DateFrom>2024-03-01T00:00:00</DateFrom>
<DateTo>2024-03-31T00:00:00</DateTo>
<!-- <ShopId>001</ShopId> -->
<!-- <Country>DE</Country> -->
<!-- <AmoutFrom>0.01</AmoutFrom> -->
<!-- <AmoutTo>10000.00</AmoutTo> -->
</ns1:pixiDatevExportPosWires>
</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:pixiDatevExportPosWires>
<DateFrom>2024-03-01T00:00:00</DateFrom>
<DateTo>2024-03-31T00:00:00</DateTo>
<!-- <ShopId>001</ShopId> -->
<!-- <Country>DE</Country> -->
<!-- <AmoutFrom>0.01</AmoutFrom> -->
<!-- <AmoutTo>10000.00</AmoutTo> -->
</ns1:pixiDatevExportPosWires>
</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 = [
'DateFrom' => '2024-03-01T00:00:00',
'DateTo' => '2024-03-31T00:00:00',
// 'ShopId' => '001',
// 'Country' => 'DE',
// 'AmoutFrom' => '0.01',
// 'AmoutTo' => '10000.00',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiDatevExportPosWires', $soapArguments);
- SQL object:
- dbo.pipiDatevExportPosWires