Answers.Body: <p>This has been fixed now with this <a href="https://github.com/civicrm/civicrm-core/pull/24065" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/24065</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-12T19:56:53.620Z
Answers.LastActivityDate: 2022-08-12T19:56:53.620Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>Currently running Civi 5.49.1 but I've been seeing this behaviour for a little while now. I've got Civi set up to apply VAT (sales tax) and issue invoices, which go out with event registration confirmation emails. All good.</p>
  <p>What used to happen as far as I can recall is that if the event was free, then no invoice was created or sent. Ideal.</p>
  <p>However what I'm seeing is that participants are being sent confirmation emails with an attached file called 'invoice.pdf' which is blank. Not good.</p>
  <p>Before I log this as an issue in Gitlab, is there a recent change in the settings/config around invoicing that I'm missing, or is this a bug that others are seeing?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-16T10:49:59.493Z
Comments.Text: Noticed a similar thing when registering users via the back end, non paid event and sending a confirmation email with tax enabled. Blank invoice.pdf attached to the email. Have you logged a bug report by any chance or resolved the issue?
Comments.UserDisplayName: Adam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-16T19:58:01.137Z
Comments.Text: just putting a note for myself that we also had a report of this but have not solved yet but the example we were told about was not a free event (but we didn't get all the evidence sent on to us). r26419
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-10T23:56:04.330Z
Comments.Text: more info - I can ONLY replicate this if I do an 'offline' registration for someone. if i do an 'online' one I get a PDF called confirmation.pdf which mirrors what is in the email. if i do offline then i get a 1kb pdf that is completely blank called invoice.pdf. hopefully have a fix early next week but what is better? A/ No pdf? or B/ a non-blank PDF that, as per the online one, is called confirmation.pdf and just mirrors what is in the email. suspect A/ is easier
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-10T23:56:52.080Z
Comments.Text: note - i was misled by a client reporting this was happening when folk were registering, but turns out they were being registered via backend!
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-11T14:12:27.563Z
Comments.Text: As I don't send a confirmation.pdf what I'd like to see happen is that regardless of whether the registration is done via front or back end, no blank invoice is produced or sent for non-paid events. In cases where a confirmation is sent as a PDF, I would expect that to be sent regardless. An invoice only makes sense for a paid event.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-12T18:16:04.900Z
Comments.Text: I think this is fixed in 5.53 - see https://github.com/civicrm/civicrm-core/pull/24065
Comments.UserDisplayName: Demerit
Tags: <civicontribute><invoice>
Title: How can I stop blank invoices being sent out with confirmation emails for non-paid events?
ThreadText: # How can I stop blank invoices being sent out with confirmation emails for non-paid events?
  
  (Asked by: username_0 on 2022-05-16)
  
  Currently running Civi 5.49.1 but I've been seeing this behaviour for a little while now. I've got Civi set up to apply VAT (sales tax) and issue invoices, which go out with event registration confirmation emails. All good.
  
  What used to happen as far as I can recall is that if the event was free, then no invoice was created or sent. Ideal.
  
  However what I'm seeing is that participants are being sent confirmation emails with an attached file called 'invoice.pdf' which is blank. Not good.
  
  Before I log this as an issue in Gitlab, is there a recent change in the settings/config around invoicing that I'm missing, or is this a bug that others are seeing?
  
  **Tags:** civicontribute, invoice
  
  > **Comments:**
  > **username_1**: Noticed a similar thing when registering users via the back end, non paid event and sending a confirmation email with tax enabled. Blank invoice.pdf attached to the email. Have you logged a bug report by any chance or resolved the issue?  
  > **username_2**: just putting a note for myself that we also had a report of this but have not solved yet but the example we were told about was not a free event (but we didn't get all the evidence sent on to us). r26419  
  > **username_2**: more info - I can ONLY replicate this if I do an 'offline' registration for someone. if i do an 'online' one I get a PDF called confirmation.pdf which mirrors what is in the email. if i do offline then i get a 1kb pdf that is completely blank called invoice.pdf. hopefully have a fix early next week but what is better? A/ No pdf? or B/ a non-blank PDF that, as per the online one, is called confirmation.pdf and just mirrors what is in the email. suspect A/ is easier  
  > **username_2**: note - i was misled by a client reporting this was happening when folk were registering, but turns out they were being registered via backend!  
  > **username_0**: As I don't send a confirmation.pdf what I'd like to see happen is that regardless of whether the registration is done via front or back end, no blank invoice is produced or sent for non-paid events. In cases where a confirmation is sent as a PDF, I would expect that to be sent regardless. An invoice only makes sense for a paid event.  
  > **username_3**: I think this is fixed in 5.53 - see https://github.com/civicrm/civicrm-core/pull/24065  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-08-12. Score: 0
  
  This has been fixed now with this <https://github.com/civicrm/civicrm-core/pull/24065>
  
  
  ---
  
  