From 625f80361b2a4ea4f51867c5dfce48edf19cbc18 Mon Sep 17 00:00:00 2001 From: Nordi98 Date: Tue, 5 Aug 2025 16:04:53 +0200 Subject: [PATCH] ed --- .../[tools]/nordi_billing/billing_client.lua | 48 ++----------------- .../[tools]/nordi_billing/billing_server.lua | 12 ++--- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/resources/[tools]/nordi_billing/billing_client.lua b/resources/[tools]/nordi_billing/billing_client.lua index 52f388cfe..271dac725 100644 --- a/resources/[tools]/nordi_billing/billing_client.lua +++ b/resources/[tools]/nordi_billing/billing_client.lua @@ -430,7 +430,6 @@ function ViewBills() lib.showContext('billing_menu') end - -- Helper function to get nearby players function GetNearbyPlayers() local playerPed = PlayerPedId() @@ -612,35 +611,8 @@ RegisterNetEvent('billing:client:showPaymentPrompt', function(data) end end end - }, - { - title = 'Später bezahlen', - description = 'Rechnung für später speichern', - icon = 'clock', - onSelect = function() - local success = lib.callback.await('billing:server:handleBillResponse', false, { - action = 'later', - billId = data.billId - }) - - if success then - lib.notify({ - title = 'Rechnung gespeichert', - description = 'Die Rechnung wurde für später gespeichert', - type = 'info' - }) - - -- Notify the sender - TriggerServerEvent('billing:server:notifyBillSender', data.billId, 'later') - else - lib.notify({ - title = 'Fehler', - description = 'Fehler beim Speichern der Rechnung', - type = 'error' - }) - end - end } + -- "Pay Later" option removed } }) @@ -692,22 +664,8 @@ RegisterNetEvent('billing:client:billResponse', function(billId, action, playerN centered = true, cancel = false }) - elseif action == 'later' then - lib.notify({ - title = 'Rechnung gespeichert', - description = playerName .. ' wird deine Rechnung später bezahlen', - type = 'info', - duration = 7000 - }) - - -- Show a more detailed "pay later" message - lib.alertDialog({ - header = 'Zahlung aufgeschoben', - content = playerName .. ' hat deine Rechnung über $' .. bill.amount .. ' für "' .. bill.reason .. '" für später gespeichert.', - centered = true, - cancel = false - }) - end + } + -- "later" case removed -- Remove from pending bills pendingBills[billId] = nil diff --git a/resources/[tools]/nordi_billing/billing_server.lua b/resources/[tools]/nordi_billing/billing_server.lua index f64f7cf09..ec3b24fbf 100644 --- a/resources/[tools]/nordi_billing/billing_server.lua +++ b/resources/[tools]/nordi_billing/billing_server.lua @@ -162,16 +162,9 @@ lib.callback.register('billing:server:handleBillResponse', function(source, data -- Notify the player TriggerClientEvent('QBCore:Notify', src, 'Du hast die Rechnung abgelehnt', 'info') - return true - elseif data.action == 'later' then - -- Simply close the prompt without any action - -- The bill will remain in the system as unpaid - - -- Notify the player - TriggerClientEvent('QBCore:Notify', src, 'Die Rechnung wurde für später gespeichert', 'info') - return true end + -- "later" action removed return false end) @@ -189,7 +182,6 @@ function PayBillFromSharedAccount(source, billId, accountId) local bill = billResult[1] local amount = tonumber(bill.amount) - -- Get account details local accountResult = MySQL.query.await('SELECT * FROM ps_banking_accounts WHERE id = ?', {accountId}) if not accountResult or #accountResult == 0 then return false end @@ -466,3 +458,5 @@ QBCore.Commands.Add('bills', 'Zeige deine unbezahlten Rechnungen an', {}, false, -- This will trigger the client to open the bills menu TriggerClientEvent('billing:client:openBillsMenu', source) end) + +