Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Kedrihan committed Jul 11, 2024
1 parent d3344ba commit efa6662
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions resources/[soz]/soz-bank/server/invoices.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ local function PayInvoice(PlayerData, account, id, marked)
MySQL.update.await("UPDATE invoices SET payed = true WHERE id = ? AND payed = false AND refused = false", {
invoice.id,
})
local kindLabel = 'facture'
local kindLabel = "facture"
local messageForEmitter = "Votre facture ~b~%s~s~ a été ~g~payée"
if invoice.kind == 'fine' then
kindLabel = 'amende'
if invoice.kind == "fine" then
kindLabel = "amende"
messageForEmitter = "Votre amende ~b~%s~s~ a été ~r~payée par " .. Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname
end
TriggerClientEvent("soz-core:client:notification:draw", Player.PlayerData.source, "Vous avez ~g~payé~s~ votre " .. kindLabel, "success", 10000)
Expand Down Expand Up @@ -178,10 +178,10 @@ local function RejectInvoice(PlayerData, account, id)

if PlayerData.charinfo.account == account then
local Player = QBCore.Functions.GetPlayerByCitizenId(invoice.citizenid)
local kindLabel = 'facture'
local kindLabel = "facture"
local messageForEmitter = "Votre facture ~b~%s~s~ a été ~r~refusée"
if invoice.kind == 'fine' then
kindLabel = 'amende'
if invoice.kind == "fine" then
kindLabel = "amende"
messageForEmitter = "Votre amende ~b~%s~s~ a été ~r~refusée par " .. Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname
end
TriggerClientEvent("soz-core:client:notification:draw", Player.PlayerData.source, "Vous avez ~r~refusé~s~ votre " .. kindLabel, "error", 10000)
Expand Down Expand Up @@ -345,9 +345,9 @@ RegisterNetEvent("banking:server:sendInvoice", function(target, label, amount, k

if exports["soz-inventory"]:RemoveItem(Player.PlayerData.source, "paper", 1) then
if CreateInvoice(Player, Target, Player.PlayerData.job.id, Target.PlayerData.charinfo.account, label, tonumber(amount), kind) then
local kindLabel = 'facture'
if kind == 'fine' then
kindLabel = 'amende'
local kindLabel = "facture"
if kind == "fine" then
kindLabel = "amende"
end
TriggerClientEvent("soz-core:client:notification:draw", Player.PlayerData.source, "Votre " .. kindLabel .. " a bien été émise")
end
Expand Down

0 comments on commit efa6662

Please sign in to comment.