Postman collection
Invoices Read

pixiGetInvoiceShippingReport

Returns all invoices in a date range with the DATEV account number of the customer and the shipping address, optionally filtered by shop.

Lists invoices together with the customer's DATEV account number and the shipping address of the invoice. According to the header comment, the call was created for one specific customer ("Customer LLL").

Steps:

  1. An empty ShopID is treated like NULL, which means all shops.
  2. If DateFrom is not passed, it is set to the start of the day 30 days ago (00:00:00).
  3. If DateTo is not passed, it is set to the end of the current day (23:59:59.997).
  4. The invoices come from the view or table PV_Rechnungen. Only invoices with Rechnungsdatum >= DateFrom and Rechnungsdatum < DateTo are returned. The upper bound is exclusive.
  5. Each invoice is joined via its invoice number to Invoices. From there the customer (Customers, for the DATEV account number) and the shipping address (Addresses via ShipAdrRef) are read. The country name comes from Countries.
  6. If ShopID is set, only invoices whose InvShopID matches are returned.

The result has no defined sort order and no paging.

Notes

  • All tables are read with NOLOCK. The result can contain uncommitted data.
  • DateTo is compared with <. If a pure date such as 2024-03-31T00:00:00 is passed, invoices from that day are not included. To include them, pass the following day or a time at the end of the day.
  • The joins are LEFT JOINs. Without a shop filter, invoices that have no matching entry in Invoices, Customers, Addresses or Countries are still returned, with NULL values in the missing columns. With a shop filter, invoices without a matching Invoices row are excluded.
  • Firma is filled from the CareOf field of the address.
  • PV_Rechnungen is not attached. Whether it is a view and how it selects invoices cannot be seen from the code.

Tables used

PV_Rechnungen · Read Invoices · Read Customers · Read Addresses · Read Countries · Read
SQL object:
dbo.pipiGetInvoiceShippingReport
Updated at 2026-10-30