# start your framework after its own dependencies
ensure oxmysql
ensure ox_lib
ensure glitch-abstraction
ensure glitch-businesstabletRequirements#
| Framework | qbx_core (Qbox), QBCore or ESX Legacy. Config.Framework = 'auto' picks whichever is installed. |
| Resources | ox_lib, oxmysql, glitch-abstraction (the Glitch Studios bridge for framework and inventory calls) |
| Database | MariaDB or MySQL. No SQL import is needed. |
| Optional | ox_inventory, sd-tablet, sd-phone, LB Tablet, LB Phone, a banking resource |
Optional resources are detected at run time.
| Resource | What it adds |
|---|---|
| sd-tablet (with sd-phone) | The tablet opens as an app on sd-tablet. |
| LB Tablet | The tablet opens as an app on LB Tablet. |
| ox_inventory | Menu items and their images, and the job_application item. |
| sd-phone | The customer phone app for each business, invoices for billed sales and memberships, paycheck texts and bank app rows. |
| LB Phone | Paycheck texts and bank app rows. |
| A banking resource | The business (society) account that sales, wages and memberships go through: omes_banking, Renewed-Banking, qb-banking, qb-management, okokBanking or esx_addonaccount. |
Without sd-tablet or LB Tablet the tablet uses its own screen.
Installation steps#
Put
glitch-businesstabletandglitch-abstractionin your resources folder. The folder nameglitch-businesstabletis case-sensitive and must not be renamed.Add the job application item to
ox_inventory/data/items.lua:['job_application'] = { label = 'Job Application', weight = 20, stack = true, close = true, consume = 0, description = 'A job application form. Use it to fill it in and send it.', server = { export = 'glitch-businesstablet.UseApplication' }, },For the standalone screen, you can also give staff a tablet item. The item name is up to you:
['business_tablet'] = { label = 'Business Tablet', weight = 500, stack = false, close = true, client = { export = 'glitch-businesstablet.OpenTablet' }, },Set
Config.UI.Mode,Config.IntegrationsandConfig.Payrollinshared/config.lua.Add the resource to
server.cfgafter its dependencies, and before the scripts that register businesses:ensure ox_lib ensure oxmysql ensure qbx_core ensure ox_inventory ensure glitch-abstraction ensure sd-phone ensure sd-tablet ensure glitch-businesstabletOn Qbox, turn off qbx_core's startup clean-up in
server.cfg:set qbx:cleanPlayerGroups "false"The txAdmin Qbox recipe sets it to
"true". qbx_core runs that clean-up before the tablet has put its ranks back, so anyone on a rank made on the tablet loses the job on every restart. The tablet runs the same clean-up itself once its ranks are back, and prints a warning on start while the convar is still"true".Register each business from its own resource with the
RegisterBusinessexport. The tablet has no list of businesses in its config. See Registering a business.Restart the server. The console prints
Database OKonce the tables are ready andRegistered business <job>for each business.
The 13 businesstablet_* tables are created on the first start. Columns added in an update are added on the next start, and nothing is ever dropped.
[!NOTE]
shared/config.lua,server/custom/andclient/custom/stay open under escrow. The custom folders hold the calls to banking, billing, phone, logs, notifications and tablet resources, so you can point them at your own.
Updating#
Replace everything except shared/config.lua, server/custom/ and client/custom/, then merge any new keys from the new defaults into your config. Restart glitch-businesstablet. Businesses whose resources register on the tablet's onResourceStart (as in the Examples page) come back by themselves; restart any others.