Remitur Posted October 25, 2019 Share Posted October 25, 2019 In WHMCS there's available a number of "standard" reports, and you can add also custom reports... ( /admin/reports.php ). And this is good. You can also export "exports" report in csv ... and this is good too. And when you have your csv files, you can process them in whatever way you need/want... and this is good too. But... does exist any way to do a postprocessing directly in WHMCS, without the needs to export the csv and process it externally? That's to say: it's easy to add a button to a certain report, which calls a function which (i.e.) send an email but... how to recover the data in the report and pass it to this function? Is it somehow possible? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 25, 2019 Share Posted October 25, 2019 6 hours ago, Remitur said: But... does exist any way to do a postprocessing directly in WHMCS, without the needs to export the csv and process it externally? not out of the box. 6 hours ago, Remitur said: That's to say: it's easy to add a button to a certain report, which calls a function which (i.e.) send an email but... how to recover the data in the report and pass it to this function? Is it somehow possible? anything is possible - I know MG's Report Generator addon does it (or something similar)... you thinking of sending it as a PDF attachment or in the main boy of the email ? 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted October 27, 2019 Author Share Posted October 27, 2019 On 10/25/2019 at 6:03 PM, brian! said: you thinking of sending it as a PDF attachment or in the main boy of the email ? Something even little more difficult... the idea is to get reports data, and somehow transmit it to an external php script (to do some operations required by accounting). I guess that report data should be in form of an array, but I can't check if it's really so and what's tha name of this array (if any...) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 28, 2019 Share Posted October 28, 2019 (edited) On 27/10/2019 at 17:39, Remitur said: Something even little more difficult... the idea is to get reports data, and somehow transmit it to an external php script (to do some operations required by accounting). i'm not sure if that's more difficult or simpler. 🙂 On 27/10/2019 at 17:39, Remitur said: I guess that report data should be in form of an array, but I can't check if it's really so and what's tha name of this array (if any...) possibly you're overcomplicating the situation by thinking of using reports as the source of these results/data - remember, these reports are just a visual way of seeing the results of a SQL query... but if you don't need to see the results and just need to pass the results on to another script, then either write a primary script to run the underlying SQL query locally and export the results in a given format that the second script can then read, or get the external PHP script to query the WHMCS database for the results (either directly or via a custom API call). Edited October 29, 2019 by brian! 1 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 29, 2019 Share Posted October 29, 2019 On 10/27/2019 at 6:39 PM, Remitur said: Something even little more difficult... the idea is to get reports data, and somehow transmit it to an external php script (to do some operations required by accounting). I guess that report data should be in form of an array, but I can't check if it's really so and what's tha name of this array (if any...) I could be wrong but I suspect that a module you are using has this feature. It pulls everything your accountant need from database. It's like using an API function of WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 29, 2019 Share Posted October 29, 2019 9 hours ago, Kian said: I could be wrong but I suspect that a module you are using has this feature. It pulls everything your accountant need from database. It's like using an API function of WHMCS. I wonder which module you could mean.. hmmm! 🤔 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.