Jump to content

Changing prorata logic


Kirill

Recommended Posts

If I understand the manual correctly if I enable prorata and set "Charge Next Month" client will be billed for 1 month + prorata. Otherwise client will be billed just for prorata amount. According to our rules we need to bill our client for 1 full month at the time of order and then additionally generate invoice or bill the prorata amount after service is actually provisioned. Can it be made with standard settings or some relatively small programming? If so, any ideas how to do it? Thank you.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Kirill.

 

We actually need to charge pro-rata once the service has been provisioned, and then charge the first full month the following month. As a result we had to disable pro-rata for WHMCS. We also have billing done on the same day for all clients.

 

I wrote a function to tie in to the API. so I have a "Create pro-rata invoice" button that appears under module commands, this then calls the pro rata function which fetches the plan, monthly cost, the date and works out a pro-rata invoice with a setup fee line item - feeds it to the API and sets the next bill date for the service to be first of the following month.

 

I guess you could probably do something like this to achieve what you are looking for - alternatively you may be able to tap in to the create function of whatever module you are using, and have it call a custom function to generate the invoices that way.

 

Hope this information helps you at least a little bit.

 

Dylan

Link to comment
Share on other sites

Hello,

 

Thank you for your response. I was just going to share my solution for this problem.

 

I have created a small module with two functions: one is called by hook when order is manually accepted and generates an invoice for pro-rata amount, another is called by hook when invoice gets paid and changes the due date.

 

If somebody needs this solution feel free to contact me.

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