mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-19 07:16:03 +01:00
Beta GKSPhone invoice support
This commit is contained in:
@@ -34,7 +34,7 @@ Config.PedPool = {
|
|||||||
[14] = `U_F_M_CasinoShop_01`,
|
[14] = `U_F_M_CasinoShop_01`,
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.Gabz = false -- "true" to enable Gabz Banking locations
|
Config.Gabz = true -- "true" to enable Gabz Banking locations
|
||||||
Config.useATM = true -- Enable this to use my ATM's
|
Config.useATM = true -- Enable this to use my ATM's
|
||||||
Config.useBanks = true -- Enable this to use my banking stuff
|
Config.useBanks = true -- Enable this to use my banking stuff
|
||||||
Config.BankBlips = true -- Enable this if you disabled qb-banking and need bank locations
|
Config.BankBlips = true -- Enable this if you disabled qb-banking and need bank locations
|
||||||
@@ -44,6 +44,10 @@ Config.PhoneBank = true -- Set this to false to use the popup payment system FOR
|
|||||||
-- This doesn't affect Cash payments as they by default use confirmation now
|
-- This doesn't affect Cash payments as they by default use confirmation now
|
||||||
-- This is helpful for phones that don't support invoices well
|
-- This is helpful for phones that don't support invoices well
|
||||||
|
|
||||||
|
Config.PhoneType = "qb" -- Change this setting to make invoices work with your phone script [still testing this currently]
|
||||||
|
-- "qb" for qb-phone
|
||||||
|
-- "gks"" for GKSPhone
|
||||||
|
|
||||||
Config.Commission = false -- Set this to true to enable Commissions and give the person charging a percentage of the total
|
Config.Commission = false -- Set this to true to enable Commissions and give the person charging a percentage of the total
|
||||||
Config.CommissionAll = false -- Set this to true to give commission to workers clocked in
|
Config.CommissionAll = false -- Set this to true to give commission to workers clocked in
|
||||||
Config.CommissionDouble = false -- Set this to true if you want the person charging to get double Commission
|
Config.CommissionDouble = false -- Set this to true if you want the person charging to get double Commission
|
||||||
@@ -179,6 +183,7 @@ Config.VanBankLocations = {
|
|||||||
vector4(247.08, 224.98, 106.29, 157.75), -- Pacific Bank Window 2
|
vector4(247.08, 224.98, 106.29, 157.75), -- Pacific Bank Window 2
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.GabzBankLocations = {
|
Config.GabzBankLocations = {
|
||||||
["legion"] = {
|
["legion"] = {
|
||||||
vector4(149.5, -1042.08, 29.37, 342.74), -- Legion Fleeca
|
vector4(149.5, -1042.08, 29.37, 342.74), -- Legion Fleeca
|
||||||
|
|||||||
10
server.lua
10
server.lua
@@ -97,10 +97,20 @@ RegisterServerEvent("jim-payments:server:Charge", function(citizen, price, billt
|
|||||||
if Config.PhoneBank == false then
|
if Config.PhoneBank == false then
|
||||||
TriggerClientEvent("jim-payments:client:PayPopup", billed.PlayerData.source, amount, src, billtype, img, biller.PlayerData.job.label)
|
TriggerClientEvent("jim-payments:client:PayPopup", billed.PlayerData.source, amount, src, billtype, img, biller.PlayerData.job.label)
|
||||||
else
|
else
|
||||||
|
if Config.PhoneType == "qb" then
|
||||||
MySQL.Async.insert(
|
MySQL.Async.insert(
|
||||||
'INSERT INTO phone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (?, ?, ?, ?, ?)',
|
'INSERT INTO phone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (?, ?, ?, ?, ?)',
|
||||||
{billed.PlayerData.citizenid, amount, biller.PlayerData.job.name, biller.PlayerData.charinfo.firstname, biller.PlayerData.citizenid})
|
{billed.PlayerData.citizenid, amount, biller.PlayerData.job.name, biller.PlayerData.charinfo.firstname, biller.PlayerData.citizenid})
|
||||||
TriggerClientEvent('qb-phone:RefreshPhone', billed.PlayerData.source)
|
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
|
||||||
|
})
|
||||||
|
end
|
||||||
TriggerClientEvent('QBCore:Notify', src, 'Invoice Successfully Sent', 'success')
|
TriggerClientEvent('QBCore:Notify', src, 'Invoice Successfully Sent', 'success')
|
||||||
TriggerClientEvent('QBCore:Notify', billed.PlayerData.source, 'New Invoice Received')
|
TriggerClientEvent('QBCore:Notify', billed.PlayerData.source, 'New Invoice Received')
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user