receiptFacility Billing

Facility invoice, payment sync, and external billing bridge guide for 0r-ambulancejob

Facility billing lets facility staff create and manage medical invoices from the facility panel. Invoices are stored by 0r-ambulancejob first, so the feature can work even when you do not use a separate billing/payment resource.

Custom external billing calls are isolated in modules/billing/server.lua. By default, the bridge detects:

  • okokBilling

  • qb-phone for QBCore/Qbox servers

If no supported billing resource is started, invoices stay manual and staff can mark them paid from the facility panel after role-play payment.

Configuration

Billing settings are inside config/facility.lua:

Config.facility.runtime.billing = {
    enabled = true,
    depositPaidInvoicesToFacilityAccount = true,
    presets = {
        { key = "revive",     label = "facility_billing_preset_revive",     amount = 750 },
        { key = "treatment",  label = "facility_billing_preset_treatment",  amount = 500 },
        { key = "surgery",    label = "facility_billing_preset_surgery",    amount = 2500 },
        { key = "scan",       label = "facility_billing_preset_scan",       amount = 900 },
        { key = "blood_test", label = "facility_billing_preset_blood_test", amount = 350 },
    },
}
  • enabled: enables or disables facility invoice creation.

  • depositPaidInvoicesToFacilityAccount: when true, paid invoices are deposited into the facility account.

  • presets: quick invoice options shown in the facility billing UI.

Database

Billing uses the 0resmon_ambulance_facility_invoices table.

databaseDatabase SQLchevron-right

Custom Payment Sync

When a custom billing resource confirms payment, call this from server-side code:

Client-triggered calls to this event are ignored.

Server Exports

CreateFacilityInvoice accepts:

You can also pass patient_identifier and patient_name instead of patient_source when the patient is not online.

Last updated