From 11ce86b22e14b7e01bf9c7aa37c8902633734f7b Mon Sep 17 00:00:00 2001 From: Mycroft Date: Fri, 9 Sep 2022 22:31:41 +0100 Subject: [PATCH] feat(esx_billing): Reasons for account changing --- [esx_addons]/esx_billing/server/main.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/[esx_addons]/esx_billing/server/main.lua b/[esx_addons]/esx_billing/server/main.lua index 1ef55ede..b2b755a9 100644 --- a/[esx_addons]/esx_billing/server/main.lua +++ b/[esx_addons]/esx_billing/server/main.lua @@ -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))) @@ -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))) @@ -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))) @@ -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)))