Jump to content

Howto use the invoice date instead of the due date for dates in the line items


Recommended Posts

This is something that was a bit of a problem for me, since in switching to whmcs, I had to maintain our old billing methods while also not making it difficult for new clients to sign up. This meant that invoices are sent out on the 1st of the month and credit cards are charged on the 18th, with the bill being for the current month.

 

Originally, I had set up a trigger in the database which changed the line items to have the correct date. However, if a new client signs up, the pro-rating is wrong.

 

My solution now is much simpler. I changed invoice generation to be 0 days before the due date. Then, I added a trigger to the invoices table to increase the due date when an invoice is added. With this, the line items are correct, pro-rating is correct, and I'm sure that everything else - credit card charges, reminders, overdue notices - will be based on the altered due date.

Link to comment
Share on other sites

  • 1 year later...

Hi

 

Sorry to sound like a complete idiot, but with you method will I be able to "hack" WHMCS to do true calendar month billing rather than 30 day cycle billing?

 

I need to be able to have a client signup any time of the month and NOT get a prorate rate, but all invoice have to be due on the first of every month.

 

Will this work?

Link to comment
Share on other sites

This method only changes the due date of the invoice. If you want all invoices due on the 1st of the month, you would need a little more magic. You could probably put another trigger to change the next invoice date of a service when it is created. I have no suggestions for handling the partial first month, though.

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