memoServer Exports

This is where you'll find all the Server Exports, these will only be available on the server and can not be called on the client. For security purposes, never trust the client as they say ;)

Get Received Invoices

QBCore Example

--- server.lua
--- This is how you'll do it on your QBCore server.
local characterId = QBCore.Functions.GetPlayer(source)?.PlayerData.citizenid
local fetched, invoices = exports["skeexs_invoices"]:GetReceivedInvoices(characterId)

--- This will return true if the player has any invoices to fetch.
if fetched then
    --- this will only print if "fetched"-variable is true, and it has fetched.
    print("Found invoices", invoices)
    
    --// add your code here //
else
    print("Couldn't find any invoices for player " .. characterId)
end

ESX Example

Get Sent Invoices

QBCore Example

ESX Example

Create Invoice

Example

This will be particularly useful for lets say if you want to make this Invoice script compatible with your Jobpanel/Jobsystem.

Get Invoice from UUID

Code example

Delete invoice

Code example

Explanation

Here we need a valid id, a valid invoice that will say. It fetches the invoices from the database to then delete it from database. Then return if it has been removed, and returns a message, if you want to use that. A valid use case for this could be as following:

Use case

Last updated