> ## Documentation Index
> Fetch the complete documentation index at: https://dhanurgo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Expense Tracking

> Creating, categorizing, splitting, and importing expenses for fleet cost management

# Expense Tracking

The Expenses page lets hosts track all costs associated with running their fleet. Expenses can be assigned to specific vehicles or tracked as global fleet costs, and optionally split across multiple vehicles.

## Creating Expenses

Use `CreateExpenseModal` to record an expense with:

* **Amount** — Cost in dollars
* **Date** — When the expense occurred
* **Category** — One of 14+ predefined categories
* **Vehicle** — Assign to a specific vehicle, or leave as a global expense
* **Description** — Free-text notes
* **Recurring** — Mark as recurring with a frequency (monthly, quarterly, annually)

## Expense Categories

| Category     | Examples                                           |
| ------------ | -------------------------------------------------- |
| Insurance    | Monthly premium, policy renewal                    |
| Fuel         | Gas fill-ups, charging costs                       |
| Maintenance  | Oil changes, tire rotation, brakes                 |
| Repairs      | Body work, mechanical fixes                        |
| Registration | Annual registration, title fees                    |
| Cleaning     | Car washes, interior detailing                     |
| Parking      | Monthly parking, airport lots                      |
| Tolls        | Manual toll entries (see also Toll Reconciliation) |
| Loan Payment | Vehicle financing payments                         |
| Depreciation | Tracked vehicle depreciation                       |
| Software     | Turo fees, HostMetrics subscription                |
| Marketing    | Listing boost costs, advertising                   |
| Supplies     | Phone mounts, cleaning supplies                    |
| Other        | Miscellaneous costs                                |

## Per-Vehicle vs Global Expenses

* **Per-vehicle** — Assigned to a single vehicle via `vehicle_id`. Shows in that vehicle's detail page and per-vehicle profitability reports.
* **Global** — No vehicle assignment. Counted in overall fleet expenses but not attributed to any specific vehicle.

## Expense Splitting

A single expense can be split across multiple vehicles using the `expense_vehicles` junction table. For example, a fleet insurance policy can be divided proportionally across all covered vehicles. The split amounts are used in per-vehicle profitability calculations.

## Recurring Expenses

Mark an expense as recurring to automatically project future costs. The system tracks:

* Recurrence frequency (monthly, quarterly, annually)
* Start date
* Whether the next occurrence has been created

<Info>
  Recurring expenses are projections for reporting purposes. Each actual occurrence should be confirmed or adjusted when it comes due.
</Info>

## CSV Import

Use `ImportExpensesModal` to bulk-import expenses from a CSV file. The expected format is documented in [Expense Import CSV](/data-reference/expense-import-csv).

## Miscellaneous Income

Non-trip income (referral bonuses, tips, insurance payouts) is tracked separately on the Other Income page using the `misc_income` table. This keeps the expense and income streams clean for reporting.

## Key Components

| Component             | Purpose                      |
| --------------------- | ---------------------------- |
| `CreateExpenseModal`  | Manual expense entry form    |
| `ImportExpensesModal` | Bulk CSV import for expenses |

## Data Layer

Expense operations are in `src/lib/db/index.ts`. Hooks: `useExpenses` and variants in `src/hooks/`. The `expense_vehicles` table handles split assignments.
