<commit_before><table>
  <tr>
    <th></th>
    <th></th>
    <th></th>
    <th colspan="2" style="text-align: center;">MwSt.</th>
    <th></th>
  </tr>
  <tr>
    <th>Anz.</th>
    <th></th>
    <th style="text-align: center;">&#37;</th>
    <th style="text-align: center;">exkl.</th>
    <th style="text-align: center;">inkl.</th>
    <th style="text-align: right;">Total</th>
  </tr>


  <% invoice.lines.each do |il| %>
    <% rebate_string = ""
       rebate_string = " (#{pretty_price(il.single_rebate)} Rabatt)" if il.has_rebate? 
       untaxed_price_string = pretty_price(il.single_untaxed_price, "")
       untaxed_price_string = pretty_price(il.single_untaxed_price - il.single_rebate, "") if il.has_rebate? %>

    <tr class="<%= cycle('even', 'odd')%>">
      <td><%= il.quantity %></td>
      <td class="product"><%= il.text %><%= rebate_string %></td>
      <td class="price"><%= il.tax_percentage %></td>
      <td class="price vertborders"><%= untaxed_price_string %></td>
      <td class="price vertborders"><%= pretty_price(il.single_price, "") %></td>
      <td class="price"><%= pretty_price(il.taxed_price, "") %></td>
      <td></td>
    </tr>
  <% end %>

  <tr class="spacer">
    <td colspan="7">&nbsp;</td>
  </tr>

  <tr class="spacer-bottom">
    <td colspan="7">&nbsp;</td>
  </tr>


  <% if invoice.has_rebate? %>
  <tr>
    <td></td>
    <td>Produkte exkl. MwSt. vor Rabatt</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><% price = invoice.gross_price + invoice.rebate %>
                      <%= pretty_price(price, "") %></td>
    <td></td>
  </tr>

  <tr class="underline">
    <td></td>
    <td>- Rabatt exkl. MwSt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price">- <%= pretty_price(invoice.rebate.rounded, "") %></td>
    <td></td>
  </tr>

  <tr>
    <td></td>
    <td>Produkte exkl. MwSt. nach Rabatt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.gross_price, "") %></td>
    <td></td>
  </tr>

  <tr class="underline">
    <td></td>
    <td>Mehrwertsteuer auf Produkte</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.taxes - invoice.tax_reduction, "") %></td>
    <td></td>
  </tr>
  <% end %>


  <tr>
    <td></td>
    <td>Produkte inkl. MwSt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.products_taxed_price.rounded, "") %></td>
    <td></td>
  </tr>

  <tr>
    <td></td>
    <td>Versand inkl. MwSt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.total_taxed_shipping_price.rounded, "") %></td>
    <td></td>
  </tr>

  <tr>
    <td></td>
    <td><strong>Gesamttotal</strong></td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><strong><%= pretty_price invoice.taxed_price %></strong></td>
    <td></td>
  </tr>

</table>


<p style="margin-top: 3em; text-align: right;">Produkte exkl. MwSt.: <%= pretty_price(invoice.gross_price.to_s, ConfigurationItem.get('currency').value) %><br>
Enthaltene MwSt.: <%= pretty_price(invoice.total_taxes, ConfigurationItem.get('currency').value) %></p><commit_msg>Rounding on customer-facing invoice.<commit_after><table>
  <tr>
    <th></th>
    <th></th>
    <th></th>
    <th colspan="2" style="text-align: center;">MwSt.</th>
    <th></th>
  </tr>
  <tr>
    <th>Anz.</th>
    <th></th>
    <th style="text-align: center;">&#37;</th>
    <th style="text-align: center;">exkl.</th>
    <th style="text-align: center;">inkl.</th>
    <th style="text-align: right;">Total</th>
  </tr>


  <% invoice.lines.each do |il| %>
    <% rebate_string = ""
       rebate_string = " (#{pretty_price(il.single_rebate)} Rabatt)" if il.has_rebate? 
       untaxed_price_string = pretty_price(il.single_untaxed_price, "")
       untaxed_price_string = pretty_price(il.single_untaxed_price - il.single_rebate, "") if il.has_rebate? %>

    <tr class="<%= cycle('even', 'odd')%>">
      <td><%= il.quantity %></td>
      <td class="product"><%= il.text %><%= rebate_string %></td>
      <td class="price"><%= il.tax_percentage %></td>
      <td class="price vertborders"><%= untaxed_price_string %></td>
      <td class="price vertborders"><%= pretty_price(il.single_price.rounded, "") %></td>
      <td class="price"><%= pretty_price(il.taxed_price.rounded, "") %></td>
      <td></td>
    </tr>
  <% end %>

  <tr class="spacer">
    <td colspan="7">&nbsp;</td>
  </tr>

  <tr class="spacer-bottom">
    <td colspan="7">&nbsp;</td>
  </tr>


  <% if invoice.has_rebate? %>
  <tr>
    <td></td>
    <td>Produkte exkl. MwSt. vor Rabatt</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><% price = invoice.gross_price + invoice.rebate %>
                      <%= pretty_price(price, "") %></td>
    <td></td>
  </tr>

  <tr class="underline">
    <td></td>
    <td>- Rabatt exkl. MwSt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price">- <%= pretty_price(invoice.rebate.rounded, "") %></td>
    <td></td>
  </tr>

  <tr>
    <td></td>
    <td>Produkte exkl. MwSt. nach Rabatt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.gross_price, "") %></td>
    <td></td>
  </tr>

  <tr class="underline">
    <td></td>
    <td>Mehrwertsteuer auf Produkte</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.taxes - invoice.tax_reduction, "") %></td>
    <td></td>
  </tr>
  <% end %>


  <tr>
    <td></td>
    <td>Produkte inkl. MwSt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.products_taxed_price.rounded, "") %></td>
    <td></td>
  </tr>

  <tr>
    <td></td>
    <td>Versand inkl. MwSt.</td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><%= pretty_price(invoice.total_taxed_shipping_price.rounded, "") %></td>
    <td></td>
  </tr>

  <tr>
    <td></td>
    <td><strong>Gesamttotal</strong></td>
    <td></td>
    <td></td>
    <td></td>
    <td class="price"><strong><%= pretty_price invoice.taxed_price.rounded %></strong></td>
    <td></td>
  </tr>

</table>


<p style="margin-top: 3em; text-align: right;">Produkte exkl. MwSt.: <%= pretty_price(invoice.gross_price.to_s, ConfigurationItem.get('currency').value) %><br>
Enthaltene MwSt.: <%= pretty_price(invoice.total_taxes, ConfigurationItem.get('currency').value) %></p>
{'fraction_non_alphanumeric': 0.2480198788631775, 'fraction_numerical': 0.0018636434228917534, 'mean_word_length': 2.948497854077253, 'pattern_counts': {'":': 0, '<': 391, '<?xml version=': 0, '>': 391, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1072285', 'n_tokens_mistral': 2703, 'n_tokens_neox': 2561, 'n_words': 428}