William Posted January 29, 2022 Report Posted January 29, 2022 In the old phpvms we had the ability to modify the amount of $$ a pilot had. For instance we could have implemented a sign-up bonus or similar ideas. I cannot see a way for Admin to access the pilot finances or modifying them. Am I missing something? Thanks Quote
DisposableHero Posted January 30, 2022 Report Posted January 30, 2022 You are not missing something, it is not implemented (maybe because of the different finance logic used in v7) Only way to alter the amount of money someone has is by creating a transaction record (either credit or debit), directly editing a balance is not possible and this applies to both pilots/members and airlines. Quote
William Posted January 30, 2022 Author Report Posted January 30, 2022 (edited) OK, I understand. Which would you suggest as the fastest way to do that? I mean, in practice, how would I go about creating a transaction (whether debit or credit)? Really have not understood yet the core logic of this new platform (which seems great however and attracts me) and therefore I am not sure where to start 🙃 As always, I appreciate the time you are taking to help us out. Edited January 30, 2022 by William Quote
DisposableHero Posted January 30, 2022 Report Posted January 30, 2022 Well, it really depends... You can have a code of your own, with one input field (to enter the amount) and one type selector (credit/debit) and maybe one dropdown to select the user. And then with the data you entered/selected you can call core code to record the transaction properly. Or (with the form logic explained above) you can have your own code there to insert the record to the database directly (which will be a waste of time to write it all, I would use the core method for this, it is already there). Or if you want, you can play with your database directly, insert either credit or debit records to the correct table with the correct data/format etc. Or you can have a flight, like a welcome test flight, set it to pay a fixed amount (admin > flights > pick one here > edit pilot pay and save). Then force new pilots to fly it only, when you accept their pireps they will be credited that amount. No coding knowledge or database tricks needed. Nice and easy, new pilots get their start up fee and get used to the system by doing a flight Hope it helps, safe flights clear skies. Quote
William Posted January 30, 2022 Author Report Posted January 30, 2022 Great, thanks. Kind of like the 3rd and 4th idea option. For the sake of being practical and learn if I were to edit the DB, which one is the correct table to look at? The flight idea can be implemented later once we onboard everyone. Thanks!! Quote
DisposableHero Posted January 30, 2022 Report Posted January 30, 2022 There is only one table which has "transactions" in its name I think it would be the table you are looking for. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.