# Tills

> Till sessions with an opening float, cash in and out, end-of-day counts that book their difference in accounting, and cash deposits that reconcile to bank transactions.

- Category: Billing & commerce
- Module: `tills`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/tills
- Page: https://bettersupabase.com/blocks/tills

## Install

```bash
npx better-supabase add tills
```

The command also installs `updated-at`, `memberships`, `permissions`, `subjects`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by tills; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    subjects: {},
    // Modes: "managed", "custom". The default is "managed".
    tills: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/tills`.

## Events

- `till.created`
- `till.updated`
- `till_deposit.reconciled`
- `till_deposit.recorded`
- `till_movement.recorded`
- `till_session.closed`
- `till_session.opened`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md), [subjects](https://bettersupabase.com/blocks/subjects.md)

Works with: [accounting](https://bettersupabase.com/blocks/accounting.md), [banking](https://bettersupabase.com/blocks/banking.md), [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md)
