Exports & Usage

Create Bill (Online Player)

exports["Domas_Billing"]:CreateExternalBill({
target = 19, -- Server ID
amount = 500,
reason = "Late Submission",
society = "police",
author_identifier = "steam:110000112345678",
author_name = "John Admin",
deadline = "2025-06-25", -- optional
appealable = 1, -- optional
transferable = 0, -- optional
-- playerCut/societyCut optional; otherwise taken from config
})

Create Bill (Offline Player)

exports["Domas_Billing"]:CreateExternalBillOffline({
identifier = "AED70434",
amount = 10000,
reason = "Late loan payment",
society = "police",
author_identifier = "SERVER",
author_name = "AutoSystem",
appealable = 0,
transferable = 0,
})

Open menu (Client Side)

exports["Domas_Billing"]:OpenBillingMenu()

Open menu (Server Side)

exports["Domas_Billing"]:OpenBillingMenuFromServer(source)

Get how much this player has created bills

local count = exports['Domas_Billing']:GetPlayerSentBills('CITIZENID')

Get how much player has created bills (money)

local paidTotal = exports['Domas_Billing']:GetPlayerSentBillsAmount('AED70434', 'paid')
local unpaidTotal = exports['Domas_Billing']:GetPlayerSentBillsAmount('AED70434', 'unpaid')

Get job stats

local stats = exports['Domas_Billing']:GetBillingStatsByJob('police')
if stats then
print("Total bills: " .. stats.total_bills)
print("Paid bills: " .. stats.total_paid)
print("Total money got" .. stats.total_money_got)
else
print("No stats")
end

Get how much unpaid bills there are for society

exports['Domas_Billing']:GetUnpaidAndAppealedBillCountBySociety('police')