> For the complete documentation index, see [llms.txt](https://ovatheme.gitbook.io/brw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ovatheme.gitbook.io/brw/brw-menu/manage-bookings.md).

# Manage Bookings

The **Manage Bookings** page is BRW's own order list — it shows only rental orders and exposes rental-specific data (pickup/dropoff dates, locations, deposit status, vehicle ID) that the default WooCommerce Orders screen doesn't surface. Every row is one WooCommerce order that contains at least one rental product.

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><strong>Smart Filters</strong><br>Filter by date range, location, product, vehicle, status, or customer name</td></tr><tr><td><strong>Inline Status Update</strong><br>Change order status without leaving the list — no need to open each order</td></tr><tr><td><strong>Quick Preview</strong><br>Preview full order details in a modal without navigating away</td></tr><tr><td><strong>Calendar Export</strong><br>Sync bookings to Google Calendar or download .ics files</td></tr></tbody></table>

{% hint style="info" %}
**Relationship with WooCommerce → Orders:** Both pages show the same underlying WooCommerce orders. Manage Bookings is a filtered, rental-aware view. Editing an order from either page modifies the same order object.
{% endhint %}

### 1: Filter Bar

Narrow down which bookings appear in the list

<figure><img src="/files/sjQwnuzI3uYwn8EdrJab" alt=""><figcaption></figcaption></figure>

Each filter is only shown if its corresponding column is enabled in **WooCommerce → Settings → Booking & Rental → Order Settings**. Setting a column position to `0` hides both the column and the filter for that field.

| Filter Field          | Type             | URL Parameter      | Description                                                                                                                                                                                             |
| --------------------- | ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Order ID**          | Text             | `order_id`         | Filter by exact WooCommerce order number.                                                                                                                                                               |
| **Customer Name**     | Text             | `customer_name`    | Partial match on billing first name + last name. Also matches company name and display name for guest/company orders.                                                                                   |
| **Search By**         | Select           | `search_by`        | Controls how the date range is interpreted: `from_date` = pickup date must fall within the range; `to_date` = drop-off date must fall within the range; empty = any overlap with the range is included. |
| **From Date**         | Date-time picker | `from_date`        | Start of the date range. Works together with "Search By" and "To Date".                                                                                                                                 |
| **To Date**           | Date-time picker | `to_date`          | End of the date range.                                                                                                                                                                                  |
| **Vehicle**           | Select           | `vehicle_id`       | Filter by vehicle ID (`id_vehicle` meta). Dropdown is populated from all BRW vehicle posts.                                                                                                             |
| **Pick-up Location**  | Select           | `pickup_location`  | Filter by exact pickup location name. Dropdown is populated from all BRW pickup location posts.                                                                                                         |
| **Drop-off Location** | Select           | `dropoff_location` | Filter by exact drop-off location name.                                                                                                                                                                 |
| **Choose Product**    | Select           | `product_id`       | Filter by specific rental product. Dropdown lists all BRW rental products.                                                                                                                              |
| **Order Status**      | Select           | `order_status`     | Filter by WooCommerce order status. Options: Completed, Processing, Pending payment, On hold, Cancel, Closed.                                                                                           |

{% hint style="warning" %}
**Date Range Behaviour:**

* **Search By = From date:** pickup date must be between From and To
* **Search By = To date:** drop-off date must be between From and To
* **Search By = (empty):** booking overlaps with the date range in any way
  {% endhint %}

### 2: Table Columns

What each column displays and how it is populated

<figure><img src="/files/Od0AI5Ls3lqXYimjjpm1" alt=""><figcaption></figcaption></figure>

| Column           | Default Position | What it Shows                                                                                                               |
| ---------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Order**        | 1                | Quick-action icons + clickable order number link. See Order Column Actions below.                                           |
| **Customer**     | 2                | Billing name (First + Last). Falls back to company name, then WordPress display name for guest/company orders.              |
| **Time**         | 3                | Pickup date and time `@` Drop-off date and time. For deposit remaining orders, shows an "Original Order #xxx" link instead. |
| **Location**     | 4                | Pickup location name `@` Drop-off location name. If only one is set, shows that one alone.                                  |
| **Deposit**      | 5                | Deposit payment status badge. Only shown when the order uses the deposit feature. See Deposit Column.                       |
| **Insurance**    | 6                | Insurance status badge. Only shown when the order includes insurance. See Insurance Column.                                 |
| **Vehicle**      | 7                | The `id_vehicle` meta value — the vehicle identifier assigned to the rental item.                                           |
| **Product**      | 8                | Rental product name(s) as a link to the product edit screen. Orders with multiple rental items show them stacked.           |
| **Order Status** | 9                | <p>Inline \<select> dropdown showing all WooCommerce order statuses. Change and it </p><p>saves immediately via AJAX.</p>   |

{% hint style="info" %}
**Column order** is set in WooCommerce → Settings → Booking & Rental → Order Settings. The position number (1–9) determines the display order. Set to `0` to hide both the column and its filter.
{% endhint %}

### 3: Order Column Actions

The quick-action icons that appear before the order number

#### **Preview**

Opens the **Order Preview Modal** — a lightweight overlay showing billing details, booking meta, and order totals without leaving the list page.&#x20;

<figure><img src="/files/rdwvQdF8wdyxCKwxKq8R" alt=""><figcaption></figcaption></figure>

#### **Sync Google Calendar**

Syncs *this individual order* to Google Calendar. Only appears when:

* A **Google API Key** is configured (WooCommerce → Settings → BRW → Google & Map)
* A **Google Calendar Client ID** is configured
* The order has not already been synced

<figure><img src="/files/RTiOx8UbJEusm9zsK3Q0" alt=""><figcaption></figcaption></figure>

#### Download iCal

Downloads a `.ics` calendar file for this individual order. Visible when the order has not yet been synced to Google Calendar . The .ics file can be imported into any calendar application (Apple Calendar, Outlook, etc.).

<figure><img src="/files/9m4dsxgK5Hni7DOYa8zG" alt=""><figcaption></figcaption></figure>

#### #XXXX Order Number Link

Clicking the bold order number navigates to the full WooCommerce order edit screen (`admin.php?page=wc-orders&action=edit&id=xxx`). From there you can edit all order details, add notes, issue refunds, etc.

{% hint style="warning" %}
**Trashed orders:** If an order has been moved to trash (status = "trash"), only the bold order number is shown — the Preview, Sync, and Download icons are hidden.
{% endhint %}

### 4: Deposit Column

The Deposit column is only populated for orders that used the deposit payment feature. For regular full-payment orders the cell is empty.

| Badge                                                 | Meaning                                                                                                       | Condition                                                                       |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| <mark style="color:$warning;">Partial Payment</mark>  | The customer paid only the deposit. A remaining balance is owed. No "Remaining Invoice" has been created yet. | `ovabrw_remaining_amount` > 0 AND no linked remaining invoice for this item     |
| <mark style="color:$primary;">Original Payment</mark> | The deposit has been paid AND a "Remaining Invoice" order has already been created and linked to this item.   | `ovabrw_remaining_amount` > 0 AND linked remaining invoice exists for this item |
| <mark style="color:$success;">Full Payment</mark>     | The full amount was collected (deposit = 100% of order total, no remaining balance).                          | `ovabrw_remaining_amount` = 0                                                   |

{% hint style="info" %}
**Remaining Invoice link:** When an "Original Payment" or "Partial Payment" badge is shown alongside a linked remaining invoice, a button like *"Remaining Invoice #1043"* also appears in the cell — click it to open that invoice order.
{% endhint %}

### 5: Insurance Column

The Insurance column is only populated when the order has an insurance amount recorded. Empty for orders without insurance.

| Badge                                                   | Meaning                                                                                                            | Condition              |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---------------------- |
| <mark style="color:$warning;">Received</mark>           | The customer paid an insurance fee as part of the order.                                                           | `insurance_amount` > 0 |
| <mark style="color:$success;">Paid for Customers</mark> | Insurance is included but the store absorbs the cost — the customer was not charged for it (insurance amount = 0). | `insurance_amount` = 0 |

### 6: Order Status Column

Update WooCommerce order status inline without opening the order

**Inline Status Dropdown**

Each row has a `<select>` showing all WooCommerce order statuses. Changing the value triggers an AJAX request to update the order status immediately — no page reload needed.

{% hint style="info" %}
**Permission check:** The AJAX handler verifies `publish_posts` capability. Users without this permission will see an error: "You don't have permission to update."
{% endhint %}

### 7: Add to Calendar

Export filtered bookings to Google Calendar or download as .ics

<div><figure><img src="/files/BDKnlHLqshlTj6UeIsmI" alt=""><figcaption></figcaption></figure> <figure><img src="/files/8kkSkHmPAdWvsYw7iW1q" alt=""><figcaption></figcaption></figure></div>

The **Add to Calendar** button appears in the page header whenever there are bookings in the list. It opens a slide-in panel for bulk calendar operations on a date range of bookings.

#### **Pickup Date Range**

Set a **From date** and **To date** to define which bookings are exported. Both fields filter by **pickup date** — only orders whose pickup date falls within this range are included.

{% hint style="warning" %}
**Both fields are required** (marked `ovabrw-input-required`). The export will not proceed if either is empty.
{% endhint %}

#### Sync Google Calendar

Syncs all bookings in the selected date range to the connected Google Calendar. Button only appears when both **Google API Key** and **Google Calendar Client ID** are configured in WooCommerce → Settings → BRW → Google & Map.

{% hint style="info" %}
**Progress bar:** Shows real-time sync progress — X / total orders synced. After completion, a log shows success/failure per order.
{% endhint %}

#### Download Ical (.ics)

Downloads a `.ics` file containing all bookings in the selected pickup date range. The file can be imported into any calendar app (Google Calendar, Apple Calendar, Outlook). Each booking becomes one calendar event with pickup date as start and drop-off date as end.

### 8: Pagination & Sorting

Navigate and sort the booking list

#### Pagination

The list shows **20 bookings per page** by default. Standard WordPress pagination controls appear below the table. The per-page value can be overridden via the `ovabrw_booking_list_per_page` filter hook.

{% hint style="info" %}
**Filter hook:** `add_filter( 'ovabrw_booking_list_per_page', fn() => 50 );`
{% endhint %}

#### Sorting

The **Order** (ID) column is sortable — click the column header to toggle ascending / descending. The URL parameters `orderby=order_id&order=asc` control the sort. Additional sortable columns can be added via the `ovabrw_booking_list_get_sortable_columns` filter hook.

#### Default Sort Order

Bookings are returned from the database with newest first, then the list is re-sorted client-side by the current sort parameters. The default view shows the most recently created orders at the top.

### 9: Column Configuration

How to show, hide, and reorder columns

Every column in Manage Bookings is driven by a position number stored in WordPress options. These are configured in **WooCommerce → Settings → Booking & Rental → Order Settings**.

| Column       | Default | Set to 0 to hide |
| ------------ | ------- | ---------------- |
| Order (ID)   | 1       | ✓                |
| Customer     | 2       | ✓                |
| Time         | 3       | ✓                |
| Location     | 4       | ✓                |
| Deposit      | 5       | ✓                |
| Insurance    | 6       | ✓                |
| Vehicle      | 7       | ✓                |
| Product      | 8       | ✓                |
| Order Status | 9       | <p></p><p>✓</p>  |

{% hint style="warning" %}
**Effect of hiding a column:** Setting a column position to `0` hides both the column in the table AND removes its corresponding filter from the filter bar. The data is still stored on the order — it's just not displayed here.
{% endhint %}

{% hint style="info" %}
**Reordering columns:** Change the position numbers to reorder columns. Numbers don't need to be consecutive — the columns are sorted by their position value. For example, setting Customer = 5, Time = 1 would display Time before Customer.
{% endhint %}
