paperweight Posted December 12, 2012 Share Posted December 12, 2012 (edited) The module "Create" command will not run unless a user pays successfully. But if there is a delay from the time a user first attempts to pay and they day they pay, they will be paying for unused time, right? For example, if on Monday the user tries to buy hosting but they fail to complete the payment processing at Paypal, we will send them an overdue payment invoice. Then if they finally pay on Friday, they will be paying for the tiem from Monday-Friday without ever having the benefit of using the service since the module Create did not run yet. Is there a way to have the invoice/payment start on the day they finally pay? Edited December 12, 2012 by paperweight ahhh... I clicked "Return" befofre editing the HEADLINE of this.... too late! 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted December 17, 2012 Administrators Share Posted December 17, 2012 Hi, WHMCS is designed to work this way. You'd need to manually adjust the Next Due Date if you wanted to give the client extra time. 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted December 17, 2012 Author Share Posted December 17, 2012 Thanks John: If that is the way it works now, I understand. But is there a way to make an adjustment on this for future iterations? I mean can it be adjusted to start on the day payment is made and/or the module is created? I use 2 well-known WHMCS companies to help with modifying my WHMCS installation and both state this has been a pain for them in the past and they have no real advice on what to do either unless it is a core change. So it seems like this is an issue for other clients -- it has actually been an issue for me for 1+ year and I finally got the courage to ask for advice on this 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted December 18, 2012 Share Posted December 18, 2012 I've noticed this as well and never thought it to be very consumer friendly. Here is a hook script that will adjust the next due date based on when the create module was ran successfully. Create this as a php file in includes/hooks (PHP 5.3+ required) and set the time zone correctly in the function. <?php function update_next_due_date_after_create($vars) { // Set this to the time zone of your server. date_default_timezone_set('America/Los_Angeles'); $service_id = $vars['params']['serviceid']; $results = select_query("tblhosting","regdate,nextduedate", array("id" => $service_id)); $service_details = mysql_fetch_array($results); $todays_date = toMySQLDate(getTodaysDate()); // If the registration date is not today, update the next due day. if ($service_details['regdate'] != $todays_date ) { $regdate = new DateTime($service_details['regdate']); $today = new DateTime($todays_date); $next_due_date = new DateTime($service_details['nextduedate']); // Calulate the difference $interval = $regdate->diff($today); // Add the difference to the next due date $next_due_date->add($interval); // update nextduedate and nextinvoicedate update_query("tblhosting", array("nextduedate" => $next_due_date->format('Y-m-d'), "nextinvoicedate" => $next_due_date->format('Y-m-d')), array("id" => $service_id)); } } add_hook("AfterModuleCreate",1,"update_next_due_date_after_create"); ?> 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted May 22, 2013 Author Share Posted May 22, 2013 I've noticed this as well and never thought it to be very consumer friendly. Yikes! Sorry for my loooong delay -- I must have missed this response in my email. I had a developer create something similar to your hook above, and I will have him look at it and see if there is anything we missed. So far in the past few months things are better with the hook. Again, I understand this is how WHMCS is supposed to work, since this is how it works But I have seen and talked to many others who see this as an annoying bug. So hopefully maybe in a future update we will see a radiobutton choice to turn this on or off built into WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Chris Posted May 22, 2013 Share Posted May 22, 2013 http://requests.whmcs.com I would up vote 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted May 22, 2013 Author Share Posted May 22, 2013 I've noticed this as well and never thought it to be very consumer friendly. Yikes! Sorry for my loooong delay -- I must have missed this response in my email. I had a developer create something similar to your hook above, and I will have him look at it and see if there is anything we missed. So far in the past few months things are better with the hook. Again, I understand this is how WHMCS is supposed to work, since this is how it works But I have seen and talked to many others who see this as an annoying bug. So hopefully maybe in a future update we will see a radiobutton choice to turn this on or off built into WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted May 22, 2013 Author Share Posted May 22, 2013 Can you add it to the Requests page please? I just tried adding and then it asks me to get a new username/password and register, so I just stopped -- too troublesome and pain in the butt since I already have usernames for the WHMCS Client area and another one for the Forum... why should I now get one for the Requests? So can you please help and add it to there? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Chris Posted May 22, 2013 Share Posted May 22, 2013 Hello Paperweight, The Feature Requests system has single sign on enabled with the forums - on the register window, just click the SSO link on the top right of that. 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted May 22, 2013 Author Share Posted May 22, 2013 screw it. I wrote a long request, then clicked the SSO and was brought to the Foums page where I was already logged in. When I clicked the Back button, my whole response was deleted. Again, too troublesome. Obviously dozens of other people have mastered this and are smarter than I am, as they appear able to post. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Chris Posted May 22, 2013 Share Posted May 22, 2013 Hey Paperweight, Made it for you: http://requests.whmcs.com/responses/auto-update-next-due-date-on-invoice-paid 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted May 22, 2013 Author Share Posted May 22, 2013 cheers, you guys rock and roll! 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.