QBCore

This guide covers setup and framework integration for servers running QBCore (qb-core).


1. Framework Setting

In config.lua, set:

Lua
Config.Framework = 'qb' -- or 'auto'

2. Native Boss Access Control

finals_management natively reads your job configuration from QBCore.Shared.Jobs in qb-core/shared/jobs.lua:

  • Any grade with isboss = true automatically receives full management permissions (roster management, hiring, promotions, salary adjustments, and disciplinary tools).
  • Other employees can access the tablet if Config.BossMenu.allowEmployeeTablet = true is enabled, allowing them to view personal duty logs and department rosters.

Example job configuration in qb-core/shared/jobs.lua:

Lua
['police'] = {
    label = 'Law Enforcement',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = { name = 'Cadet', payment = 50 },
        ['1'] = { name = 'Officer', payment = 75 },
        ['2'] = { name = 'Sergeant', payment = 100 },
        ['3'] = { name = 'Lieutenant', payment = 125 },
        ['4'] = { name = 'Chief', isboss = true, payment = 150 },
    },
},

3. Preventing Duplicate Paychecks

If you run the standard qb-defaultpaycheck or have the paycheck loop active in qb-smallresources:

  1. Open qb-smallresources/config.lua or qb-core/config.lua.

  2. Disable the default paycheck loop to prevent players from receiving duplicate payouts:

    Lua
    Config.Paycheck = false
  3. Let finals_management handle your server's payroll with receipt slips and treasury accounting.


4. Optional: Routing Paychecks via Framework

If you prefer to let qb-core retain its internal interval while using finals_management for slip generation and pending collection:

  1. Set Config.AutoPaycheck.mode = 'framework' in config.lua.

  2. Open qb-core/server/player.lua and locate the paycheck loop.

  3. Replace the standard deposit call with:

    Lua
    exports['finals_management']:AddPendingPaycheck(self.PlayerData.source, payment, self.PlayerData.job.name)

5. Offline Roster Integration

When Config.BossMenu.includeOfflineRoster = true is active, finals_management queries the QBCore players table:

  • Reads offline employees by charinfo and job.name.
  • Allows management to fire or promote employees even when they are offline in the city.