<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Ponuka {{ user.DEFAULT_COMPANY.name }} {{ number }}</title>
  <style>
    {% if PDF_EXPORT %}
      * { font-family: Dejavu Sans !important; line-height: 0.95em; font-size: 10pt; }
    {% else %}
      * { font-family: Verdana !important; font-size: 10pt; }
    {% endif %} 
    .fbigger { font-size: 12pt; }
    table { width: 100%; border-collapse: collapse; }
    table td { vertical-align: top; }
    .dmain { border: 0.2mm solid #444444; margin-top: 0.5em; }
    .dcolumn { width: 50%; float: left; }
    .content { padding: 4pt; }
    .odberatel { border: 0.5mm solid #444444; }
    .dodod_info { color: #777; text-transform: uppercase; padding-bottom: 2mm; text-align: left; }
    .dodod_info span { border-bottom: 0.2mm solid #777; font-size: 8pt; font-style: italic; }
    .faktura_info { padding: 16pt 2pt 6pt 2pt; text-align: left; }
    table.polozky td { padding: 0.8pt; font-size: 9pt; vertical-align: middle; }
    table.polozky tr.header td { font-weight: bold; border-bottom: 0px solid #777; }
    table.polozky tr.sep td { width: 100%; height: 4pt; }
    .sumar { width: 100%; float: right; }
    .sumar table td { padding: 0.8pt; vertical-align: middle; }
    .sumar table tr.sep td { width: 100%; height: 10pt; }
    .sumar table tr.suma td { border-top: 0.2mm solid #777; padding-top: 1mm; }
    .text-right { text-align: right; }
  </style>
</head>
<body>
  <!-- TOP -->
  <div>Ponuka č. <b>{{ identifier }}</b></div>
  <br/>
  <div class="dmain">
    <!-- DODAVATEL -->
    <div class="dcolumn">
      <div class="content">
        <table>
          <tr>
            <td style="padding-top:0.5em">
              <img src="{{ config.uploadUrl }}/{{ user.DEFAULT_COMPANY.logo }}" style="max-width:80px;max-height:80px;">
            </td>
            <td style="width:95%;padding-left:1em;padding-top:0.5em">
              {{ PROFILE.headline }}
            </td>
          </tr>
        </table>
        <br/>
        <div>
          <b>DODÁVATEĽ</b><br/>
          <br/>
          <b>{{ user.DEFAULT_COMPANY.name }}</b><br/>
          {{ user.DEFAULT_COMPANY.street_1 }}<br/>
          {% if user.DEFAULT_COMPANY.street_2 %} {{ user.DEFAULT_COMPANY.street_2 }}<br/> {% endif %}
          {{ user.DEFAULT_COMPANY.zip }} {{ user.DEFAULT_COMPANY.city }}<br/>
          {% if user.DEFAULT_COMPANY.country %} {{ user.DEFAULT_COMPANY.country }}<br/> {% endif %}
          <br/>
          {% if user.DEFAULT_COMPANY.registration_id %} IČO: {{ user.DEFAULT_COMPANY.registration_id }}<br/> {% endif %}
          {% if user.DEFAULT_COMPANY.tax_id %} DIČ: {{ user.DEFAULT_COMPANY.tax_id }}<br/> {% endif %}
          {% if user.DEFAULT_COMPANY.vat_id %} IČDPH: {{ user.DEFAULT_COMPANY.vat_id }}<br/> {% endif %}
          <br/>
          {{ user.DEFAULT_COMPANY.business_register }}<br/>
        </div>
      </div>
    </div>
    <!-- ODBERATEL -->
    <div class="dcolumn">
      <div class="content odberatel">
        <b>ODBERATEĽ</b><br/>
        <br/>
        <b>{{ CUSTOMER.name }}</b><br/>
        {{ CUSTOMER.street_line_1 }}<br/>
        {% if CUSTOMER.street_line_2 %} {{ CUSTOMER.street_line_2 }}<br/> {% endif %}
        {% if CUSTOMER.region %} {{ CUSTOMER.region }}<br/> {% endif %}
        {{ CUSTOMER.postal_code }} {{ CUSTOMER.city }}<br/>
        {% if CUSTOMER.country %} {{ CUSTOMER.country }}<br/> {% endif %}
        <br/>
        {% if CUSTOMER.customer_id %} IČO: {{ CUSTOMER.customer_id }}<br/> {% endif %}
        {% if CUSTOMER.tax_id %} DIČ: {{ CUSTOMER.tax_id }}<br/> {% endif %}
        {% if CUSTOMER.vat_id %} IČDPH: {{ CUSTOMER.vat_id }}<br/> {% endif %}
      </div>
    </div>
    <div style="clear:both;"></div>
  </div>

  {% if description_before %}
    <div style="text-align:left;margin:1em 0em;color:blue">{{ description_before }}</div>
  {% endif %}

  <!-- POLOZKY -->
  <div class="dmain">
    <div class="content">
      <table class="polozky">
        <thead>
          <tr class="header" style="background:#EEEEEE">
            <td style="width:100%;padding:5pt 5pt 5pt 5pt">
              <table style="width:100%">
                <tbody>
                  <tr>
                    <td style="width:50%">Položka</td>
                    <td style="width:50%;text-align:right">Jednotková cena × Počet = Cena</td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </thead>
        <tbody>
          {% for i in ITEMS %}
            <tr>
              <td style="width:100%;">
                <table style="width:100%">
                  <tbody>
                    <tr>
                      <td style="width:50%;color:blue">
                        <i>{{ i.title }}</i>
                        <div style="color:#444444;font-size:8pt">{{ i.description }}<div>
                      </td>
                      <td style="width:50%;text-align:right">
                        <span>{{ hubleto.locale().formatCurrency(i.unit_price * (100 - i.discount)/100, CURRENCY.symbol) }}</span>
                        ×
                        {{ hubleto.locale().formatNumber(i.amount, 4) }}
                        = <b><span>{{ hubleto.locale().formatCurrency(i.price_excl_vat, CURRENCY.symbol) }}</span> bez DPH</b>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </div>

  {% if description_after %}
    <div style="text-align:left;margin:1em 0em;white-space:pre-wrap;">{{ description_after }}</div>
  {% endif %}

  <br/>
  <br/>
  Vystavil {{ user.first_name }} {{ user.last_name }} {{ now }}.<br/>
  Vygenerované v ERP Hubleto.
  https://www.hubleto.eu<br/>
</body>