Jump to content

Invoice question


mehnihma

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by brian!
Link to comment
Share on other sites

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?

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