Issue invoice
Issue invoice on QB/QBox
Making sure you’re doing it on server side.
function issueInvoice(source, job, amount, reason)
local Player = QB.Functions.GetPlayer(source)
if not Player then return end
local businessAccounts = exports.fd_banking:getBusinessAccount(job)
if not businessAccounts then return end
exports.fd_banking:addInvoice(Player.PlayerData.citizenid, businessAccounts.name, 1, amount, reason, businessAccounts.id, false)
end
issueInvoice(1, 'police', 100, 'Fine for speeding') Issue invoice on ESX
Making sure you’re doing it on server side.
function issueInvoice(source, job, amount, reason)
local Player = ESX.GetPlayerFromId(source)
if not Player then return end
local businessAccounts = exports.fd_banking:getBusinessAccount(job)
if not businessAccounts then return end
exports.fd_banking:addInvoice(Player.identifier, businessAccounts.name, 1, amount, reason, businessAccounts.id, false)
end
issueInvoice(1, 'police', 100, 'Fine for speeding')