Jump to content

Delay Invoicing until Order status = accepted


REJ_MY

Recommended Posts

We're an IT & Telecoms Service Provider looking to us WHMCS for some of our service/product billing.

 

We've noticed something odd with Invoicing, which won't work for us.

 

When someone places an order for Telephone Line, we can place the order immediately with the Wholesaler, but there would be a two week lead time before the service goes live, and would therefore be chargeable.

During this time, we would set a custom order status eg 'Provisioning', which would be included in pending. Then, when the service goes live, would mark the order as Active.

 

Ideally once the service is Active, billing could commence and the first invoice line would be

"Telephone Line ([Date Order Accepted] to [+1 Month])"

 

Unfortunately, WHMCS starts to raise invoices for services even while they're marked as pending. Which leaves the customer paying for a service that isnt active.

 

WHMCS Support suggested using Hooks to mitigate this. But I have no idea where to begin.

 

Can anyone advise me?

 

TL;DR Invoices raising while order marked as pending; this wont work. Invoices can only be created after order marked as Active.

Link to comment
Share on other sites

That's, in my opinion, the biggest issue with WHMCS right now. Invoices should be sent out only for delivered services (as an option ofcourse).

 

WHMCS should have a option to disable invoice generation on service order, but it should allow:

 

1) Customers to pay for an order which is not possible right now, and then it would generate the invoice with status Paid.

 

2) Generate the invoice with status Unpaid if the order was processed without payment.

 

Even if they didn't want to go this far, a simple new status "Orders" in invoice would be enough for now to distinguish from invoices that were generated from Orders and through hooks we could do all the rest.

Link to comment
Share on other sites

there was an action hook posted in the thread below that stopped invoices being generated...

 

http://forum.whmcs.com/showthread.php?92787-how-to-stop-invoice-generation

 

though i'm not sure if this would prevent renewal invoices being generated too...

 

there is an addon module that can modify due dates - perhaps that will help your situation?

 

https://www.whmcs.com/appstore/3342/Fix-Due-Dates-On-Payment.html

Link to comment
Share on other sites

Interesting... are invoices generated while a service status is 'suspended'?

If so, could a hook be written to automatically suspend a service as soon as its ordered?

 

To reduce confusion, could an additional Service/product Status be created call 'Provisioning', rather than Suspended?

Link to comment
Share on other sites

Interesting... are invoices generated while a service status is 'suspended'?

If so, could a hook be written to automatically suspend a service as soon as its ordered?

you could write a hook to do more or less anything!

 

what i'm unsure of is the sequence in the order process, e.g I can't remember if it generates the invoice first, then sets up the service - if so, then suspending the service wouldn't prevent the original invoice from being generated.

 

To reduce confusion, could an additional Service/product Status be created call 'Provisioning', rather than Suspended?

you could - http://docs.whmcs.com/Order_Statuses

Link to comment
Share on other sites

Thanks Brain!

I just took a look at Custom Order Statuses and I notice that they can be 'Included In' Active, Pending or Fraud.

 

What are the behaviours of these Statuses?

 

Could 'Provisioning' be included in none of these, and thus remain untouched by the Invoicing Module?

Link to comment
Share on other sites

I just took a look at Custom Order Statuses and I notice that they can be 'Included In' Active, Pending or Fraud.

 

What are the behaviours of these Statuses?

it's probably best to read the docs on this - http://docs.whmcs.com/Order_Management#Managing_Orders

 

Could 'Provisioning' be included in none of these, and thus remain untouched by the Invoicing Module?

hmm, are you thinking of creating a custom status and using a hook to set new orders to this instead of pending, in the hope it would prevent an invoice being created? if so, I don't think it would work - I can't recall reading anyone trying to do this.

Link to comment
Share on other sites

So basically you want to:

 

1) Add order with no invoice and auto-setup

2) Once days or weeks later you click "Accept" you want to auto-setup the service and generate the unpaid proforma (or invoice?)

3) Dates (next due date, next invoice date...) should be updated

 

It's doable with hooks. You can also make that when you "Accept" the order the newly created invoice/proforma is "linked" back to the order so that there's no mess when you have to find the invoice of an order. Said that (correct me if I'm wrong) first you provide the service and then ask for payment. Is it right?

 

p.s. Ok, I admit that I'm already thinking about including this feature in my module :!:

Edited by Kian
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