Skip to content

Commit

Permalink
feat(esx_billing): Reasons for account changing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mycroft-Studios committed Sep 9, 2022
1 parent f179ffe commit 11ce86b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions [esx_addons]/esx_billing/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, billId)
MySQL.update('DELETE FROM billing WHERE id = ?', {billId},
function(rowsChanged)
if rowsChanged == 1 then
xPlayer.removeMoney(amount)
xTarget.addMoney(amount)
xPlayer.removeMoney(amount, "Bill Paid")
xTarget.addMoney(amount, "Paid bill")

xPlayer.showNotification(_U('paid_invoice', ESX.Math.GroupDigits(amount)))
xTarget.showNotification(_U('received_payment', ESX.Math.GroupDigits(amount)))
Expand All @@ -71,8 +71,8 @@ ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, billId)
MySQL.update('DELETE FROM billing WHERE id = ?', {billId},
function(rowsChanged)
if rowsChanged == 1 then
xPlayer.removeAccountMoney('bank', amount)
xTarget.addAccountMoney('bank', amount)
xPlayer.removeAccountMoney('bank', amount, "Bill Paid")
xTarget.addAccountMoney('bank', amount, "Paid bill")

xPlayer.showNotification(_U('paid_invoice', ESX.Math.GroupDigits(amount)))
xTarget.showNotification(_U('received_payment', ESX.Math.GroupDigits(amount)))
Expand All @@ -95,7 +95,7 @@ ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, billId)
MySQL.update('DELETE FROM billing WHERE id = ?', {billId},
function(rowsChanged)
if rowsChanged == 1 then
xPlayer.removeMoney(amount)
xPlayer.removeMoney(amount, "Bill Paid")
account.addMoney(amount)

xPlayer.showNotification(_U('paid_invoice', ESX.Math.GroupDigits(amount)))
Expand All @@ -110,7 +110,7 @@ ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, billId)
MySQL.update('DELETE FROM billing WHERE id = ?', {billId},
function(rowsChanged)
if rowsChanged == 1 then
xPlayer.removeAccountMoney('bank', amount)
xPlayer.removeAccountMoney('bank', amount, "Bill Paid")
account.addMoney(amount)
xPlayer.showNotification(_U('paid_invoice', ESX.Math.GroupDigits(amount)))

Expand Down

0 comments on commit 11ce86b

Please sign in to comment.