<!-- Check file docoverview_ro.css for stylesheet definition. It is added
     to the html output automagically.
  -->
<body>

<table width="100%" border="0">
<tr>
 <td>{{ doc.address|linebreaks }}</td>
 <td align="right"><b>{{ doc.docType }}</b><br/>{{ doc.dateStr }}
 <br/>{% if doc.isDraftState %}
   DRAFT
 {% else %}
   {{ doc.ident }}
 {% endif %}</td>
</tr>
</table>
<hr width="90%" color="#431222"/>
<p style="margin-top:1em;">
{{ doc.salut }}
</p>

<p>
  {% if enableHtmlInTexts %}
    {{ doc.preText|linebreaks }}
  {% else %}
    {{ doc.preTextHtml|safe }}
  {% endif %}
</p>

<table width="100%" border="0">

{% for item in doc.items %}
<tr>
<td width="20">{{ item.itemNumber }}.</td>
<td colspan="3">
          {% if item.kind == 'Alternative' or item.kind == 'Demand' %}
            <i>
          {% endif %}
          {% if enableHtmlInTexts %}
            {{ item.text|linebreaks }}
          {% else %}
            {{ item.htmlText|safe }}
          {% endif %}
          {% if item.kind == 'Alternative' or item.kind == 'Demand' %}
            </i>
          {% endif %}
</td>
<td></td>
</tr>

<tr>
  <td></td>
  <td align="right">{{ item.amount }} {{ item.unit }}</td>
  <td width="100" align="right">je {{ item.unit }}</td>
  <td width="100" align="right">{{ item.unitPrice }}</td>
  <td width="10" align="right">
    {% if doc.hasIndividualTaxation %}
      {{ item.taxMarker }}
    {% endif %}
  </td>
</tr>
<tr><td colspan="5"/></tr>
{% endfor %}
<tr>
   <td colspan="1"></td>
   <td colspan="4" align="right">__________________________________________</td>
</tr>

<tr height="5em">
   <td colspan="2"></td>
   <td>{{ label.NET }}</td>
   <td class="col-TotalSum">{{ doc.nettoSumStr }}</td>
</tr>
   {% if doc.hasIndividualTaxation %}
     {# This section is shown for documents with individual tax rates #}
     <tr>
       <td colspan="2"></td>
       <td><sup><small>{{ doc.taxMarkerReduced }}</small></sup>&nbsp;
          +{{ doc.reducedTaxPercentStr }}% {{ label.VAT }}</td>
       <td class="col-TotalSum">{{ doc.reducedTaxSumStr }}</td>
     </tr>
     <tr>
       <td colspan="2"></td>
       <td><sup><small>{{ doc.taxMarkerFull }}</small></sup>&nbsp;
          +{{ doc.fullTaxPercentStr }}% {{ label.VAT }}</td>
       <td class="col-TotalSum">{{ doc.fullTaxSumStr }}</td>
     </tr>
      {% else %}
     <tr>
       <td colspan="2"></td>
       {# This section is shown for documents with one consistent tax rate #}

       {# Note: taxPercentStr can either be reduced or full, depending on #}
       {# the tax settings of the document #}
         <td>+{{ doc.taxPercentStr }}% {{ label.VAT }}</td>
         <td class="col-TotalSum">{{ doc.taxSumStr }}</td>
     </tr>
      {% endif %}
      <tr>
        <td colspan="2"></td>
        <td><b>{{ label.SUM }}</b></td>
        <td class="col-TotalSum">{{ doc.bruttoSumStr }}</td>
      </tr>
</table>

<p style="margin-top:3em;">
    {% if enableHtmlInTexts %}
      {{ doc.postText|linebreaks }}
    {% else %}
      {{ doc.postTextHtml|safe }}
    {% endif %}

</p>
<p style="margin-top:2em;">
{{ doc.goodbye }}
</p>
</body>
