Jump to content

Post Pone next due date hook


sdemidko

Recommended Posts

Let me introduce my first contribution to whmcs free addons: Post Pone next due date hook.

 

Some of you might be interested in fair dates calculation for invoices paid with overdue.

As an example let's imagine an user has created monthly invoice on October 20th and paid it 2 days late on October 22th.

I assume most of users would like to see their service to be active from 22th Oct till 22th Nov. But native logic doesnt allow that. So I decided to share my experience with due dates manipulating how to deal with this.

 

With this hook you can:

- post pone the due dates for first payment invoices

- enable post pone due dates for renewal invoices

 

Key features:

- works for recurring services only

- changing next due dates of services just like whmcs do it

- changing next invoice dates so it generate renewal invoices on proper date

- changing invoice description so user will see correct period he paid for.

 

Installation:

- download hook: http://www.whmcsjet.com/wp-content/plugins/download-monitor/download.php?id=postpone_due_date.zip

- unzip and upload postpone_due_date.php to /whmcs_path/includes/hooks/ directory

- if you want to enable post pone for renewal invoices edit postpone_due_date.php file and set

$postpone_renewals = TRUE; (line 113)

 

Few examples how does it work:

 

Example 1: User ordered new recurring service with quarterly option on Oct 26th 2012. And paid it same day. Nothing will be changed in this case because there is no overdue yet. So the service's next due date will be set to Jan 26th 2013.

 

Example 2: User ordered new recurring service with monthly option on Oct 26th 2012. And paid it late 2 days on Oct 28th. Our hook is taking action and next due date is set to Nov 28th.

 

for renewals only:

Example 3: Renewal invoice was generated for monthly service with Oct 27th next due date. User was late with payment and paid it on Oct 30th. Our hook is taking action and next due date is set to Nov 30th. Also next invoice date changed and set to Oct 30th, so next renewal invoice will be generated according to 3 late days.

 

 

Feel free to edit it whatever you like. I'm waiting to hear your comments if you find it useful or find some bugs maybe.

Link to comment
Share on other sites

Hi

 

Personally i cant see the point of this hook as your example really makes no sense logically

Some of you might be interested in fair dates calculation for invoices paid with overdue.

As an example let's imagine an user has created monthly invoice on October 20th and paid it 2 days late on October 22th.

I assume most of users would like to see their service to be active from 22th Oct till 22th Nov

.

 

yes they may be 2 days late in paying, so why do you want to change the next due date as the client has still be using your services, all this will do is encourage client to pay late so they can change the due dates on future invoice.

 

just my 2c

Link to comment
Share on other sites

This is very useful if you suspend the services after overdue.

Your customer did not have his services available while suspended so he sort of "assumes" that he will get his billing period reset when renewing late.

 

it is not you as a hosts fault that the client failed to pay and have their account suspended, so why should they assume that due to their neglect you would reset their accounts due dates, as their files etc were still taking up space etc on your server while suspended. It is the same as saying they failed to pay so dont charge a late fee and let the client dictate their own terms

Link to comment
Share on other sites

not 100% of whmcs owners use it for hosting purposes, so some may find it useful, not you though.

 

i would think no matter what you are using WHMCS for it is allowing client to dictate their own terms such as " you have suspended me as i could not be bothered to pay you on time, so i have paid you 5 days late so please change my next date to suit me less the 5 days you suspended me for breaking your TOS.

 

If you pay your utility bills late they dont change your next due date etc. do they?

Link to comment
Share on other sites

You can, for good will to the client, go to the admin product details page and defer the Overide Auto-Suspend to give them extra time to pay.

 

that is true, but as we like a lot will issue invoice days before due date as we issue invocie 14 days before due date then a reminder sent day before due date, on due date then iover due 1,2 and 3 days after due date before suspension, so they have had enough time to pay or contact us to say they may be late. If they contact us before the due date and the reason is valid then we will give then an extra week to pay and we will remove any late fees, but if they dont contact us then all paying will do is unsuspend their accounts the due dates wont change as its not us as sellers that were at fault and all buyers accept our TOS when they join.

Link to comment
Share on other sites

I'm not going to get into a debate about it, but what I meant is that it's an option for him.

Personally if it's not paid on time then it get suspended, if they want it back on then pay the invoice, simple.

 

There is the rare exceptions though where you need to.

Link to comment
Share on other sites

I'm not going to get into a debate about it, but what I meant is that it's an option for him.

Personally if it's not paid on time then it get suspended, if they want it back on then pay the invoice, simple.

 

There is the rare exceptions though where you need to.

 

true Steve, that was i have been trying to get across to the OP etc. as all his addon is going to do is have the client dictate terms

Link to comment
Share on other sites

If some whmcs users need it why do you even care? You are saying customers should not dictate us how to deal with due dates but they never did, I personaly made that choice on my own however YOU Are now traying to dictate ME how to run my own business... Not to mention the most important part IMO is that this hook will post pone first renewal date if first payment was made X days AFTER original order. With offline transactions taking up to days (bank wire) the hook is useful enough.

 

Anyway back to the topic:

 

I gave it a try but it did not seem to work for me.

 

I edited an invoice, changed due date to 26/10 and marked it as paid on 28/10 then waited until whmcs cron job ran but nothing was changed.

 

Did I miss something?

Link to comment
Share on other sites

You are saying customers should not dictate us how to deal with due dates but they never did,

 

Its a PUBLIC forum that is open to debate.

 

If you look at it this way.

 

A client does not pay on time and pays 5 days late, and you have this addon, so when the client pays 5 days late WHMCS changes the next due date by 5 days so they pay on the later date next time, so in effect the user will get 5 days free all because they paid late, so next month they decide to do the same so the system pushes the next invoicce again by 5 days. Some clients will soon find they can do this so it falls on a day thay will suit them each month, so therefore really dictating to the host when they will pay you and not the date they signed up to and agreed too pay each month and some will do this each month knowing the host/seller will do nothing by have their system keep changing the due dates to suit the client.

 

does your Phone, Electric, Gas company do this with their invoices. NO the due dates are kept the same and if you miss you pay a penalty.

 

my 2c

Edited by easyhosting
Link to comment
Share on other sites

Its a PUBLIC forum that is open to debate.

 

If you look at it this way.

 

A client does not pay on time and pays 5 days late, and you have this addon, so when the client pays 5 days late WHMCS changes the next due date by 5 days so they pay on the later date next time, so in effect the user will get 5 days free all because they paid late, so next month they decide to do the same so the system pushes the next invoicce again by 5 days. Some clients will soon find they can do this so it falls on a day thay will suit them each month, so therefore really dictating to the host when they will pay you and not the date they signed up to and agreed too pay each month and some will do this each month knowing the host/seller will do nothing by have their system keep changing the due dates to suit the client.

 

does your Phone, Electric, Gas company do this with their invoices. NO the due dates are kept the same and if you miss you pay a penalty.

 

my 2c

 

This clearly shows that you did not read my posts.

 

I am open to debate, I was only pinpointing the irony of certain comments dictating us how to run our business without being dictated by customers. Not that I care but that was very ironic to me.

 

 

As for the module my services are suspended after 1 day overdue so the customer does not have any access to his service while suspended thus does not get anything for free.

 

If electric/.phone/gas companies were suspending their services after an invoice overdue and if you pay that invoice 28 days later would you feel it fair to have 2 days of service for 1 full month paid? I do not believe so.

 

This module is clearly helpful for MOST (those using "setup after first payment received") whmcs users (im referring to the first renewal invoice being post poned if customer paid his first invoice few days after his order).

The feature to post pone other due dates will only be helpful for CERTAIN whmcs users.

Link to comment
Share on other sites

This clearly shows that you did not read my posts.

 

I am open to debate, I was only pinpointing the irony of certain comments dictating us how to run our business without being dictated by customers. Not that I care but that was very ironic to me.

 

As for the module my services are suspended after 1 day overdue so the customer does not have any access to his service while suspended thus does not get anything for free.

 

if the addon is used in the hosting industry then yes it is allowing clients to dictate terms by having them pay late to have the next invoice date amended, they may not be using the services while suspended but their files etc are still on your server taking up paid space, they failed to pay ontime so they are responsible to make sure they pay their bills ontime.

 

 

If electric/.phone/gas companies were suspending their services after an invoice overdue and if you pay that invoice 28 days later would you feel it fair to have 2 days of service for 1 full month paid? I do not believe so.

 

Maybe not fair, but did the utility company force you to be overdue on your payment. No matter what business if you pay invoices late you pay penalties, this is so that you can learn to pay bills ontime when due.

Link to comment
Share on other sites

This is how YOU see the business. That module was coded for those who want to give their customers what they paid for despite being late in paying their invoice (sh*t happens and you can forget or not be able to pay for different reasons).

 

I am one of these and I am thankful to sdemidko assuming I can get it to work as I ran a test yesterday and nothing seems to have been post poned.

Link to comment
Share on other sites

sh*t happens and you can forget or not be able to pay for different reasons.

 

Yes sh*t happens and if you read all my posts you will see that if a client contacts us before due date with a valid reason then we will not suspend and will even extend their due date for that invoice for 5 days. but you will also get some clients try with differennt excused each month, we had one client that paid ontime for the first 6 months and then they kept paying late with different excuses and asking for us to remove the late fee and then they would pay, we did this for 2 months and then another excuse and a please remove the late fee so we can pay. Once i informed the client that we wont be removing the late fee again as we cant have different excuses each month because they are late in paying as we also have our bills to pay, they paid then placed a cancellation request in with the reason 'unco-operative with late invoices' natually we accepted their cancellation request and even helped them move their account to another host. in the following 12 months we noticed that the domain had moved hosts a further 6 times, so i assume they tried the same excuses etc. with the other hosts.

Link to comment
Share on other sites

sure I did test it, it is working on real setup now.

 

to test first payment you need to:

1. order a service

2. pay invoice at least 1 day late(simply add manual payment for invoice and it will be marked as Paid)

3. you will see next due date of the service will be postponed

Link to comment
Share on other sites

sure

just few lines of code

 

do you think it will be usefull to have a list of "allowed" products to be postponed, or better a list of "excluded" products?

 

That would be very nice.

Well ideally both options would be the best so you can chose either all included either all excluded by default.

Then under that set a list of products that would be included or excluded accordingly.

 

 

 

Else IMO it is better if all the products are included by default so you can only exclude certain ones but that's only my opinion.

 

If you manage to make it please leave me a paypal address so I can make a donation for your work as this is definitely a good improvement to whmcs.

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