Jump to content

Any way to post-process reports?


Remitur

Recommended Posts

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?

 

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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...)

 

Link to comment
Share on other sites

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 by brian!
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated