π’ Adding a New Business to BizPad
This step-by-step guide walks you through adding a new business to the BizPad system in XR-MDT, including branding (logo, colors), permissions, and troubleshooting common problems.π Prerequisites
Before you begin, make sure you have:- β
A job defined in your framework (
qb-core/shared/jobs.luaor ESXjobstable) - β
A bank account for the business in your banking system (e.g.
qb-banking,Renewed-Banking,xr-bank) - β
Access to the file
configs/config.business.lua - β
(Optional) A logo image (
.png,.webp, or.jpg)
π How Does BizPad Work?
BizPad is the XR-MDT module designed for businesses and companies. It provides:| Feature | Description |
|---|---|
| Dashboard | Revenue, expenses, statistics, weekly charts |
| Employees | Full HR: hire, fire, promote, demote, suspend, badge assignment |
| Invoices | Create and send invoices to players (real-time accept/reject) |
| Tariff | Manage a price list / service catalog |
| Notes | Internal HR notes per employee |
π§ Step 1 β Add the Job to AllowedJobs
Open configs/config.business.lua and add the job name to the AllowedJobs list:
[!IMPORTANT] The name must exactly match the job name in your framework. Ifshared/jobs.lua(QB) has['autoexotica'], you must write'autoexotica'here β not'AutoExotica'or'auto_exotica'.
π§ Step 2 β Add Branding (Logo, Name, Colors)
Add an entry to theJobSettings table to give your business a custom logo, display name, and color theme:
.png, .webp, .jpg
[!TIP]
If you donβt add a JobSettings entry, the business will still work β it will use the frameworkβs job label as the name and show no logo. Branding is optional.
π§ Step 3 β Configure Permissions (Grades)
You have two approaches to configure permissions:Option A β Use Default Permissions
If you donβt define a custom block for your business, the system automatically uses the['default'] grades. This is the simplest option for standard businesses.
The default config provides 5 grade levels (0β4):
| Grade | Role | Key Permissions |
|---|---|---|
0 | Employee | View dashboard, create invoices, view tariff |
1 | Experienced | Same as grade 0 |
2 | Manager | + employees_manage, invoice_custom, tariff_manage, admin |
3 | Owner | Full access |
4 | Owner+ | Full access |
[!TIP] If your business uses a standard 5-grade hierarchy and doesnβt need special permissions β you donβt need to do anything else. Just add it toAllowedJobsand optionallyJobSettings.
Option B β Define Custom Permissions Per Business
For businesses with a non-standard hierarchy, add a dedicated block inGrades:
[!WARNING] Grade keys must be strings ('0','1','2', etc.), not numbers. The system looks up grades usingtostring(job.grade.level). Using numeric keys will cause a permissions lookup failure and the BizPad will appear empty or broken.
π§ Step 4 β Bank Account Setup
The BizPad dashboard displays balance, revenue, and transaction history. This data comes from your banking system. The bank account must exist under the job name.Automatically Supported Banking Systems
| Banking Resource | Supported |
|---|---|
qb-banking | β Auto-detected |
Renewed-Banking | β Auto-detected |
xr-bank | β Auto-detected |
qbx_management | β Auto-detected |
esx_addonaccount | β Auto-detected |
QB-Core / QBX
The bank account is usually created automatically byqb-management or qb-banking when the job is defined in shared/jobs.lua. No extra steps needed.
ESX
You must manually insert the society account:
[!CAUTION]
If the bank account doesnβt exist, the dashboard will show $0 for balance, revenue, and expenses. This is the #1 reason businesses appear broken. Always verify the account exists before reporting a bug.
π§ Step 5 β Database Tables
The BizPad relies on two database tables that are created byxr-mdt.sql:
| Table | Purpose |
|---|---|
business_invoices | Stores all invoices (pending, paid, rejected) |
business_tariffs | Stores the price list / service catalog |
[!WARNING]
If these tables donβt exist, the invoice and tariff tabs will crash. Run the full xr-mdt.sql migration if you havenβt already.
Verify Tables Exist
π§ Step 6 β Adjust Limits (optional)
At the bottom ofconfig.business.lua youβll find global limits:
[!NOTE] Limits are global β they apply equally to all businesses. Per-business limits are not currently supported.
π§ Step 7 β Restart & Verify
autoexotica job and type /bizpad.
β Checklist
| Step | Status |
|---|---|
| Job defined in framework (qb/esx) | β |
Added to Config.Business.AllowedJobs | β |
(Optional) Branding added in JobSettings | β |
(Optional) Logo placed in web/dist/images/ | β |
| Permissions configured (default or custom) | β |
| Bank account exists in banking system | β |
(ESX) Society account inserted into addon_account | β |
Database tables exist (business_invoices, business_tariffs) | β |
| Resource restarted | β |
π₯ Troubleshooting β Common Business Issues
BizPad opens but shows empty dashboard / $0 everywhere
Cause: The bank account doesnβt exist or your banking resource uses a different table name. Fix:- Verify the bank account exists in your banking system under the exact job name
- If your banking system uses a non-standard table, override
Bridge.Bank.GetBalanceineditable/server/main.lua:
βNo Accessβ notification when opening BizPad
Cause: The playerβs job name doesnβt match any entry inAllowedJobs, or the permissions callback returned nil.
Fix:
- Check the playerβs exact job name in F8 console or admin panel
- Ensure itβs exactly spelled the same in
AllowedJobs - Make sure
Config.EnableBusiness = trueinconfig.main.lua
Employee list is empty even though workers are assigned
Cause: Grade mismatch between framework and config, or the database query is filtering out employees. Fix:- Ensure the framework job grades match the
Gradeskeys in your config - For QB: verify that
players.jobJSON contains the correct job name - For ESX: verify the
users.jobcolumn matches - Check F8 console for SQL errors
Invoices not being created / βunknown columnβ error
Cause: Thebusiness_invoices table is missing or has an outdated schema.
Fix:
Employee management actions fail silently
Cause: The acting playerβs grade is lower than or equal to the targetβs grade. The system prevents you from promoting/firing someone at or above your own rank. Fix: This is intentional behavior. Only higher-ranked employees can manage lower-ranked ones. The owner (highest grade) can manage everyone.Finance charts show no data
Cause: Your banking resource doesnβt write to thebank_statements table, which the revenue/expense queries depend on.
Fix: Override the finance queries in editable/server/business.lua to use your banking systemβs transaction table:
Logo not displaying
Cause: Wrong file path, wrong format, or the file is missing fromweb/dist/.
Fix:
- Ensure the file is placed at
web/dist/images/biz_yourjob.webp(or.png/.jpg) - Ensure the
LogoFilepath inJobSettingsmatches exactly (case-sensitive) - Clear your FiveM cache:
AppData/Local/FiveM/FiveM.app/data/cache - Restart the resource
π BizPad Permissions Reference
| Permission | Description |
|---|---|
dashboard_view | Access the dashboard with financials and statistics |
employees_view | Browse the employee list |
employees_manage | Hire, fire, promote, demote, suspend employees |
invoices_create | Create invoices and send them to players |
invoices_view | Browse invoice history |
invoice_custom | Create invoices with a custom (freeform) amount |
tariff_view | Browse the service price list |
tariff_manage | Add, edit, and delete tariff entries |
admin | Full administrative permissions (includes all of the above) |
π― Minimal Example β Adding a Business in 3 Lines
The simplest way to add a new business (no custom branding, default permissions):
[!TIP]
If your business has a standard hierarchy (0 = employee, 1 = experienced, 2 = manager, 3β4 = owner), adding it to AllowedJobs is all you need. Default permissions work immediately.
π― Full Example β Business with Custom Branding
Β© XR-Core Systems | Professional FiveM Resources
