Jump to content

Hosting and order statuses.


doml

Recommended Posts

Is there such a thing as a complete and detailed description of the precise definitions of the various order and hosting statuses? I am trying to distinguish between orders / invoice items that are for services that have *never* been paid for and ones where the customer has stopped paying.

 

There are various statuses available:

tblinvoices: paid, unpaid, cancelled, refunded

tblorders: active, fraud, cancelled, pending

tblhosting: pending, active, suspended, terminated, cancelled, fraud

 

Any hints here?

Link to comment
Share on other sites

  • WHMCS Support Manager

The statuses of tblinvoices refer to individual invoices.

 

tblorders refers to the order and can only change from pending to active manually (ie. by your staff accepting the order).

 

tblhosting refers to the status of the hosting account. If it was terminated or suspended this would suggest the client had stopped paying. If it was cancelled this means the client placed a cancellation request.

Link to comment
Share on other sites

Thanks for the quick reply. Still trying to put all the different elements together. If there is a customer with hosting paid on a monthly basis, there is, I assume, one invoice per month, and also one order per month, and one entry

in tblhosting per month. How could I find a previous invoice for the same service? If I could do that then I would

know whether or not a particular unpaid invoice is for a service that has previously been paid for or not.

 

As for the tblhosting status - I assume pending means an order that has been placed but not paid for yet. Is there anyway that this will change to anything else except through a payment being made?

Link to comment
Share on other sites

Thanks for the quick reply John. I tried to post a follow-up yesterday but it seems to have not turned up.

 

I am still trying to figure out how best to find out whether a service has ever been live and paid for. Any hints? If the order has never been paid for does tblhosting stay as "pending" or can it also end up as "cancelled" if the user cancels it?

 

There seems to be a one-to-one relationship between invoices orders and hosting. How can I find a previous invoice for the same hosting service?

Link to comment
Share on other sites

  • WHMCS Support Manager

Looks like your earlier post was flagged by moderation automatically by the forum software, I've approved it now.

 

As the order status relies on you and your staff manually changing the status, and as long as you accept orders once they are paid and setup, it would be safe to assume that pending orders were never paid.

Link to comment
Share on other sites

OK, I've scratched away at the database and I have two proposed methods of distinguishing between a service that has never been paid for and one that is being allowed to lapse. [1].

 

One - if the date and duedate of an invoice are the same, then this is the first invoice for a particular service, and therefore it is a new service.

 

Two - if there is a an entry in the orders table where invoiceid = this invoice, then this the first invoice for this service.

 

Which do you recommend?

 

[1] You may wonder why - accountancy reasons. If the customer neither cancels nor pays then service is provided for a few more days, to give them time to get back on board. But if they still don't pay, then a service has been provided for which no payment has been made.

Link to comment
Share on other sites

If there is a customer with hosting paid on a monthly basis, there is, I assume, one invoice per month, and also one order per month, and one entry in tblhosting per month

 

No, there is one orer when it s ordered, one hosting/service record when it is ordered, and n invoices 1 per frequency

 

How could I find a previous invoice for the same service?

where the id & type on the invoiceitem is the product you are looking for and date is before the curren invoice date, ordered by date desc limited to 1 result ...

 

know whether or not a particular unpaid invoice is for a service that has previously been paid for or not.

Almost, you'd want to check if the unpaid invoice os for a service that has *any* paid invoices not just *the previous* paid invoice ...

 

As for the tblhosting status - I assume pending means an order that has been placed but not paid for yet. Is there anyway that this will change to anything else except through a payment being made?

No, it means the service isnt yet active (provisioned)

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