jimathy / jim-payments

QBCore based payment system
77 stars 59 forks source link

Calls to qb-bossmenu/qb-gangmenu addAccountMoney/removeAccountMoney That Don't Exist Anymore #21

Open wessleym opened 1 year ago

wessleym commented 1 year ago

Please see this file: https://github.com/jimathy/jim-payments/blob/main/server/atmserver.lua

1. Old Events

Notice that, if Config.RenewedBanking is true, TriggerEvent is being called for the following events: qb-bossmenu:server:addAccountMoney qb-bossmenu:server:removeAccountMoney qb-gangmenu:server:addAccountMoney qb-gangmenu:server:removeAccountMoney These are old, deprecated events, right? So why are they being used when Config.RenewedBanking is true?

2. management_funds Table

Also, in the same file, please see lines 215-217: https://github.com/jimathy/jim-payments/blob/4ec75a90faaaa24a3933bda632d5406d5b169f33/server/atmserver.lua#L215-217

-- If qb-management, grab info directly from database
if Config.RenewedBanking then
    local result = MySQL.Sync.fetchAll('SELECT * FROM management_funds')
...

The comment suggests checking for qb-management, but the code checks for Config.RenewedBanking and then proceeds to retrieve from the management_funds table, which I don't think Renewed-Banking even utilizes.

These seem mixed up, but maybe you can shed some light on why the code is doing this. Thank you.

HackFetus commented 11 months ago

Did anyone fix this? We cannot get our payment system working because of this lol.

Bank payments go to the ledger (working fine) but cash payments cause an error in those exact lines lol