TC ScriptDocumentation

Billing

Billing modes (auto, builtin, invoice, none), society account and internal cash box.

#Choosing the mode

Setting: Config.BillingMode in config.lua.

ValueBehaviour
auto (default)builtin if a society account is usable, otherwise invoice if an invoice system exists, otherwise billing unavailable
builtinThe customer pays in the script window (bank or cash). Balance checked before and after, deposit into the job account, automatic refund on failure
invoiceFramework invoice (Vision: core CreateInvoice; others: Config.Bridge.Standalone.createInvoice function), closed when sent
noneNo billing (for testing)

Config.CashLimit (default 2500) sets the maximum amount payable in cash; above it, bank only. 0 disables the limit.

#Job account

Config.Bridge.Society chooses where the money goes. With auto, the script uses whichever is running:

ValueSystem
visionVision core society account
renewedRenewed-Banking
qb-bankingqb-banking
okokokokBanking
esx_societyesx_society
qbxqbx_management
internalThe script's internal cash box (tc_mech_funds table)

#Internal cash box

With none of these systems, the script uses its internal cash box. Staff can view and withdraw:

Texte
/mecafonds <job>              view the balance
/mecafonds <job> <amount>     withdraw an amount

#Billing blocked?

If nothing is usable, billing is blocked with a clear message. Type /mecadiag: the report shows what is missing (detected mode, account found or not).

Partners

With tc-compta started (Config.Integrations.compta = true), partner contracts apply to billing (discounts).

Last updated : 7 November 2026© 2026 TC Script