Billing
Billing modes (auto, builtin, invoice, none), society account and internal cash box.
#Choosing the mode
Setting: Config.BillingMode in config.lua.
| Value | Behaviour |
|---|---|
auto (default) | builtin if a society account is usable, otherwise invoice if an invoice system exists, otherwise billing unavailable |
builtin | The customer pays in the script window (bank or cash). Balance checked before and after, deposit into the job account, automatic refund on failure |
invoice | Framework invoice (Vision: core CreateInvoice; others: Config.Bridge.Standalone.createInvoice function), closed when sent |
none | No 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:
| Value | System |
|---|---|
vision | Vision core society account |
renewed | Renewed-Banking |
qb-banking | qb-banking |
okok | okokBanking |
esx_society | esx_society |
qbx | qbx_management |
internal | The 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).