Jump to content

Monthly invoice all services (sql hook/script request)


nlxs

Recommended Posts

Can someone help me with the following.

At this moment I am using software to invoice my hosting clients on a monthly base, domains/hosting/spamfilters are all invoiced on the 1st of the month. For example the content of a invoice send on the 1st this month.

Domain xxx.XXX - term: 20/07/2019 - 20/07/2020  
Hosting xxx.XXX - term: 20/07/2019 - 20/07/2020 
Hosting yyy.YYY - term: 31/07/2019 - 31/07/2020 
Domain aaa.AAA - term: 02/07/2019 - 02/07/2020 

At this moment their is no solution to invoice the same way from WHMCS, I can set pro-forma invoicing, but thats only applicable for services and not domains.
Another solution is to modify all the dates to 14th of the month and set invoicing 2 weeks before due date.

To modify all dates by myself is way too much work everytime, and I don't want to edit the "contract-term"
Does someone has a SQL solution for this, so I can invoice everthing from 1 month on 1 invoice, without editting contract-terms...?

I think updating all due dates with a daily sql hook/script will do the trick... But i don't know if the due dates are regenerated based on the "registration/start/contract-term" date(s)

Link to comment
Share on other sites

5 hours ago, nlxs said:

At this moment their is no solution to invoice the same way from WHMCS, I can set pro-forma invoicing, but thats only applicable for services and not domains.

there's Kian's Billing Extension addon that can consolidate invoices into one per month... in any event, this topic is right up his street to answer. 🙂

Link to comment
Share on other sites

31 minutes ago, brian! said:

there's Kian's Billing Extension addon that can consolidate invoices into one per month... in any event, this topic is right up his street to answer. 🙂

Thank you for the suggestion, unfortunatly I cannot work with pro-forma invoices (required to send real invoice after the month)
The other solution is onepayment (he also offers) but then you get multiple invoices with 1 payment, also not acceptable.

The software of Kian doesn't support invoicing before due/term date, only afterwards. I tried it but without luck and with bad support. as you can see it's very bad rated on whmcs marketplace

My goal is to send only 1 invoice a month before the start of the service(s)/domains (no proforma invoice)

So in short version:

I am just looking for a sql script/hook that search for the (next) due date (of the services in the next month) --> change it (every night) to 15-xx-xx,.
So I can send a invoice on the 1st of every month with a due payment of 14 days.
When we only do the thing above, we do not change the  original registration date (other field) (so i can always search for the start of the contract term).

Can someone write this sql php script for me? I can create a cronjob to start above script every night for example.

 

Link to comment
Share on other sites

18 hours ago, nlxs said:

Thank you for the suggestion, unfortunately I cannot work with pro-forma invoices (required to send real invoice after the month)

@Kian will know far more about this than me, but using proforma invoices will be an option that you can disable from the addon settings...

120-settings-proformas.png

did you mean pro-rata rather than proforma ?

19 hours ago, nlxs said:

The other solution is onepayment (he also offers) but then you get multiple invoices with 1 payment, also not acceptable.

I think both OneInvoice and OnePayment are independent of each other and can each be optional disabled - so OneInvoice should consolidate the invoices due for that month into just one invoice.

19 hours ago, nlxs said:

I tried it but without luck and with bad support. as you can see it's very bad rated on whmcs marketplace

well it went a year or two with support issues, but has supposedly been rewritten since then.... though if you're a previous user, I could understand why you might be wary of using it again. 🙂

19 hours ago, nlxs said:

My goal is to send only 1 invoice a month before the start of the service(s)/domains (no proforma invoice)

there is a feature request for this - 18 votes in 6 months, but these requests take years to complete, so that's not a realistic option.

the reason why I was leaving it for Kian to answer is because I consider him to be the most knowledgable developer when it comes to the billing/invoicing functionality - I suspect he understands the issues more than those working on the core product and certainly has a greater experience on the topic than me! 🙂

19 hours ago, nlxs said:

So in short version:

I am just looking for a sql script/hook that search for the (next) due date (of the services in the next month) --> change it (every night) to 15-xx-xx,.
So I can send a invoice on the 1st of every month with a due payment of 14 days.
When we only do the thing above, we do not change the  original registration date (other field) (so i can always search for the start of the contract term).

the problem with that I think is that doing so would visibly alter the contract term - if by contract term you mean the two dates shown on the invoice line item, e.g (xx/xx/xx - yy/yy/yy)... xx/xx/xx tends to be the due date, but if you've changed that value before the invoice is generated, then that modified due date (01/xx/xx) will be the start date it will use in the invoice... which you don't want to do.

19 hours ago, nlxs said:

Can someone write this sql php script for me? I can create a cronjob to start above script every night for example.

to be honest, I don't think that it's as simple to do as you think it is - if it were, there would have been numerous solutions, both commercial and free, over the years... but other than Billing Extension, i'm struggling to think of an alternative... and I don't recall any similar hook/SQL query being posted here in the last 6+ years that does this.

my thought would be to wait until Kian speaks on the viability of what you want to do - but I would have thought it unlikely that anyone(user or developer) would post the code that you are asking for (unless it was previously written and thoroughly tested)... you may end up having to post in Service Offers & Requests and pay a developer for a solution.

Link to comment
Share on other sites

On 7/26/2019 at 3:12 PM, nlxs said:

My goal is to send only 1 invoice a month before the start of the service(s)/domains (no proforma invoice)

That's exactly what BX does but as I have already said you in the ticket, both WHMCS and BX have a learning curve. Reading documentation and testing things helps a lot but I respect if you don't want to do it and prefer to move to a competitor of WHMCS or something similar.

In case you still want to try, the fature you are looking for is named OnePayment. Here's how it works:

  • On 01/01/2019 customer receives an email notification saying "Service Y, Z and Q will expire next month (Feb). You have one month to let us know what service you want to keep active or drop"
  •  In the same time customer sees a sidebar in clientarea that informs him about services that are going to expire next month including the "Amount due next month". This way he has no excuses if he missed the email.
  • There's also a page (optional - the feature is named Enhanced Renewals) that allows to easily set renew/do not renew status for all the involved products/services, domains and addons in one click
  • On 01/02/2019 customer receives a single invoice (not proforma) that contains all products/services, domains and addons that he decided to keep active. In case he has enough credit and "Auto apply credit" is enabled in WHMCS, the invoice becomes Paid automatically. Few seconds later the customer receives the email notification for "Service Y, P and H will expire next month (Mar)" and the cycle repeats on a monthly basis

If the customer has at least one service that expires every month, he will receive a maximum of 12 invoices per year.

Link to comment
Share on other sites

On 7/28/2019 at 6:26 AM, Kian said:

That's exactly what BX does but as I have already said you in the ticket, both WHMCS and BX have a learning curve. Reading documentation and testing things helps a lot but I respect if you don't want to do it and prefer to move to a competitor of WHMCS or something similar.

In case you still want to try, the fature you are looking for is named OnePayment. Here's how it works:

  • On 01/01/2019 customer receives an email notification saying "Service Y, Z and Q will expire next month (Feb). You have one month to let us know what service you want to keep active or drop"
  •  In the same time customer sees a sidebar in clientarea that informs him about services that are going to expire next month including the "Amount due next month". This way he has no excuses if he missed the email.
  • There's also a page (optional - the feature is named Enhanced Renewals) that allows to easily set renew/do not renew status for all the involved products/services, domains and addons in one click
  • On 01/02/2019 customer receives a single invoice (not proforma) that contains all products/services, domains and addons that he decided to keep active. In case he has enough credit and "Auto apply credit" is enabled in WHMCS, the invoice becomes Paid automatically. Few seconds later the customer receives the email notification for "Service Y, P and H will expire next month (Mar)" and the cycle repeats on a monthly basis

If the customer has at least one service that expires every month, he will receive a maximum of 12 invoices per year.

This can only happen, when the invoice send on 1-february has a "payment period of 14 days"

It is not acceptable to Request to upload amount in advance. Just like any other invoice i need a payment term of 14 days after sending the invoice.
As far as i can see, this is not possible, or do you have a solution for that?

Link to comment
Share on other sites

Hi nlxs,

We've had a module developed for exactly this: allow clients to enable monthly invoicing inside WHMCS.
Naturally you could enable this for all your customers.

It wasn't cheap but you can contact me if you are interested.

Link to comment
Share on other sites

8 minutes ago, Mark said:

Hi nlxs,

We've had a module developed for exactly this: allow clients to enable monthly invoicing inside WHMCS.
Naturally you could enable this for all your customers.

It wasn't cheap but you can contact me if you are interested.

i have send you a PM

Link to comment
Share on other sites

Hi @nlxs and @sfnz,

I'll contact you guys tomorrow. Need to figure some thing out, price wise.

This is what the module does:

The module provides the ability to force the invoice generation from the whole month and combine all invoices into one consolidated invoice. 
The customer will receive one invoice on the first day of the month. 

New orders will receive a seperate invoice.

Clients can enable Montly Invoicing in their WHMCS Dashboard using a custom field.

Link to comment
Share on other sites

14 minutes ago, Mark said:

Hi @nlxs and @sfnz,

I'll contact you guys tomorrow. Need to figure some thing out, price wise.

This is what the module does:


The module provides the ability to force the invoice generation from the whole month and combine all invoices into one consolidated invoice. 
The customer will receive one invoice on the first day of the month. 

New orders will receive a seperate invoice.

Clients can enable Montly Invoicing in their WHMCS Dashboard using a custom field.

I like it, this is exactly what i need.

Link to comment
Share on other sites

Hi Guys,

I've got to come back to this in several weeks. It's holiday season here so everything is a bit slow'ish.
We need to think about encoding, pricing, and maintenance / updates for the module. Not something that is currently our core business.

 

Link to comment
Share on other sites

1 minute ago, Mark said:

We need to think about encoding, pricing, and maintenance / updates for the module. Not something that is currently our core business.

then I suggest you leave it at least until v7.8, or more likely until v7.8.1 gets a release in September, as once that maintenance version gets a release, you should have many months before the next WHMCS release.

Link to comment
Share on other sites

2 hours ago, Mark said:

Technical: Encoding and supporting code is something we are not experienced in and is not our core business.

fair enough. 🙂

four options I can think of...

  1. upload the addon as is on GitHub (or here) and tell users that you won't be updating/supporting it - e.g wash your hands of it and leave it to others to fix if/when issues arrive... there's no guarantee that a future WHMCS update wouldn't include this feature... not v7.8, but who knows what's going to be included in v8 or beyond - so there's no knowing how long a shelf-life this addon would have.
  2. assuming you wrote it, or at least own the coding, you could sell it to another developer and let them worry about encoding/selling/supporting the addon.
  3. you wouldn't necessarily have to buy software for the encoding, you can use the IonCube encoder online to encode files as & when required - though it's sadly not as reasonably priced as it used to be. 😞
  4. you could sell the addon unencoded to those interested above directly, but say that you won't support or update it - that puts them in the same boat as 1) where if there is a future issue, these users can contact a developer to fix it... even if they shouldn't necessarily rush to update WHMCS in the future (to ensure this addon keeps working), I think these users would be happy to at least use something that works with the current version and does what they want/need it to. 🙂
Link to comment
Share on other sites

  • 3 months later...
On 7/30/2019 at 12:19 AM, Mark said:

We've had a module developed for exactly this: allow clients to enable monthly invoicing inside WHMCS.
Naturally you could enable this for all your customers.

It wasn't cheap but you can contact me if you are interested.

Hi @Mark

When you say it wasn't cheap, are you able to divulge the first digit and how many ZERO's?

We have the exact same requirement for most customers, but some customers require us to send multiple monthly invoices with specific services on each.

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 months later...

And running the whmcs system cron without invoice option :

*/5 * * * * php -q cron.php skip --CreateInvoice

 

And once a month (sample: on first day of the month)  with the Create invoice option ?:

10 1 1 * * php -q cron.php do --CreateInvoices

 

Anybody tested this possible solution ?

 

Regards

Arjen.

 

 

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