# Management Tab

Management Tab — moh-billing

The Management tab gives boss-rank members of a society direct control over the society's fund balance. It is only visible and accessible to players who pass the boss grade check.

### What it shows

* **Society Fund Balance** — the current total stored in the `management_funds` database table for the player's job.
* **Withdraw panel** — enter an amount and click Withdraw to move money from the society fund into your personal bank account.
* **Deposit panel** — enter an amount and click Deposit to move money from your personal bank account into the society fund.

### Withdraw

Moves money *from* the society fund *to* the boss's bank account.

1. Open `/billing` and click the **Management** tab.
2. Enter the amount in the Withdraw input field.
3. Click **Withdraw**.
4. The balance display updates immediately on success.

Server-side validations before processing:

* Player must be boss grade (re-checked on server).
* Amount must be greater than zero.
* Amount must not exceed `Config.MaxWithdrawPerAction` (if set).
* Society fund must have sufficient balance.

### Deposit

Moves money *from* the boss's bank account *to* the society fund.

1. Open `/billing` and click the **Management** tab.
2. Enter the amount in the Deposit input field.
3. Click **Deposit**.
4. The balance display updates immediately on success.

Server-side validations before processing:

* Player must be boss grade.
* Amount must be greater than zero.
* Amount must not exceed `Config.MaxDepositPerAction` (if set).
* Player must have sufficient funds in their bank account.

### Per-action limits

You can cap how much a boss can move in a single action to prevent accidental large transfers:

```
Config.MaxWithdrawPerAction = 50000   -- max $50,000 per withdrawal
Config.MaxDepositPerAction  = 50000   -- max $50,000 per deposit
-- Set to 0 to remove the cap entirely
Config.MaxWithdrawPerAction = 0
```

### Balance display

The displayed balance always reflects the live database value. It is refreshed automatically after every:

* Invoice payment (when `MoneyDestination` is `'management'` or `'split'`)
* Successful withdrawal
* Successful deposit

### Database storage

Funds are stored in the `management_funds` table (configurable via `Config.ManagementTable`). Each society has one row identified by `job_name`. This table is the same one used by qb-management and other QBCore boss-menu resources, so existing fund balances are preserved if you migrate to moh-billing.

```
SELECT * FROM management_funds WHERE job_name = 'police';
-- Returns: id | job_name | amount | type
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mohssins.gitbook.io/mohscriptsdocs/moh-billing/management-tab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
