mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-16 22:06:02 +01:00
swap phone charging to jim_bridge function
This commit is contained in:
@@ -57,29 +57,21 @@ RegisterServerEvent(getScript()..":server:Charge", function(citizen, price, bill
|
|||||||
if Config.General.PhoneBank == false or gang == true or billtype == "cash" then
|
if Config.General.PhoneBank == false or gang == true or billtype == "cash" then
|
||||||
TriggerClientEvent(getScript()..":client:PayPopup", billed.source, amount, src, billtype, img, label, gang, outside)
|
TriggerClientEvent(getScript()..":client:PayPopup", billed.source, amount, src, billtype, img, label, gang, outside)
|
||||||
else
|
else
|
||||||
if Config.General.PhoneType == "qb" then
|
if sendPhoneInvoice({
|
||||||
MySQL.Async.insert(
|
src = billed.source,
|
||||||
'INSERT INTO phone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (?, ?, ?, ?, ?)',
|
amount = amount,
|
||||||
{billed.citizenid, amount, biller.job, biller.firstname, biller.citizenid}, function(id)
|
billedCitizenid = billed.citizenId,
|
||||||
if id then
|
job = biller.job,
|
||||||
TriggerClientEvent('qb-phone:client:AcceptorDenyInvoice', billed.source, id, biller.firstname, biller.job, biller.citizenid, amount, GetInvokingResource())
|
name = biller.firstname,
|
||||||
end
|
billerCitizenid = biller.citizenId,
|
||||||
end)
|
label = label,
|
||||||
TriggerClientEvent('qb-phone:RefreshPhone', billed.source)
|
|
||||||
elseif Config.General.PhoneType == "gks" then
|
}) then
|
||||||
MySQL.Async.execute('INSERT INTO gksphone_invoices (citizenid, amount, society, sender, sendercitizenid, label) VALUES (@citizenid, @amount, @society, @sender, @sendercitizenid, @label)', {
|
|
||||||
['@citizenid'] = billed.citizenid,
|
|
||||||
['@amount'] = amount,
|
|
||||||
['@society'] = biller.job,
|
|
||||||
['@sender'] = biller.firstname,
|
|
||||||
['@sendercitizenid'] = biller.citizenid,
|
|
||||||
['@label'] = label,
|
|
||||||
})
|
|
||||||
TriggerClientEvent('gksphone:notifi', src, {title = 'Billing', message = locale("success", "inv_succ"), img= '/html/static/img/icons/logo.png' })
|
|
||||||
TriggerClientEvent('gksphone:notifi', billed.source, {title = 'Billing', message = locale("success", "inv_recieved"), img= '/html/static/img/icons/logo.png' })
|
|
||||||
end
|
|
||||||
triggerNotify(nil, locale("success", "inv_succ"), 'success', src)
|
triggerNotify(nil, locale("success", "inv_succ"), 'success', src)
|
||||||
triggerNotify(nil, locale("success", "inv_recieved"), nil, billed.source)
|
triggerNotify(nil, locale("success", "inv_recieved"), nil, billed.source)
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else triggerNotify(nil, locale("error", "charge_zero"), 'error', source) return end
|
else triggerNotify(nil, locale("error", "charge_zero"), 'error', source) return end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user