# Billable time

> A rate card for time entries, by member, record or organization with effective dates, and draft invoices from unbilled billable time with one line per record, member or entry, in bigint minor units. Billed entries lock until the invoice is voided.

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

## Install

```bash
npx better-supabase add billable-time
```

The command also installs `updated-at`, `tenant`, `access`, `subjects`, `approvals`, `ledger`, `time-tracking`, `invoices`.

## Configure

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

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

export default defineConfig({
  blocks: {
    // Required by billable-time; add installs them too.
    "updated-at": {},
    tenant: {},
    access: {},
    subjects: {},
    approvals: {},
    ledger: {},
    "time-tracking": {},
    invoices: {},
    // Modes: "managed", "custom". The default is "managed".
    "billable-time": { mode: "managed" },
  },
});
```

## Client

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

## Events

- `time.invoiced`

## Related blocks

Requires: [tenant](https://bettersupabase.com/blocks/tenant.md), [access](https://bettersupabase.com/blocks/access.md), [subjects](https://bettersupabase.com/blocks/subjects.md), [time-tracking](https://bettersupabase.com/blocks/time-tracking.md), [invoices](https://bettersupabase.com/blocks/invoices.md)

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