Open Shift
Just like in the real world where employees would write down the amount of cash in their register at the beginning of a shift, the SDK requires that you also open a shift and record the amount of cash in the register. Throughout the day, cash is then put in or taken out of the cash register. This is referred to as pay in/out or cash in/out and the SDK also handles this as described in Pay In/Out.
You must also record the amount of cash in the register when the shift is over. This is referred to as closing the shift. For both opening and closing of shifts, the unique identifier for the cash register being used is required. The unique identifiers for cash registers are obtained by Cash Registers.
Caution
Sales can only be performed after a shift is opened.
The User Interface
Once again, to visualize what a user interface might look like we created a mockup:
The Sample Code
The sample code demonstrates how to open the shift for a specific cash register, which includes recording:
- the amount of cash in the drawer which is very important for reconciliation purposes (
amount
in the iOS code andopeningAmount
in the Android code) - and optionally, recording a note related to the opening of the drawer (
note
in the iOS code andopeningNote
in the Android code), for example, a user could indicate "I think there is a 20 € bill missing").