Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Extending WHMCS Server Revenue Forecasts Report with solusvm nodes
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Extending WHMCS Server Revenue Forecasts Report with solusvm nodes

DamienSBDamienSB Member
edited February 2013 in Providers

Hello all-

Does anyone here use the "Server Revenue Forecasts" report inside WHMCS? If yes, you probably noticed that it doesn't include each solusvm node, but rather the "solusvm master" as a single server in the report.

I have created a report that breaks down server revenue based on the solusvm node, and not collectively calculated as the server_revenue_forcasts uses. I found this to be useful to determine which nodes aren't performing as well as they should in terms of cost vs. gross revenue.

I plan on posting the report publically here for anyone to use/edit. The code is a bit ugly at the moment, i didn't intend to release it for others but i figured it would be useful to other providers but i decided to. If i there isn't any support or general need for this, i won’t waste my time cleaning it up and making it available to everyone (yes for free).

Please let me know if this is something you would entertain or find useful.

«13

Comments

  • Does this operate on the 'vserverid' field? Or something else?

  • It requires you have the "nodeid" field for each product/service. It doesn't touch vserverid at all.

  • KuJoeKuJoe Member, Host Rep

    Interested. :)

  • Working with Damian to get the report a little easier to use. Expect something by this weekend.

  • KuJoeKuJoe Member, Host Rep

    Now I just need to go and fill in the nodeid for the hundreds of clients who ordered before I knew about that field (and for when the field was broken in the last SolusVM module release).

  • jarjar Patron Provider, Top Host, Veteran

    I've just been using excel...

  • KuJoeKuJoe Member, Host Rep

    We used to have individual nodes in WHMCS to make it easier to track, but made balancing the node impossible.

  • @KuJoe said: Now I just need to go and fill in the nodeid for the hundreds of clients who ordered before I knew about that field (and for when the field was broken in the last SolusVM module release).

    We're in a similar boat; migrating containers between nodes doesn't update the nodeid field in WHMCS, so we have like ~1200 products listed in WHMCS with the wrong nodeid. And i'm a lazy fucker who doesn't want to manually update every nodeid field.

  • DamienSBDamienSB Member
    edited February 2013

    Would you all be interested in a script that updates the nodeid value of each product based off the solusvm database?

    EDIT: I could turn this into an "admin addon" instead of a report module and add a cron hook that updates this. (for when vps containers are moved between nodes)

    How advanced should this go? Or rather how much is this actually worth?

  • I would be. It would be a handy tool to have after migrating things.

  • AnthonySmithAnthonySmith Member, Patron Provider

    @DamienSB epic idea!, my spreadsheet system is so complex now I could do my PHD on it :)

  • @AnthonySmith said: epic idea!, my spreadsheet system is so complex now I could do my PHD on it :)

    Lol I use excel for everything.

  • KuJoeKuJoe Member, Host Rep

    I'd pay $5 for a report, $20 for a nice add on. :)

    Any other providers willing to pay?

  • DamienSBDamienSB Member
    edited February 2013

    Kujoe, i was going to offer it for free..?

    Edit: now im thinking about charging for it, everyone can thank kujoe for that.

  • KuJoeKuJoe Member, Host Rep

    @DamienSB said: Kujoe, i was going to offer it for free..?

    I was responding to your question:

    @DamienSB said: Or rather how much is this actually worth?

    You're still welcome to offer it for free, I don't mind either way but if you're going to invest time into a nice add-on I'm sure others would pay you for your time. If you do offer it for free provide some Paypal info for donations and I'll throw some money your way. :)

  • oh, i didnt mean in terms of money, but nice to know you think it will be usefull.

  • KuJoeKuJoe Member, Host Rep

    Oh ok. Well I know that right now my partner calculates everything by hand so this would definitely save him some time. :)

    I've been meaning to code something like this myself for a few months now but I've been so busy with other stuff WHMCS coding and our SolusVM replacement have been on the back burner. :(

  • i did it by hand once and decided to create something. its a pain imo.

  • KuJoeKuJoe Member, Host Rep

    Honestly we just take the total income and divide it by the number of nodes, not very accurate but if you take the costs and add them up and then divide that number by the number of nodes you have a per node cost to use. It's accurate enough for our needs but a finer breakdown would be nice to have.

  • AnthonySmithAnthonySmith Member, Patron Provider

    heh, I would pay for it too, it will save me more time than it will cost :)

  • Download URL: http://www.supremebytes.com/uploads/report.zip

    Upload the file to /whmcs/modules/reports/

    Make sure you have the "nodeid" field set in each product/service in WHMCS (http://docs.solusvm.com/whmcs_module_v3#custom_fields_-_important ). This script wont function without it.

    To use this script, use the "Sync Node List" tool to grab a list of the nodes from the server, if the details appear out of date or incorrect, use the "Sync Products/Services" to update each client's service with the proper nodeid.

    While this script uses mostly SELECT queries, I recommend creating a backup of your database in case something goes horribly wrong. I have tested every feature on our production install, but your environment may be slightly different. This script is provided as-is and support may be limited. Please don’t redistribute this script.

    If you find any bugs, please send me a PM or email [email protected].

    ** @KuJoe Optional Gratification**
    PayPal Donations: [email protected]

  • KuJoeKuJoe Member, Host Rep

    @DamienSB Very awesome! I am at work right now, but once I get my netbook booted up I'll be sending some monies your way. :D

  • KuJoeKuJoe Member, Host Rep

    Since it was a mix between a report and an add-on I split the difference. A few minor typos but so far it looks like it's working as it should. :)

  • @KuJoe said: A few minor typos but so far it looks like it's working as it should. :)

    This was created at 2am and then completed after 4 hours of sleep. Just be glad its working. lol! Thanks!

  • did you add it as a product config option or under the configurable options? there is a difference. also you should mark it admin only. it shouldnt be editable on the order page.

  • edited February 2013

    Yeap, it didn't pull the nodeid for me either. When I ran Sync Products/Services I got a list of my client VPS' and New Node ID:0 next to them.

    (I have the nodeid field configured the same way as @Jack)

  • did you sync node list first?

  • DamienSBDamienSB Member
    edited February 2013

    In the table, does it show you a list of all your nodes?

    EDIT: what type of vz does your nodes use? kvm? openvz?

  • Sounds good!

    @KuJoe and the other guy, does it work well for y'all?

  • It works, and this is awesome. It wouldn't be possible to add something like the node cost, would it? So that you can see how much revenue you're making? @DamienSB

Sign In or Register to comment.