Cash
Cash registers, register sessions and the cash ins and outs of each session.
Overview
The Cash module tracks physical cash. A cash register (creg_...) is opened by a cashier as a session (cses_...) with an opening amount; every cash payment (invoices, bills, work orders) and every manual cash in or out becomes a movement (cmov_...) of that session. When the session is closed, the counted cash is compared with the expected amount.
Requires the Cash module. An owner or admin turns it on in Settings > Modules. While it is off, every endpoint on this page returns 403 with type permission_error and code module_disabled.
Opening and closing sessions requires counting the cash, so it is done by the cashier in the dashboard or the POS screen. Registers and movement concepts are configured in Settings > Cash. The API reads registers and sessions and records manual movements.
The Cash Session Object
balance = opening_amount + cash_in - cash_out: the cash that should be in the drawer right now. expected_amount, counted_amount and difference_amount (counted - expected) are filled when the session is closed.
Endpoints
| Method | Path | Permission | Description |
|---|---|---|---|
GET | /v1/cash-registers | read | List registers and who has each one open (is_active) |
GET | /v1/cash-sessions | read | List sessions with totals (register_id, status) |
GET | /v1/cash-sessions/{id} | read | Retrieve a session |
GET | /v1/cash-movements | read | List movements (session_id, register_id, direction, source) |
POST | /v1/cash-movements | write | Record a manual cash in or cash out in an open session |
Find the Open Sessions
Record a Cash Movement
session_id,direction(inorout) andamount(greater than 0) are required, plus aconcept_idor adescription- The concept must match the direction. Automatic concepts (customer and vendor payments) cannot be used manually
- A cash out above the session balance fails with "There is not enough cash in this session." unless negative cash is allowed
- Movements recorded automatically have
source=invoice_payment,bill_paymentorwork_order_paymentand areferenceto the document - Emits
cash_movement.created. Opening and closing a session emitcash_session.openedandcash_session.closed