diff --git a/server.lua b/server.lua index b539f1b..36387ba 100644 --- a/server.lua +++ b/server.lua @@ -111,13 +111,16 @@ RegisterServerEvent("jim-payments:server:Charge", function(citizen, price, billt {billed.PlayerData.citizenid, amount, biller.PlayerData.job.name, biller.PlayerData.charinfo.firstname, biller.PlayerData.citizenid}) TriggerClientEvent('qb-phone:RefreshPhone', billed.PlayerData.source) elseif Config.PhoneType == "gks" then - MySQL.Async.execute('INSERT INTO gksphone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (@citizenid, @amount, @society, @sender, @sendercitizenid)', { - ['@citizenid'] = billed.PlayerData.citizenid, - ['@amount'] = amount, - ['@society'] = biller.PlayerData.job.name, - ['@sender'] = biller.PlayerData.charinfo.firstname, - ['@sendercitizenid'] = biller.PlayerData.citizenid - }) + MySQL.Async.execute('INSERT INTO gksphone_invoices (citizenid, amount, society, sender, sendercitizenid, label) VALUES (@citizenid, @amount, @society, @sender, @sendercitizenid, @label)', { + ['@citizenid'] = billed.PlayerData.citizenid, + ['@amount'] = amount, + ['@society'] = biller.PlayerData.job.name, + ['@sender'] = biller.PlayerData.charinfo.firstname, + ['@sendercitizenid'] = biller.PlayerData.citizenid, + ['@label'] = biller.PlayerData.job.label, + }) + TriggerClientEvent('gksphone:notifi', src, {title = 'Billing', message = 'Invoice Successfully Sent', img= '/html/static/img/icons/logo.png' }) + TriggerClientEvent('gksphone:notifi', billed.PlayerData.source, {title = 'Billing', message = 'New Invoice Recieved', img= '/html/static/img/icons/logo.png' }) end TriggerClientEvent('QBCore:Notify', src, 'Invoice Successfully Sent', 'success') TriggerClientEvent('QBCore:Notify', billed.PlayerData.source, 'New Invoice Received')