FIX - polish banking interactions and transaction details

This commit is contained in:
Leon.Schmidt
2026-08-17 00:25:14 +02:00
parent 181206f3cf
commit 335b9a98b5
12 changed files with 482 additions and 111 deletions
+6
View File
@@ -1040,6 +1040,12 @@ Locales["en"] = {
recipientPhone = "Phone number", recipientPhonePlaceholder = "Enter the recipient's number",
chooseContact = "Choose from contacts", noContacts = "No contacts saved yet.",
amount = "Amount", amountPlaceholder = "Enter an amount",
transactionDetails = "Transaction details", transactionDate = "Date",
transactionDirection = "Direction", transactionReference = "Reference",
notifications = {
receivedTitle = "Money received",
received = "You received {amount} from {sender}.",
},
transactions = {
deposit = "Cash deposit", withdrawal = "Cash withdrawal",
transfer_in = "Incoming transfer", transfer_out = "Outgoing transfer",
+2 -2
View File
@@ -894,8 +894,8 @@ RegisterNetEvent("sky_phone:calls:changed", function()
SendNUIMessage({ type = "calls:changed" })
end)
RegisterNetEvent("sky_phone:banking:changed", function()
SendNUIMessage({ type = "banking:changed" })
RegisterNetEvent("sky_phone:banking:changed", function(data)
SendNUIMessage({ type = "banking:changed", data = data })
end)
RegisterNetEvent("sky_phone:billing:changed", function()
+10 -4
View File
@@ -79,8 +79,8 @@ local function record_transaction(identifier, kind, amount, label, reference)
]], { identifier, kind, amount, label or "", reference or "" })
end
local function notify_changed(source)
TriggerClientEvent("sky_phone:banking:changed", source)
local function notify_changed(source, data)
TriggerClientEvent("sky_phone:banking:changed", source, data)
end
local function online_source_for_phone(number)
@@ -149,9 +149,15 @@ Bridge.Callbacks.Register("sky_phone:banking:transfer", function(source, data)
end
local reference = ("phone-transfer-%s-%s"):format(os.time(), source)
local sender_name = player_name(source)
record_transaction(identifier, "transfer_out", amount, player_name(target), reference)
record_transaction(target_identifier, "transfer_in", amount, player_name(source), reference)
notify_changed(target)
record_transaction(target_identifier, "transfer_in", amount, sender_name, reference)
notify_changed(target, {
kind = "transfer_in",
amount = amount,
currency = Config.Banking.Currency,
sender = sender_name,
})
return { success = true, data = overview(source, identifier) }
end)