mehnihma Posted May 1, 2014 Share Posted May 1, 2014 Hi Is there a way not to generate invoice on order and that is not sent to client. Only when order is marked as paid that invoice is generated and sent to client? I ask because when invoice is created I have to pay tax for it even if it is not paid so if you have any idea how to solve this? Thanks 0 Quote Link to comment Share on other sites More sharing options...
mehnihma Posted May 1, 2014 Author Share Posted May 1, 2014 also I have found this: function disable_00_invoices($vars) { $email_template_name = $vars['messagename']; # Email template name being sent $relid = $vars['relid']; # Related ID it's being sent for - client ID, invoice ID, etc... //Checking for certain template name, if so - this is our case if ($email_template_name == "Invoice Created" || $email_template_name == "Invoice Payment Confirmation") { //getting total of the invoice $result = select_query('tblinvoices', 'total', array("id" => $relid)); $data = mysql_fetch_assoc($result); //if it is equal to '0.00' we disable email sending if (isset($data['total']) && $data['total'] == '0.00') $merge_fields['abortsend'] = true; } return $merge_fields; } add_hook("EmailPreSend",1,"disable_00_invoices"); But it only stops sending 0,00 invoices but it generates invoice, how to stop generating invoice with 0,00? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 1, 2014 Share Posted May 1, 2014 (edited) I think there is a checkbox that you can tick to disable the sending of invoice emails on order. Setup -> General Settings -> Ordering -> No Invoice Email on Order No Invoice Email on Order Ticking this option will stop the Invoice Created and Invoice Due emails from sending when a new order is placed. An invoice will still be generated, use this option to reduce the number of emails clients receive. I don't think you can easily stop it creating any invoices when the client orders - although from the admin side, you can disable invoice creation when creating a new order... Edited May 1, 2014 by brian! 0 Quote Link to comment Share on other sites More sharing options...
mehnihma Posted May 1, 2014 Author Share Posted May 1, 2014 Hi Yes that is to disable sending invoice, but I do not want to generate it 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 1, 2014 Share Posted May 1, 2014 I doubt you can easily prevent billing software from actually billing - it's a core feature! if you have a cron job running, WHMCS will automatically creating renewal invoices in a month/year time - have you thought about how you will handle them? 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.