Operator Posted August 28, 2009 Share Posted August 28, 2009 (edited) Hey Ever had a client cancel a product only to discover that they had put in the cancellation request after you had already invoiced them for the upcoming renewal? Well my action hook will automatically cancel the invoice once the product has had its status changed to cancelled (ie it will only cancel the invoice once the product has actually been cancelled depending on whether the client chooses immediate or at the end of the period) -My action hook gets executed after the cron job -It will email you a separate cron report (currently no way to add it to the WHMCS cron report) -It only sends the cron report to admins that receive system emails. -It logs itself as having been run in the activity log (like WHMCS cron) -The invoice that gets cancelled has a note added that it was cancelled by the script so you can tell what has been cancelled by it and what hasnt. To install: Just upload the file to the includes/hooks folder of your whmcs installation Thats it your done. Download: http://robertscode.com/projects/whmcs/cancel_request_invoices/cancelrequestinvoices.zip Edited August 28, 2009 by Operator 0 Quote Link to comment Share on other sites More sharing options...
Daniel Posted August 28, 2009 Share Posted August 28, 2009 Nice addition - any chance of a version that isn't encoded? Not wanting to start a debate here but your 'Suspend Override Check' mod wasn't encoded and has saved us many times 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted August 28, 2009 Author Share Posted August 28, 2009 Hi Daniel, Yea i know where your coming from but the suspend override check was a much simpler mod. Hope you enjoy this one to 0 Quote Link to comment Share on other sites More sharing options...
equipc Posted August 28, 2009 Share Posted August 28, 2009 Any chance to buy a non-encoded version ? 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted August 28, 2009 Share Posted August 28, 2009 Just thinking ... Shouldn't this run before the cron job to ensure we don't send an overdue notice to the client when the product is already cancelled? Or am I missing something? Great mod, thanks, although would also love to be able to buy the source, whatever state it's in! 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted August 29, 2009 Author Share Posted August 29, 2009 Just thinking ...Shouldn't this run before the cron job to ensure we don't send an overdue notice to the client when the product is already cancelled? Or am I missing something? Hi Brian Yea i thought about that but the problem is the cancellation requests get processed last in the cron job and the invoices get processed first in the same cron job so if i did it before the cron ran anyone that was to get cancelled that day would have there product cancelled and still emailed an overdue notice after the whmcs cron ran. Cheers 0 Quote Link to comment Share on other sites More sharing options...
jozeph Posted August 29, 2009 Share Posted August 29, 2009 Any chance to buy a non-encoded version ? An missing answer may deduce that the answer is no... 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted August 30, 2009 Share Posted August 30, 2009 I don't understand why anyone would encode a free script. It's not like it contains anything proprietary. Honestly, I (like many others) mistrust anyone who feels the need to obfuscate something that is free. I would think there are only 2 possible reasons to do this: 1) The author plans to make it a paid script at some point 2) There is code in there that opens a backdoor or reveals some information to the author. I have never encoded any of my free addons and will never do so, as there is absolutely no need to. 0 Quote Link to comment Share on other sites More sharing options...
D9Hosting Posted August 30, 2009 Share Posted August 30, 2009 I don't understand why anyone would encode a free script. It's not like it contains anything proprietary. Honestly, I (like many others) mistrust anyone who feels the need to obfuscate something that is free. I would think there are only 2 possible reasons to do this: 1) The author plans to make it a paid script at some point 2) There is code in there that opens a backdoor or reveals some information to the author. I have never encoded any of my free addons and will never do so, as there is absolutely no need to. You choose not to encode yours, other programmers choose the opposite, neither are right or wrong. The topic has been done to death on here, lets not bring it up again As for the MOD, thanks for creating it, I'm sure it will turn out to be a huge time saver! 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted August 30, 2009 Share Posted August 30, 2009 You choose not to encode yours, other programmers choose the opposite, neither are right or wrong. The topic has been done to death on here, lets not bring it up again As for the MOD, thanks for creating it, I'm sure it will turn out to be a huge time saver! Indeed. I will not mention it again. Looking over the mod, it seems to just outright cancel an invoice associated with the product. I see one major problem there: An invoice can contain services that are not related. For instance, another hosting account could be invoiced as it is due on the same day. If you just cancel the invoice, you mess up the other account as well. Please advise. 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted August 31, 2009 Author Share Posted August 31, 2009 Hey Version 1.1 is now released: Changes: Invoice notes are now appended (won't overwrite existing notes) Now compares hosting amount to invoice amount and if they don't match will say this in the cron report advising you to edit the invoice manually. Same download link as above: http://robertscode.com/projects/whmcs/cancel_request_invoices/cancelrequestinvoices.zip 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted August 31, 2009 Share Posted August 31, 2009 Hey Version 1.1 is now released: Changes: Invoice notes are now appended (won't overwrite existing notes) Now compares hosting amount to invoice amount and if they don't match will say this in the cron report advising you to edit the invoice manually. Same download link as above: http://robertscode.com/projects/whmcs/cancel_request_invoices/cancelrequestinvoices.zip What about if the invoice has a late fee applied? Then the invoice amount won't match the hosting amount. The less-than-ideal solution would be to move the hosting product to a new invoice, set it's due date to the same as the old due date, and then mark it as canceled. Then, recalculate the Late Fee on the old invoice (if applicable). That would be the safest way to make it completely automated. Feel free to steal my idea and implement it 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted September 1, 2009 Author Share Posted September 1, 2009 (edited) What about if the invoice has a late fee applied? Then the invoice amount won't match the hosting amount. The less-than-ideal solution would be to move the hosting product to a new invoice, set it's due date to the same as the old due date, and then mark it as canceled. Then, recalculate the Late Fee on the old invoice (if applicable). That would be the safest way to make it completely automated. Feel free to steal my idea and implement it Hi it matches the invoice subtotal before taxes credits and other such fees are applied. Good suggestion. Maybe something i will add next release. Edited September 1, 2009 by Operator 0 Quote Link to comment Share on other sites More sharing options...
keefe007 Posted September 24, 2009 Share Posted September 24, 2009 What happens if the invoice has multiple products on it and only one product is being canceled? 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted September 24, 2009 Author Share Posted September 24, 2009 Hi, It will notify you of this on the cron job indicating that the amounts do not match and the invoice requires manual intervention by yourself to adjust it to the correct amount. 0 Quote Link to comment Share on other sites More sharing options...
sensei Posted October 23, 2009 Share Posted October 23, 2009 Something nice that might be good for the script is, automatic invoice reversal after a package has been terminated for longer than xxx days. This way I don't have to go in manually removing invoices from clients that didn't pay. 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted October 24, 2009 Share Posted October 24, 2009 Something nice that might be good for the script is, automatic invoice reversal after a package has been terminated for longer than xxx days. This way I don't have to go in manually removing invoices from clients that didn't pay. This addon can do that if you set the Enable Termination under Automation Settings in the admin and configure it properly. 0 Quote Link to comment Share on other sites More sharing options...
getnetworks Posted November 15, 2009 Share Posted November 15, 2009 Could you add an option to disable purging the invoice if it is already past due? I'm sure many of us here have a "cancellation policy" in place that requires a customer to "cancel" by a certain time in the renewal cycle (such as x days before the due date) to avoid at least a next monthly renewal. Your mod is great except (if I'm seeing things correctly; please correct me if I am wrong) it can purge invoices that are already past their due date when the customer initiates the cancellation. 0 Quote Link to comment Share on other sites More sharing options...
getnetworks Posted November 18, 2009 Share Posted November 18, 2009 Many providers will likely have a "cancellation policy" requiring a cancellation to be made XX days before the renewal date (or even just the renewal date). It appears your mod will actually allow a customer to cancel a package after their due date has come and gone and then purge invoices that should still be paid. How about an option to not purge the invoice if it is within XX (configurable) before the due date (or on/after the due date)? 0 Quote Link to comment Share on other sites More sharing options...
GORF Posted January 10, 2010 Share Posted January 10, 2010 This script does not work on PHP 4.x. I have 1 installation where the server was upgraded to PHP 5.3.x and the Ioncube loaders do not work, so I had to downgrade to 4 for now. 0 Quote Link to comment Share on other sites More sharing options...
kencox Posted January 21, 2010 Share Posted January 21, 2010 I am getting an error when I run this job. PHP Fatal error: Call to undefined function add_hook() in /usr/local/www/npsis. com/npsiscom/public_html/clients/includes/hooks/cancelrequestinvoices.php on lin e 45 I am on WHMCS Version 4.1.2 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted January 21, 2010 WHMCS Support Manager Share Posted January 21, 2010 Hi, Your cancelrequestinvoices.php addon is causing a problem. You'll need to contact the creator for support. 0 Quote Link to comment Share on other sites More sharing options...
GORF Posted January 21, 2010 Share Posted January 21, 2010 (edited) Ken, Looks like you have a space in /usr/local/www/npsis. com/npsiscom/public_html /npsis. com/ Not sure where that is set, though. Edited January 21, 2010 by TonsOfStores 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted January 26, 2010 Share Posted January 26, 2010 This script does not work on PHP 4.x. I have 1 installation where the server was upgraded to PHP 5.3.x and the Ioncube loaders do not work, so I had to downgrade to 4 for now. You can use mine, which does not require Ioncube as it is not encoded. 0 Quote Link to comment Share on other sites More sharing options...
GORF Posted January 26, 2010 Share Posted January 26, 2010 You can use mine, which does not require Ioncube as it is not encoded. Yes, I have already started looking at it The server was put back on PHP5.x anyway. 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.