Postman collection
Payments Read

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

  • DateFrom is moved to the start of its day.
  • DateTo is moved to the end of its day.
  • Records are included if their date lies between DateFrom and one second before the adjusted DateTo.

Part 1 – POS payments (POSPayment, joined to the POS receipt header and the customer address)

  • If the setting ConsiderAllPosEvents is 0 (default), only payments with payment code B are exported. If it is 1, payments with any payment code are exported.
  • ShopId filters on the shop of the customer address (AddrShopID).
  • Country filters on the Country column.
  • AmoutFrom / AmoutTo filter on the absolute amount; both limits are inclusive.
  • Sign is the minus sign for payment code - (change) or negative amounts, otherwise the plus sign.
  • CustomerNr is the first 10 characters of the external customer number. If that is empty, the setting DefaultCustomerAccountNumber is used, otherwise 0.
  • InvoiceNr is the document number of the POS receipt.
  • WireText is Change for payment code -, otherwise empty.

Part 2 – Session events (POSSession_event)

  • Only included if ConsiderAllPosEvents is 1.
  • Covers the event types D (Drawer Open), E (Session Stop) and S (Session Start) within the date range.
  • ShopId, Country and the amount filters do not apply to this part.
  • Amount is the absolute value of incoming minus outgoing amount. Sign is plus if that difference is ≥ 0, otherwise minus.
  • CustomerNr is the default customer account number. InvoiceNr is empty.
  • WireText is 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

  • Currency is always EUR.
  • BankAccountNr is the setting AccountNumberPOSPayment, or 0 if it is not set.
  • The columns Empty1–Empty6 are empty placeholders for the DATEV file layout.

Sort order: BankAccountNr, then BankDate, then Sign descending.

Notes

  • The parameter names AmoutFrom and AmoutTo are misspelled in the code (missing n). They must be sent exactly like this.
  • The behaviour depends on the settings BookExportDatevPro, AccountNumberPOSPayment, DefaultCustomerAccountNumber and ConsiderAllPosEvents. They are read at runtime via dbo.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, not UNION 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 ShopId filter 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

POSPayment · Read POSheader2 · Read Addresses · Read POSSession_event · Read
SQL object:
dbo.pipiDatevExportPosWires
Updated at 2026-10-30