Answers.Body: <p>I believe this PR by Andrei (who works on the Wordpress/Caldera form integration) may help fix this (Core) issue:</p>
  
  <p><a href="https://github.com/civicrm/civicrm-core/pull/13477" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/13477</a></p>
  
  <p>It removes bad logic re: participants -originally included in Core invoicing code and works great. I’ve tested it/used it myself using Drupal/Webform CiviCRM module.</p>
  
  <p>Unfortunately Andrei’s PR has been deemed ‘needs work to be reviewable’ - so it has gone nowhere. And that’s unfortunate.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-19T09:41:43.210Z
Answers.Text: Thanks you @KarinG. That fixes the invoice.
Answers.UserDisplayName: Davy Ivins
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-18T12:37:21.717Z
Answers.LastActivityDate: 2019-04-18T12:47:12.023Z
Answers.LastEditDate: 2019-04-18T12:47:12.023Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>I had a similar problem with contribution receipts. In the message template I found {if $lineItem and $priceSetID and !$is_quick_config} Since the Webform CiviCRM Integretion module does not fill in the PriceSet ID fields in the table civicrm_line_item, it does not use this code to pull data for the receipts.</p>
  
  <p>My fix was to remove "and $priceSetID" So it now looks like: {if $lineItem and !$is_quick_config}</p>
  
  <p>Maybe it is the same for events</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-19T11:45:12.180Z
Answers.Text: Thanks for the advice @iowa-boy. Unfortunately the Event template doesn't reference $priceSetID. 
  I'll report back if I find the fix for the event confirmation email.
  (KarinG's advice fixed the invoice problem)
Answers.UserDisplayName: Davy Ivins
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-18T14:41:57.763Z
Answers.LastActivityDate: 2019-04-18T14:41:57.763Z
Answers.UserDisplayName: Iowa Boy
Body: <p>Drupal7 / Civi5.12
  I have created a webform for event bookings, using webform_civicrm.
  The webform uses Participant Fee for the exhibition cost, and a Line Item for an additional booking fee.</p>
  
  <p>Can anyone guide me how to make the line item reflect on the Invoice and in the confirmation email? </p>
  
  <p>UPDATE - the solution from @KarinG below fixes the invoice issue.</p>
  
  <p>STILL NEED HELP WITH CONFIRMATION EMAIL
   - does not print the line item
   - has wrong sales tax amount (shows the percentage not the amount)
   - reflects Amount after tax in the "Amount Before tax' field</p>
  
  <p><a href="https://i.sstatic.net/n3hs4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/n3hs4.png" alt="enter image description here"></a></p>
  
Tags: <drupal><webform-civicrm><invoice><line-items>
Title: (Part solved) Missing line items on event invoice and confirmation email for Event (using Webform CiviCRM)
ThreadText: # (Part solved) Missing line items on event invoice and confirmation email for Event (using Webform CiviCRM)
  
  (Asked by: username_0 on 2019-04-18)
  
  Drupal7 / Civi5.12
  I have created a webform for event bookings, using webform\_civicrm.
  The webform uses Participant Fee for the exhibition cost, and a Line Item for an additional booking fee.
  
  Can anyone guide me how to make the line item reflect on the Invoice and in the confirmation email?
  
  UPDATE - the solution from @KarinG below fixes the invoice issue.
  
  STILL NEED HELP WITH CONFIRMATION EMAIL
  - does not print the line item
  - has wrong sales tax amount (shows the percentage not the amount)
  - reflects Amount after tax in the "Amount Before tax' field
  
  [![enter image description here](https://i.sstatic.net/n3hs4.png)](https://i.sstatic.net/n3hs4.png)
  
  **Tags:** drupal, webform-civicrm, invoice, line-items
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-04-18. Score: 2 | Accepted answer
  
  I believe this PR by Andrei (who works on the Wordpress/Caldera form integration) may help fix this (Core) issue:
  
  <https://github.com/civicrm/civicrm-core/pull/13477>
  
  It removes bad logic re: participants -originally included in Core invoicing code and works great. I’ve tested it/used it myself using Drupal/Webform CiviCRM module.
  
  Unfortunately Andrei’s PR has been deemed ‘needs work to be reviewable’ - so it has gone nowhere. And that’s unfortunate.
  
  > **Comments:**
  > **username_0**: Thanks you @KarinG. That fixes the invoice.  
  
  ---
  
  ### Answer by username_2 on 2019-04-18. Score: 0
  
  I had a similar problem with contribution receipts. In the message template I found {if $lineItem and $priceSetID and !$is\_quick\_config} Since the Webform CiviCRM Integretion module does not fill in the PriceSet ID fields in the table civicrm\_line\_item, it does not use this code to pull data for the receipts.
  
  My fix was to remove "and $priceSetID" So it now looks like: {if $lineItem and !$is\_quick\_config}
  
  Maybe it is the same for events
  
  > **Comments:**
  > **username_0**: Thanks for the advice @iowa-boy. Unfortunately the Event template doesn't reference $priceSetID.  I'll report back if I find the fix for the event confirmation email. (KarinG's advice fixed the invoice problem)  
  
  ---
  
  