REJ_MY Posted March 18, 2015 Share Posted March 18, 2015 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. 0 Quote Link to comment Share on other sites More sharing options...
box Posted March 19, 2015 Share Posted March 19, 2015 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. 0 Quote Link to comment Share on other sites More sharing options...
REJ_MY Posted March 19, 2015 Author Share Posted March 19, 2015 Hi box, Damn shame, I take it there's no way to implement this other than a code change by WHMCS? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 19, 2015 Share Posted March 19, 2015 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 0 Quote Link to comment Share on other sites More sharing options...
REJ_MY Posted March 19, 2015 Author Share Posted March 19, 2015 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? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 19, 2015 Share Posted March 19, 2015 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 0 Quote Link to comment Share on other sites More sharing options...
REJ_MY Posted March 20, 2015 Author Share Posted March 20, 2015 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? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 20, 2015 Share Posted March 20, 2015 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. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted March 21, 2015 Share Posted March 21, 2015 (edited) 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 March 21, 2015 by Kian 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.