<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>{{ tran("{DeliverySheet}") }} {{ order.auto_number }}</title>

    <!-- Do not import Bootstrap in this file, it fucks it up -->
    <!-- Note: in order to work in reverse proxy, we cannot use an absolute path beginning with / -->
    {% include 'printouts/_overlay.html' %}

    <style>
      body {
        font-family: "Helvetica Neue", sans-serif;
        font-size: 15px;
      }
      .float {
        height: 5mm; /* default */
      }
    </style>
  </head>
  <body onload="prune()">

    <div class="print-repeated" id="main">

      <!-- ramecek -->
      <div class="float heavy-box" style="top: 10mm; left: 10mm; width: 190mm; height: 277mm;"></div>

      <!-- sekce hlavicka -->
      <div class="float light-box" style="top: 10mm; left: 10mm; width: 190mm; height: 24mm;"></div>
      <!-- logo -->
      <div class="float light-box" style="
           top: 10mm; left: 10mm; width: 63mm; height: 24mm;
           display: flex; justify-content: center; align-items: center;
      ">{% include 'printouts/_logo.html' %}</div>
      <!-- titulek -->
      <b>
        <div class="float light-box" style="top: 10mm; left: 73mm; width: 63mm; height: 24mm;"></div>
        <span class="float" style="top: 13mm; left: 83mm; height: 10mm; font-size: 32px">Dodací list</span>
        <span class="float" style="top: 25mm; left: 90mm;">betonové směsi</span>
      </b>
      <!-- dodací list č. -->
      <b>
        <div class="float light-box" style="top: 10mm; left: 136mm; width: 64mm; height: 12mm;"></div>
        <span class="float" style="top: 11mm; left: 139mm;">Číslo:</span>
        <span class="float" style="top: 16mm; left: 143mm;">{{ order.auto_number }}</span>
      </b>
      <!-- datum dodávky -->
      <b>
        <div class="float light-box" style="top: 22mm; left: 136mm; width: 64mm; height: 12mm;"></div>
        <span class="float" style="top: 23mm; left: 139mm;">Datum dodávky:</span>
        <span class="float" style="top: 28mm; left: 143mm;">{{ order._date_human }}</span>
      </b>

      <!-- sekce prodavajici -->
      <!-- spolecnost -->
      <b>
        <span class="float" style="top: 37mm; left: 15mm;">Prodávající:</span>
        <span class="float" style="top: 42mm; left: 15mm;">{{ setup.company_name }}</span>
      </b>
      <span class="float" style="top: 47mm; left: 15mm;">{{ setup.company_address }}, {{ setup.company_zip }} {{ setup.company_city }}</span>
      <span class="float" style="top: 52mm; left: 15mm;">IČO: {{ setup.company_idnum}}</span>
      <span class="float" style="top: 57mm; left: 15mm;">DIČ: {{ setup.company_vat_idnum}}</span>
      <!-- betonarna -->
      <b>
        <span class="float" style="top: 42mm; left: 105mm;">{{ setup.facility_name }}</span>
      </b>
      <span class="float" style="top: 47mm; left: 105mm;">{{ setup.facility_address }}, {{ setup.facility_zip }} {{ setup.facility_city }}</span>
      <span class="float" style="top: 52mm; left: 105mm;">Tel: {{ setup.facility_phone }}</span>
      <span class="float" style="top: 57mm; left: 105mm;">email: betonarna@staving.cz</span> <!-- TODO: We dont have a field for this -->

      <!-- sekce kupujici -->
      <div class="float light-box" style="top: 64mm; left: 10mm; width: 190mm; height: 30mm;"></div>
      <!-- kupujici -->
      {% set customer = order._customer_record %}
      <b>
        <span class="float" style="top: 67mm; left: 15mm;">Kupující:</span>
      </b>
      <span class="float" style="top: 72mm; left: 15mm;">{{ order.customer }}</span>
      <span class="float" style="top: 77mm; left: 15mm;">{{ customer.address }}</span>
      <span class="float" style="top: 82mm; left: 15mm;">{{ customer.zip }} {{ customer.city }}</span>
      <span class="float" style="top: 87mm; left: 15mm;">DIČ: {{ customer.vat_idnum }}</span>
      <!-- prijemce -->
      <b>
        <span class="float" style="top: 67mm; left: 105mm;">Příjemce:</span>
        <span class="float" style="top: 87mm; left: 105mm;">Stavba:</span>
      </b>
      <span class="float" style="top: 87mm; left: 121mm;">{{ order.construction_site }}</span>

      <!-- sekce predmet dodavky -->
      <b>
        <!-- leva strana -->
        <span class="float" style="top: 97mm; left: 15mm; font-size: 16px">PŘEDMĚT DODÁVKY</span>
        <span class="float" style="top: 103mm; left: 15mm;">Pevnostní třída betonu:</span>
        <span class="float" style="top: 103mm; left: 66mm;">{{ order.r_recipe_class}}</span>
        <span class="float" style="top: 109mm; left: 15mm;">Stupně vlivu prostředí:</span>
        <span class="float" style="top: 109mm; left: 66mm;">{{ order.r_exposure_classes }}</span>
        <span class="float" style="top: 115mm; left: 15mm;">Cement:</span>
        <span class="float" style="top: 115mm; left: 66mm;">{{ materials["Cement_oneline"] }}</span>
        <span class="float" style="top: 121mm; left: 15mm;">Zvláštní vlastnosti:</span>
        <span class="float" style="top: 121mm; left: 66mm;"></span>  <!-- TODO what is this-->
        <span class="float" style="top: 127mm; left: 15mm;">Horní mez zrna kameniva:</span>
        <span class="float" style="top: 127mm; left: 66mm;">{{ order.r_d_max }} mm</span>
        <span class="float" style="top: 133mm; left: 15mm;">Dodané množství:</span>
        <span class="float" style="top: 133mm; left: 66mm;">{{ order.volume }} m³</span>
        <!-- prava strana -->
        <span class="float" style="top: 103mm; left: 105mm;">Konzistence:</span>
        <span class="float" style="top: 103mm; left: 132mm;">{{ order.r_consistency_class }}</span>
        <span class="float" style="top: 103mm; left: 152mm;">Vodní součinitel:</span>
        <span class="float" style="top: 103mm; left: 185mm;">{{ order.r_vc }}</span>
        <span class="float" style="top: 109mm; left: 105mm;">Přísada:</span>
        <span class="float" style="top: 109mm; left: 132mm;">{{ materials["Admixture_oneline"] }}</span>
        <span class="float" style="top: 115mm; left: 105mm;">Příměs:</span>
        <span class="float" style="top: 115mm; left: 132mm;">{{ materials["Addition_oneline"] }}</span>
        <span class="float" style="top: 121mm; left: 105mm;">Datum a čas plnění:</span>
        <span class="float" style="top: 121mm; left: 160mm;">{{ delivery._water_cement_contact_t_human }}</span>
        <span class="float" style="top: 127mm; left: 105mm;">Venkovní teplota:</span>
        <span class="float" style="top: 127mm; left: 160mm;">{{ order.temperature_air }} °C</span>
        <span class="float" style="top: 133mm; left: 105mm;">Kategorie obsahu chloridů:</span>
        <span class="float" style="top: 133mm; left: 160mm;">{{ order.r_cl_content }}</span>
      </b>

      <!-- sekce prohlaseni -->
      <div class="float light-box" style="top: 142mm; left: 10mm; width: 190mm; height: 45mm;"></div>
      <span class="float multiline-wrap" style="top: 145mm; left: 15mm; width: 183mm; height: 40mm;">{{ setup.certification_text }}</span>

      <!-- sekce doprava -->
      <b>
        <span class="float" style="top: 190mm; left: 15mm;">PŘEPRAVNÍ PROSTŘEDEK</span>
        <span class="float" style="top: 190mm; left: 73mm;">vlastní&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;cizí</span>
        <span class="float" style="top: 195mm; left: 15mm;">Druh:</span>
        <span class="float" style="top: 200mm; left: 19mm;">{{ delivery.car_car_type }}</span>
        <span class="float" style="top: 195mm; left: 60mm;">SPZ:</span>
        <span class="float" style="top: 200mm; left: 64mm;">{{ delivery.car_registration_number }}</span>
        <span class="float" style="top: 195mm; left: 105mm;">Řidič:</span>
        <span class="float" style="top: 200mm; left: 109mm;">{{ delivery.driver_name }}</span>
        <span class="float" style="top: 195mm; left: 150mm;">Podpis:</span>
      </b>

      <!-- sekce ulozeni smesi -->
      <div class="float light-box" style="top: 207mm; left: 10mm; width: 190mm; height: 52mm;"></div>
      <b>
        <span class="float" style="top: 210mm; left: 15mm; font-size: 16px;">ULOŽENÍ SMĚSI</span>
      </b>
      <span class="float" style="top: 210mm; left: 50mm; font-size: 13px;">(vyplňuje se v případě dopravy směsi na staveniště zajišťované prodávajícím)</span>
      <b>
        <!-- leva strana -->
        <span class="float" style="top: 216mm; left: 15mm;">Druh přísady přidané na stavbě:</span>
        <span class="float" style="top: 230mm; left: 15mm;">Ředěno na stavbě vodou:</span>
        <span class="float" style="top: 230mm; left: 73mm;">ANO&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;NE</span>
        <span class="float" style="top: 237mm; left: 15mm;">Čas dodání na staveniště:</span>
        <span class="float" style="top: 244mm; left: 15mm;">Čas zahájení vyprazdňování:</span>
        <span class="float" style="top: 251mm; left: 15mm;">Čas ukončení vyprazdňování:</span>
        <!-- prava strana -->
        <span class="float" style="top: 216mm; left: 105mm;">Množství na 1 m³ směsi:</span>
        <span class="float" style="top: 223mm; left: 105mm;">Nařídil . . . . . . . . . . . . . . . .</span>
        <span class="float" style="top: 230mm; left: 105mm;">Nařídil . . . . . . . . . . . . . . . .</span>
      </b>

      <!-- sekce podpis -->
      <b>
        <span class="float" style="top: 262mm; left: 15mm;">Podpis prodávajícího:</span>
        <span class="float" style="top: 262mm; left: 105mm;">Podpis kupujícího - příjemce:</span>
      </b>

    </div>

    {% include 'printouts/_control_buttons.html' %}

  </body>
</html>
