if Config.UseESXBilling then
ExecuteSql(false, "SELECT * FROM billing WHERE `identifier` = '"..owner.."'", function(invoices)
if invoices[1] ~= nil then
for k, v in pairs(invoices) do
ExecuteSql(true, "SELECT phone_number FROM `phones` WHERE `owner` = '"..v.sender.."' AND `active` = 1", function(res)
if res[1] ~= nil then
v.number = res[1].phone_number
end
end)
end
PhoneData.Invoices = invoices
end
TriggerClientEvent('almez-phone:client:openPhone', source, PhoneData)
end)
else
PhoneData.Invoices = {}
TriggerClientEvent('almez-phone:client:openPhone', source, PhoneData)
end
end)
end)
end)
end)
end)
end)