getDayClosings

Retrieve a log of POS day openings and closings.

POS can be opened with POSOpenDay and closed with POSCloseDay.

Each returned record corresponds to one day (or one cashier's shift) in one specific register.

If POS has been configured to accept and count multiple currencies, then for each day there will be a separate record for each currency.

Input parameters

Parameter name Description Possible value Required
dayID Search for a specific POS day opening & closing. Integer
warehouseID Warehouse ID. Integer
pointOfSaleID Point of sale ID. Integer
openedUnixTimeFrom Unix timestamp
openedUnixTimeUntil Unix timestamp
closedUnixTimeFrom Unix timestamp
closedUnixTimeUntil Unix timestamp
searchAttributeName Name of attribute to search from. Both "searchAttributeName" and "searchAttributeValue" have to be specified. Error 1030 will be returned if value is an array. String
searchAttributeValue Attribute value to search for. Error 1030 will be returned if value is an array. String
currencyCode

Search for day openings and closings in the register that were done for a specific currency.

Note: by default, you should not use this filter. In a default configuration, only default currency can be counted in POS, and the day opening and closing records will have no currency field at all.

This field can only be used if your account has the "POS multicurrency" module activated. Please contact customer support to enable it. If that module is not installed, setting this input parameter returns API error code 1028.

String (3)

Response

Field name Type Description
dayID Integer ID of the day opening & closing (or in other words, a cashier's shift).
warehouseID Integer Warehouse ID.
warehouseName String Warehouse name.
pointOfSaleID Integer Point of sale ID.
pointOfSaleName String Point of sale name.
drawerID Integer Drawer ID.
shiftType String Possible values: "BY_REGISTER", "BY_DRAWER".
employees Array List of all employees associated with this shift. Each list element contains the following field:
Field nameTypeDescription
employeeIDIntegerEmployee ID, see getEmployees
openedUnixTime Unix timestamp Opening timestamp.
openedByEmployeeID Integer Employee opening the day.
openedByEmployeeName String Employee opening the day.
openedSum Decimal Total amount of cash in register at opening time.
closedUnixTime Unix timestamp Closing timestamp.
closedByEmployeeID Integer Employee closing the day.
closedByEmployeeName String Employee closing the day.
closedSum Decimal Total amount of money left in register.
bankedSum Decimal Total amount of money removed from register and deposited.
notes String Notes.
reasonID Integer ID of cash variance reason. See getReasonCodes for various reason codes.
currencyCode String

The currency in which the drawer was counted.

In a default setup, Erply allows to count the drawer in the default currency only. The cashier should just set aside any cash received in foreign currencies, and remove it from the register at the end of the day. From back office, it is possible to manually print a Z Report that lists transactions made in a different currency, but the counted amount cannot be recorded in POS.

Therefore, in the default setup, "currencyCode" is always an empty string.

However, customer support can enable an extra module, "POS multicurrency". With this extra module, it becomes possible to count other currencies as well and record the counts.

Under that setup, POS will create a separate "day opening and closing record" for each currency. If the shop accepts EUR, USD and JPY, POS will open three "shifts" every morning, one for each currency. At the end of the day, POS will present a dialog to enter counts for all three currencies and all the three "shifts" will be closed at the same time.

(In addition to enabling the extra module, POS must also be configured to accept multiple currencies.)

attributes Array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value