ROQ Posted October 7, 2019 Share Posted October 7, 2019 Hi, I'd like to see my recent transactions list but with an extra column displaying the customers username as listed in their products/services section. Is this possible? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 7, 2019 Share Posted October 7, 2019 43 minutes ago, ROQ said: I'd like to see my recent transactions list but with an extra column displaying the customers username as listed in their products/services section. Is this possible? with great difficulty, if you mean the transactions list page at admin/transactions.php; if you mean the Transactions Report, then it would be easier to add custom columns there... that transaction report is basically a SQL query of tblaccounts - but if you want usernames, then that's going to involve travelling conditionally through multiple linked tables to get the value you want (tblaccounts -> tblinvoiceitems -> tblhosting)... so it's possible, but would need some work. 0 Quote Link to comment Share on other sites More sharing options...
ROQ Posted October 7, 2019 Author Share Posted October 7, 2019 Thank you brian for the reply, the transaction report would be perfect. Where can I edit this to get the results I'm after? 0 Quote Link to comment Share on other sites More sharing options...
ROQ Posted October 7, 2019 Author Share Posted October 7, 2019 Ok, found the transactions php but not sure how to add Username as a "Field to Include" option. Any pointers would be gratefully received. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 7, 2019 Share Posted October 7, 2019 19 minutes ago, ROQ said: Thank you brian for the reply, the transaction report would be perfect. Where can I edit this to get the results I'm after? the transaction report in not encrypted and can be found in /modules/reports/transactions.php - but don't edit that file (as I think the WHMCS updater will replace it with the original), so create a new .php file in that folder, copy & paste the transactions.php report code into it and then start editing that duplicate file. you basically need to do upto 4 things:- enable Capsule if you're going to use that for the additional queries. add "username"=>"Username" to the $filterfields array (doesn't matter where, just where you want its checkbox to show in the output). add SQL query to get the username value in the $filters array. add SQL query to get the username value in the $incfields array. the first two are easy; the next two will contain the same SQL query, but it's a complete pain because it's both conditional and optional, e.g you don't want this query to apply to all transactions, nor can you guarantee that username will exist anyway... hence why I said it would need some work. 😓 0 Quote Link to comment Share on other sites More sharing options...
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.