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

# FBO Statuses

> Booking statuses, unit statuses, maintenance statuses, payment states, service order statuses, purchase order statuses, vendor statuses, gift card statuses, discount statuses, and credit statuses for the FBO module.

The FBO module uses several status systems to track the lifecycle of bookings, units, maintenance tasks, payments, tills, service orders, purchase orders, vendors, gift cards, discounts, and credits. This reference covers every status value, its meaning, and valid transitions.

## Booking Statuses

Booking statuses track the lifecycle of FBO reservations from creation through checkout. The status determines available actions and the guest's current relationship with the facility.

| Status                                   | API Value     | Description                                                                          |
| ---------------------------------------- | ------------- | ------------------------------------------------------------------------------------ |
| <Badge color="blue">Reserved</Badge>     | `reserved`    | Booking has been created and a unit is held for the guest. No check-in has occurred. |
| <Badge color="green">Confirmed</Badge>   | `confirmed`   | Guest or operator has confirmed the reservation. The booking is guaranteed.          |
| <Badge color="green">Checked In</Badge>  | `checked_in`  | Guest has arrived and check-in is complete. The unit is now occupied.                |
| <Badge color="green">Checked Out</Badge> | `checked_out` | Guest has departed and the unit has been released. This is a terminal state.         |
| <Badge color="red">Cancelled</Badge>     | `cancelled`   | Booking has been cancelled before checkout. This is a terminal state.                |

### Booking Lifecycle

```mermaid theme={}
stateDiagram-v2
    [*] --> reserved : Booking created
    reserved --> confirmed : Guest confirms
    confirmed --> checked_in : Guest arrives
    checked_in --> checked_out : Guest departs
    reserved --> cancelled : Cancelled
    confirmed --> cancelled : Cancelled
    checked_in --> cancelled : Cancelled
```

A booking can be cancelled from any non-terminal state -- `reserved`, `confirmed`, or `checked_in`. Once a booking reaches `checked_out` or `cancelled`, no further transitions are possible.

## Payment Statuses

Payment statuses track the financial state of a booking independently from its booking status. A booking can be checked out while its payment status is still `partial` or `unpaid`.

| Status                                 | API Value  | Description                                             |
| -------------------------------------- | ---------- | ------------------------------------------------------- |
| <Badge color="red">Unpaid</Badge>      | `unpaid`   | No payment has been received for this booking.          |
| <Badge color="yellow">Partial</Badge>  | `partial`  | Some payment has been received, but a balance remains.  |
| <Badge color="green">Paid</Badge>      | `paid`     | The booking has been paid in full.                      |
| <Badge color="orange">Refunded</Badge> | `refunded` | A refund has been issued for a previously paid booking. |

Payment status is independent of booking status. For example, a booking in `checked_in` status could have a payment status of `paid` (pre-paid), `partial` (deposit received), or `unpaid` (payment due on checkout).

## Unit Statuses

Unit statuses describe the current operational state of a hangar, tiedown, or ramp space.

| Status                                    | API Value     | Description                                                                                                                |
| ----------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------- |
| <Badge color="green">Available</Badge>    | `available`   | The unit is operational and can accept bookings.                                                                           |
| <Badge color="gray">Inactive</Badge>      | `inactive`    | The unit has been taken offline and is not available for booking. Typically used for seasonal closures or decommissioning. |
| <Badge color="orange">Maintenance</Badge> | `maintenance` | The unit is undergoing maintenance and cannot be booked. One or more maintenance records are linked.                       |

Units in `inactive` or `maintenance` status do not appear in the availability calendar as bookable options. A unit returns to `available` once maintenance is complete or the unit is ready for use.

## Maintenance Statuses

Maintenance records track work performed on FBO units. Each record moves through a three-stage lifecycle.

| Status                                    | API Value     | Description                                                                   |
| ----------------------------------------- | ------------- | ----------------------------------------------------------------------------- |
| <Badge color="blue">Scheduled</Badge>     | `scheduled`   | Maintenance has been planned with a start date. Work has not yet begun.       |
| <Badge color="yellow">In Progress</Badge> | `in_progress` | Work is actively underway on the unit.                                        |
| <Badge color="green">Completed</Badge>    | `completed`   | Maintenance work is finished. The unit can be returned to `available` status. |

### Maintenance Lifecycle

```mermaid theme={}
stateDiagram-v2
    [*] --> scheduled : Maintenance planned
    scheduled --> in_progress : Work begins
    in_progress --> completed : Work finished
```

### Maintenance Priorities

Each maintenance record is assigned a priority level that determines urgency and scheduling order.

| Priority                             | API Value | Description                                                                                          |
| ------------------------------------ | --------- | ---------------------------------------------------------------------------------------------------- |
| <Badge color="gray">Low</Badge>      | `low`     | Routine maintenance that can be scheduled at convenience.                                            |
| <Badge color="yellow">Normal</Badge> | `normal`  | Standard maintenance that should be completed within the planned window.                             |
| <Badge color="orange">High</Badge>   | `high`    | Important maintenance that should be prioritized over normal tasks.                                  |
| <Badge color="red">Urgent</Badge>    | `urgent`  | Critical maintenance requiring immediate attention. May require taking the unit offline immediately. |

## Till Statuses

Till statuses track the operational state of point-of-sale cash registers.

| Status                               | API Value  | Description                                                                   |
| ------------------------------------ | ---------- | ----------------------------------------------------------------------------- |
| <Badge color="green">Active</Badge>  | `active`   | The till is open and processing transactions.                                 |
| <Badge color="gray">Inactive</Badge> | `inactive` | The till exists but is not currently in use. It can be activated when needed. |
| <Badge color="green">Closed</Badge>  | `closed`   | The till has been closed out. The final balance has been reconciled.          |

## Invoice Statuses

Invoice statuses track the lifecycle of billing documents sent to customers.

| Status                                | API Value   | Description                                                    |
| ------------------------------------- | ----------- | -------------------------------------------------------------- |
| <Badge color="yellow">Pending</Badge> | `pending`   | The invoice has been created but not yet sent to the customer. |
| <Badge color="blue">Sent</Badge>      | `sent`      | The invoice has been delivered to the customer.                |
| <Badge color="green">Paid</Badge>     | `paid`      | The customer has paid the invoice in full.                     |
| <Badge color="red">Overdue</Badge>    | `overdue`   | The invoice due date has passed without full payment.          |
| <Badge color="red">Cancelled</Badge>  | `cancelled` | The invoice has been voided.                                   |

## Contract Statuses

Contract statuses track the state of service agreements between the FBO and its guests.

| Status                               | API Value   | Description                                                     |
| ------------------------------------ | ----------- | --------------------------------------------------------------- |
| <Badge color="gray">Draft</Badge>    | `draft`     | The contract is being prepared and has not yet been activated.  |
| <Badge color="green">Active</Badge>  | `active`    | The contract is in effect and governs the service relationship. |
| <Badge color="gray">Expired</Badge>  | `expired`   | The contract end date has passed.                               |
| <Badge color="red">Cancelled</Badge> | `cancelled` | The contract was terminated before its end date.                |

## Transaction Statuses

Transaction statuses indicate the processing state of financial transactions in the POS system.

| Status                                 | API Value   | Description                                             |
| -------------------------------------- | ----------- | ------------------------------------------------------- |
| <Badge color="green">Completed</Badge> | `completed` | The transaction was processed successfully.             |
| <Badge color="yellow">Pending</Badge>  | `pending`   | The transaction is awaiting processing or confirmation. |
| <Badge color="red">Failed</Badge>      | `failed`    | The transaction could not be processed.                 |
| <Badge color="orange">Reversed</Badge> | `reversed`  | A previously completed transaction has been reversed.   |

## Service Order Statuses

Service order statuses track ramp services requested for aircraft movements on the flight board. Each service order moves through a four-stage lifecycle.

| Status                                  | API Value     | Description                                              |
| --------------------------------------- | ------------- | -------------------------------------------------------- |
| <Badge color="yellow">Pending</Badge>   | `pending`     | The service has been requested but work has not started. |
| <Badge color="blue">In Progress</Badge> | `in_progress` | Work is actively underway on the service.                |
| <Badge color="green">Completed</Badge>  | `completed`   | The service has been performed and is finished.          |
| <Badge color="red">Cancelled</Badge>    | `cancelled`   | The service request was cancelled before completion.     |

### Service Order Lifecycle

```mermaid theme={}
stateDiagram-v2
    [*] --> pending : Service requested
    pending --> in_progress : Work begins
    in_progress --> completed : Work finished
    pending --> cancelled : Cancelled
    in_progress --> cancelled : Cancelled
```

A service order can be cancelled from `pending` or `in_progress` status. Once a service order reaches `completed` or `cancelled`, no further transitions are possible.

## Purchase Order Statuses

Purchase order statuses track procurement requests sent to vendors from draft through fulfillment.

| Status                                | API Value   | Description                                                                 |
| ------------------------------------- | ----------- | --------------------------------------------------------------------------- |
| <Badge color="gray">Draft</Badge>     | `draft`     | The purchase order is being prepared. Line items can still be edited.       |
| <Badge color="blue">Sent</Badge>      | `sent`      | The purchase order has been submitted to the vendor. Line items are locked. |
| <Badge color="green">Received</Badge> | `received`  | The ordered goods have been delivered and verified. Inventory is updated.   |
| <Badge color="red">Cancelled</Badge>  | `cancelled` | The purchase order has been voided. This is a terminal state.               |

### Purchase Order Lifecycle

```mermaid theme={}
stateDiagram-v2
    [*] --> draft : PO created
    draft --> sent : Sent to vendor
    sent --> received : Goods delivered
    draft --> cancelled : Cancelled
    sent --> cancelled : Cancelled
```

A purchase order can be cancelled from `draft` or `sent` status. Once a PO reaches `received` or `cancelled`, no further transitions are possible.

## Vendor Statuses

Vendor statuses indicate whether a vendor is available for new purchase orders.

| Status                               | API Value                   | Description                                                                                                       |
| ------------------------------------ | --------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| <Badge color="green">Active</Badge>  | `active` (is\_active = 1)   | The vendor is available for selection on new purchase orders.                                                     |
| <Badge color="gray">Inactive</Badge> | `inactive` (is\_active = 0) | The vendor has been deactivated and does not appear in vendor dropdowns for new POs. Existing POs are unaffected. |

Vendors can be toggled between `active` and `inactive` at any time. Deactivating a vendor preserves all historical purchase order data.

## Gift Card Statuses

Gift card statuses track the lifecycle of prepaid value cards issued to customers.

| Status                               | API Value  | Description                                                                                    |
| ------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------- |
| <Badge color="green">Active</Badge>  | `active`   | The gift card has a remaining balance and can be redeemed at the POS.                          |
| <Badge color="blue">Redeemed</Badge> | `redeemed` | The gift card balance has been fully used. No further redemptions are possible.                |
| <Badge color="gray">Expired</Badge>  | `expired`  | The gift card has passed its expiration date. It cannot be redeemed even if a balance remains. |

## Discount Statuses

Discount statuses indicate whether a discount code can be applied to orders.

| Status                              | API Value                                    | Description                                                                                      |
| ----------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| <Badge color="green">Active</Badge> | `active` (is\_active = 1)                    | The discount code is available for redemption, subject to validity dates and usage limits.       |
| <Badge color="gray">Expired</Badge> | `expired` (is\_active = 0 or past valid\_to) | The discount code is no longer valid. It has been deactivated or its validity window has closed. |

A discount also becomes effectively unavailable if its `used_count` reaches `max_uses`, even while the status remains active.

## Credit Statuses

Credit statuses track account-level credits issued to FBO customers.

| Status                              | API Value | Description                                                             |
| ----------------------------------- | --------- | ----------------------------------------------------------------------- |
| <Badge color="green">Active</Badge> | `active`  | The credit has a remaining balance and can be applied to future orders. |
| <Badge color="blue">Used</Badge>    | `used`    | The credit balance has been fully redeemed.                             |
| <Badge color="gray">Expired</Badge> | `expired` | The credit has passed its expiration date.                              |
| <Badge color="red">Voided</Badge>   | `voided`  | The credit has been manually cancelled. The balance is set to zero.     |

## Related

<CardGroup cols={2}>
  <Card title="FBO Point of Sale Reference" href="/reference/fbo-pos-reference">
    Order fields, payment methods, product catalog, and inventory tracking.
  </Card>

  <Card title="Manage FBO Bookings" href="/how-to/fbo/manage-bookings">
    Booking creation, tracking, and lifecycle management.
  </Card>

  <Card title="Manage FBO Units" href="/how-to/fbo/manage-units">
    Hangar, tiedown, and ramp space configuration and maintenance.
  </Card>

  <Card title="Manage FBO Ramp Services" href="/how-to/fbo/manage-ramp-services">
    Service order creation, assignment, and completion workflow.
  </Card>

  <Card title="Manage FBO Purchase Orders" href="/how-to/fbo/manage-purchase-orders">
    Purchase order creation, vendor assignment, and receiving.
  </Card>

  <Card title="Handle FBO Billing" href="/how-to/fbo/handle-fbo-billing">
    Invoices, rates, contracts, transactions, and customer billing.
  </Card>
</CardGroup>
