Paoli Posted February 21, 2012 Share Posted February 21, 2012 Greetings [[all]] Do some of you happen to know where in WHMCS a given invoice is assigned to a given service or order or product under a given client? Let me better explain this and give you some examples. It's a bit tricky but you'll see my point if you kindly read this through. - An invoice per its id has at least two assignments: one to a client by client id and other to a service (I assume by the service id). When an automatically generated invoice is produced, it's produced then for a client for instance client id #100 and charges for something like a service/order/product (not clear for me how WHMCS handles that). For automated invoices, when an invoice is marked as paid, it goes to the client #100's statistics (income to this date etc); it lists under "view Invoices" for the product/service to which it is assigned under the client #100 and it correctly adjusts next due date for that service/order/product. We should notice that under "view invoices" at the product page under the client #100, only the assigned invoices to that product/service/order will be listed. If you click on cient #100 Invoice upper link and the client has other items, all invoices will be listed, among them we will find that invoice which is exclusive to a given service/order/product as we just checked. - Yet sometimes client #100 request us a manually generated invoice has to be created; we may have the intention to generate it to a given service/order/product but if it is manually generated, it will *not* be listed under the targeted service. I call these invoices "orphan invoices" - we can see them from client #100 invoice lists as paid or unpaid; we can read what items it targets opening it for edition/view, but it will *not* list under the target service View invoices. - There's another situation which is common: sometimes a client requests us to move a given service to another account and there is a link for easily doing that on WHMCS. Yet all the invoices related to this service will remain on the source account; let's imagine that client #100 required us to move service #10 to a targeted client's account #200 - the service will go, but the assigned invoices will stay. If I'm not mistaken, the invoices on the source #100 clients will then have gone orphan. And the old service now moved to client #200 will have no invoices under View Invoices link. Sometimes this is the desired situation, but sometimes the client requests us to mirror or move his payment history together with the moved service. And afaik WHMCS does not offer a way to do that. After a couple of tickets, official position of WHCMS developers are: invoices cannot be moved through clients and manual invoices cannot be assigned to any services. This is really caused by two missing features a) A WHMCS based feature to move the billing history of a service together with a moved server b) A WHMCS based feature to assign a given invoice (manually created or not) to a given service This is not a feature request ticket yet - as I started the ticket, this is an information request. Now I can reformulate my first question: do some of you happen to know where in the bare Mysql tables WHMCS assigns an invoice to a service? I'm not ken of poking onto WHMCS Mysql tables directly, this may ruin the system but I like to understand what's happening. I see that under the tblinvoices table there is a field "client ID" . This is how a given invoice is assigned to Mr. Client #100 or any other. All invoices of client #100 will have a client-id field where 100 occurs. Ok leave it alone, let's not change anything (but if we did, we could move a service to another client AND the orphan invoices to the targeted client, without further ado). I'm not suggesting that any of us mess with the bare tables. JFYK. Now I have been extensively searching and never found a single entry on any of the tables which could assign an invoice to a service. But as invoices are actually assigned to services or remain orphans, there must be some field in some table which performs this bind - the binding of an invoice to a given service. My question, for the sake of knowledge only, is if some of you know where it is. Thank you for extensive reading [[]] 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.