# Для замовлень

#### Інструкції:

* [Як використовувати шаблони з бібліотеки та створювати власні шаблони документів](https://help.keycrm.app/uk/work-with-orders/iak-stvoriti-novii-shablon-druku-dlia-administratoriv);
* [Довідник доступних тегів, функцій та фільтрів Twig](https://help.keycrm.app/uk/process-automation-api-and-more/dovidnik-dostupnikh-funktsii-ta-fil-triv-twig);
* [Приклади рішень та відповіді на поширені запитання](https://help.keycrm.app/uk/work-with-orders/faq-creation-of-documents-for-protection).

### 1. Товарний чек

{% tabs %}
{% tab title="Зовнішній вигляд" %}
![](/files/q8xL7uF5mvDtR5zuowSE)
{% endtab %}

{% tab title="Код шаблону" %}
**Тип шаблону:** Замовлення

```html
<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Invoice</title>
</head>
<body>

<div class="container">

  <table class="width100">
    <tbody>
    <tr>
      <td class="logo-wrapper" valign="top">
          <img src="https://freerider.in.ua/image/catalog/1_theme/logo.png.pagespeed.ce.NIX_9YdKz2.png" style="width: 200px;" alt="">
      </td>
      <td valign="top">
        <span style="background-color: yellow">м.Київ вул. Гончара, 52</span><br />
        <span style="background-color: yellow">googrider@ukr.net</span><br />
      </td>
      <td valign="top">
        <span style="background-color: yellow">тел.: (044)777-77-77</span><br />
        <span style="background-color: yellow">тел.: (095)777-77-77</span><br />
        <span style="background-color: yellow">тел.: (067)777-77-77</span><br />
      </td>
    </tr>
    </tbody>
  </table>
  
  <br /><br /><br />

  <table class="width100">
    <tbody>
    <tr>
      <td valign="top" class="label" style="width:50%">
          <span style="background-color: yellow">Постачальник: FAA unique presents</span><br />
          <span style="background-color: yellow">ФОП Неоменко А.Ф.</span><br />
          <span style="background-color: yellow">м.Київ вул. Гончара, 52</span><br />
          <span style="background-color: yellow">тел.: (044)777-77-77</span><br />
      </td>
      <td valign="top" class="label">
          Одержувач: {{ model.client_name }}<br />
          тел.: {{ model.client_phone }}<br />
          {% if model.client_email %}
            email: {{ model.client_email }}
          {% endif %}
      </td>
    </tr>
    </tbody>
  </table>
  <br />

  <p class="big-text text-center" style="margin-bottom: 10px">
    {% set mnths = ['','січня','лютого','березня','квітня','травня','червня','липня','серпня','вересня','жовтня','листопада','грудня'] %}
    
    Товарний чек №{{ model.id }} від {{ model.created_at|date("j") }} {{ mnths[model.created_at|date("n")] }} {{ model.created_at|date("Y") }} р.
  </p>

  <table class="width100 border">
    <thead class="table-products">
      <tr>
        <th class="text-center">№</th>
        <th>Код товару</th>
        <th class="name-col">Назва товару</th>
        <th>Од.</th>
        <th>Кількість</th>
        <th>Ціна</th>
        <th>Сума</th>
      </tr>
      
      {% for key, product in model.products %}
      <tr>
        <td class="text-center">{{key + 1}}</td>
        <td class="text-center">{{ product.product_sku }}</td>
        <td style="width:50%">{{ product.product_name }}</td>
        <td class="text-center">шт</td>
        <td class="text-center">{{ product.product_quantity }}</td>
        <td class="text-center">{{ product.price_sold|format_currency('UAH', locale='uk') }}</td>
        <td class="text-right">{{ (product.product_quantity * product.price_sold)|format_currency('UAH', locale='uk') }}</td>
      </tr>
      {% endfor %}
    </thead>
    <tbody>
        {% if model.discount_amount or model.shipping_price  %}
        <tr>
          <td colspan="6" class="text-right">Всього за товари:</td>
          <td class="text-right">{{ model.total_price|format_currency('UAH', locale='uk') }}</td>
        </tr>
        {% endif %}

        {% if model.discount_amount %}
        <tr>
          <td colspan="6" class="text-right">Знижка:</td>
          <td class="text-right">{{ model.discount_amount|format_currency('UAH', locale='uk') }}</td>
        </tr>
        {% endif %}

        {% if model.shipping_price %}
        <tr>
          <td colspan="6" class="text-right">Доставка:</td>
          <td class="text-right">{{ model.shipping_price|format_currency('UAH', locale='uk') }}</td>
        </tr>
        {% endif %}

        <tr>
          <td colspan="6" class="text-right">Сума:</td>
          <td class="text-right">{{ model.grand_total|format_currency('UAH', locale='uk') }}</td>
        </tr>
   </tbody>
  </table>
  
  <br /><br />
  <table class="table-sum width100">
    <tr>
      <td colspan="2">
          Всього найменувань {{ model.products|length }}, на суму  {{ model.grand_total|format_currency('UAH', locale='uk') }}
      </td>
      <td></td>
    </tr>
    <tr>
      <td>Дата: <span class="label underline">{{ model.created_at|date("j") }} {{ mnths[model.created_at|date("n")] }} {{ model.created_at|date("Y") }} р.</span>    </td>
      <td>Підпис постачальника: &nbsp;&nbsp;&nbsp; ____________________</td>
      <td></td>
    </tr>
  </table>
</div>

</body>
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html, body {
    height: 100%;
  }
  body {
    font-size: 16px;
    line-height: 1.3;
    min-width: 320px;
    font-family: sans-serif;
    overflow-x: hidden;
  }

  .container {
    margin-right: auto;
    margin-left: auto;
  }

  .text-center {
    text-align: center;
  }

  .text-right {
    text-align: right;
  }

  .label {
    font-weight: bold;
  }
  
  .underline {
      text-decoration: underline;
      font-style: italic;
  }

  .big-text {
    font-size: 18px;
  }
  
  .width100 {
      width: 100%;
  }

  table {
    border-collapse:collapse;
    border-spacing:0;
    height: auto;
  }

  table td {
    padding: 5px;
  }

  table th {
    background: #d4d4d4;
  }

  table thead td,
  table thead th {
    border: 1px solid black;
  }
  
  table.table-products {
      border: solid 2px black;
  }

  table.table-products th {
    padding: 20px 5px;
  }
  table.table-products td {
    padding: 5px;
  }
  
  table.table-sum {
      margin-top: 7px;
  }
  
  table.table-sum td {
    padding: 3px 5px 3px 15px;
  }

</style>
</html>
```

{% endtab %}
{% endtabs %}

### 2. Товарний чек №2

{% tabs %}
{% tab title="Зовнішній вигляд" %}
Дякуємо нашому користувачу Аскольду Кузіну за наданий шаблон

<figure><img src="/files/3COpyGRNW6FHUMcJ1QVt" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Код шаблону" %}
**Тип шаблону:** Замовлення

QR-коди можна згенерувати, наприклад, тут: <https://www.qrcode-monkey.com/>

Після генерації, потрібно зберегти картинки на вашому сервері (сайті), та вставити в шаблон посилання на них.

<pre class="language-html"><code class="lang-html">&#x3C;!doctype html>
&#x3C;html lang="en">
&#x3C;head>
  &#x3C;meta charset="UTF-8">
  &#x3C;meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  &#x3C;meta http-equiv="X-UA-Compatible" content="ie=edge">
  &#x3C;title>Invoice&#x3C;/title>
&#x3C;/head>
&#x3C;body>

&#x3C;div class="container">

  &#x3C;table>
    &#x3C;tbody>
    &#x3C;tr>
      &#x3C;td>
        &#x3C;img src="https://blog.keycrm.app/keycrm/images/keycrm-logo-blue-on-white.png" style="width: 180px;" alt="">
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td style="padding: 5px;">
        м.Київ вул. Хрещатик, 1
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td style="padding: 5px;">
        моб/viber (095) 777-77-77
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td style="padding: 5px;">
        &#x3C;span>iqmebel.com.ua&#x3C;/span>
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;/tbody>
  &#x3C;/table>

  &#x3C;br />

  &#x3C;table style="padding-bottom: 10px; margin-bottom: 10px;">
    &#x3C;tbody>
    &#x3C;tr>
      &#x3C;td style="padding: 10px 5px;">
        &#x3C;strong>Покупець:&#x3C;/strong> {{ model.client_name }}

        {% if model.client_phone %}
        {{ model.client_phone }},
        {% endif %}

      &#x3C;/td>
    &#x3C;/tr>

    &#x3C;tr>
      &#x3C;td style="padding: 5px 5px 10px;">
        &#x3C;strong>Адреса доставки:&#x3C;/strong>

        {% if model.shipping_type %}
        {{ model.shipping_type }},
        {% endif %}

        {% if model.shipping_address %}
        {{ model.shipping_address }},&#x3C;br />
        {% endif %}

      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;/tbody>
  &#x3C;/table>

  &#x3C;br />

  &#x3C;p class="text-center" style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
    {% set mnths = ['','січня','лютого','березня','квітня','травня','червня','липня','серпня','вересня','жовтня','листопада','грудня'] %}

    Накладна №{{ model.id }} від {{ model.created_at|date("j") }} {{ mnths[model.created_at|date("n")] }} {{ model.created_at|date("Y") }} р.
  &#x3C;/p>

   &#x3C;table class="width100 border">
    &#x3C;thead class="table-products">
      &#x3C;tr>
        &#x3C;th class="text-center">№&#x3C;/th>
        &#x3C;th>Код товару&#x3C;/th>
        &#x3C;th class="name-col">Назва товару&#x3C;/th>
        &#x3C;th>Од.&#x3C;/th>
        &#x3C;th>Кількість&#x3C;/th>
        &#x3C;th>Ціна&#x3C;/th>
        &#x3C;th>Сума&#x3C;/th>
      &#x3C;/tr>
      
      {% for key, product in model.products %}
      &#x3C;tr>
        &#x3C;td class="text-center">{{key + 1}}&#x3C;/td>
        &#x3C;td class="text-center">{{ product.product_sku }}&#x3C;/td>
        &#x3C;td style="width:50%">{{ product.product_name }}&#x3C;/td>
        &#x3C;td class="text-center">шт&#x3C;/td>
        &#x3C;td class="text-center">{{ product.product_quantity }}&#x3C;/td>
        &#x3C;td class="text-center">{{ product.price_sold|format_currency('UAH', locale='uk') }}&#x3C;/td>
        &#x3C;td class="text-right">{{ (product.product_quantity * product.price_sold)|format_currency('UAH', locale='uk') }}&#x3C;/td>
      &#x3C;/tr>
      {% endfor %}
    &#x3C;/thead>
    &#x3C;tbody>
        {% if model.discount_amount or model.shipping_price  %}
        &#x3C;tr>
          &#x3C;td colspan="6" class="text-right">Всього за товари:&#x3C;/td>
          &#x3C;td class="text-right">{{ model.total_price|format_currency('UAH', locale='uk') }}&#x3C;/td>
        &#x3C;/tr>
        {% endif %}

        {% if model.discount_amount %}
        &#x3C;tr>
          &#x3C;td colspan="6" class="text-right">Знижка:&#x3C;/td>
          &#x3C;td class="text-right">{{ model.discount_amount|format_currency('UAH', locale='uk') }}&#x3C;/td>
        &#x3C;/tr>
        {% endif %}

        {% if model.shipping_price %}
        &#x3C;tr>
          &#x3C;td colspan="6" class="text-right">Доставка:&#x3C;/td>
          &#x3C;td class="text-right">{{ model.shipping_price|format_currency('UAH', locale='uk') }}&#x3C;/td>
        &#x3C;/tr>
        {% endif %}

        &#x3C;tr>
          &#x3C;td colspan="6" class="text-right">Сума:&#x3C;/td>
          &#x3C;td class="text-right">{{ model.grand_total|format_currency('UAH', locale='uk') }}&#x3C;/td>
        &#x3C;/tr>
   &#x3C;/tbody>
  &#x3C;/table>

  &#x3C;br />

  &#x3C;table style="padding-bottom: 10px; margin-bottom: 10px;">
    &#x3C;tr>
      &#x3C;td style="padding: 5px;">
        Всього найменувань {{ model.products|length }}, на суму  {{ model.grand_total|format_currency('UAH', locale='uk') }}
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td style="padding: 5px;">
        {% set gtc = model.total_price|round(0, 'floor') %}
        {% set gtr = ((model.total_price - gtc) * 100)|round(0, 'floor') %}
<strong>        &#x3C;strong>{{ ((gtc|format_number(style="spellout", locale="uk"))|capitalize) }}
</strong>        {% set currencySuffix = (gtc % 100 >= 11 and gtc % 100 &#x3C;= 14) ? 'гривень' : (gtc % 10 == 1) ?
        'гривня' : (gtc % 10 >= 2 and gtc % 10 &#x3C;= 4) ? 'гривні' : 'гривень' %}
        {{ currencySuffix }}
        {{ (gtr &#x3C; 10 ? '0' ~ gtr : gtr) }}
        {% set centsSuffix = (gtr >= 11 and gtr &#x3C;= 14) ? 'копійок' : (gtr % 10 == 1) ?
        'копійка' : (gtr % 10 >= 2 and gtr % 10 &#x3C;= 4) ? 'копійки' : 'копійок' %}
        {{ centsSuffix }}
        &#x3C;/strong>
      &#x3C;/td>
    &#x3C;/tr>
  &#x3C;/table>

  &#x3C;br />

  &#x3C;table class="width100" style="padding-bottom: 30px; margin-bottom: 30px;">
    &#x3C;tbody>
    &#x3C;tr>
      &#x3C;td style="font-size: 12px;">Продавець&#x3C;/td>
      &#x3C;td style="border-bottom: 1px solid black;">&#x3C;/td>
      &#x3C;td style="font-size: 12px;">Іванов Іван&#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td style="padding: 5px;">&#x3C;/td>
      &#x3C;td class="text-center" style="padding: 5px;">Підпис&#x3C;/td>
      &#x3C;td style="padding: 5px;">&#x3C;/td>
    &#x3C;/tr>

    &#x3C;/tbody>
  &#x3C;/table>

  &#x3C;br />

  &#x3C;table class="width100" style="padding-bottom: 10px; margin-bottom: 10px;">
    &#x3C;tr>
      &#x3C;td class="text-center" style="font-size: 12px;">
        Дякуємо за замовлення!
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td class="text-center" style="font-size: 12px;">
        Нам дуже важливо щоб ви були задоволені нашими виробами та сервісом
      &#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td class="text-center" style="padding: 5px; font-size: 12px;">
        По будь-якому запитанню ви можете написати нам в вайбер або телеграм:
      &#x3C;/td>
    &#x3C;/tr>
  &#x3C;/table>

  &#x3C;table class="width100">
    &#x3C;tbody>
    &#x3C;tr>
      &#x3C;td class="text-center" style="width: 50%; font-size: 12px;">Telegram&#x3C;/td>
      &#x3C;td class="text-center" style="width: 50%; font-size: 12px;">Viber&#x3C;/td>
    &#x3C;/tr>
    &#x3C;tr>
      &#x3C;td class="text-center" style="width: 50%;">
          
        &#x3C;img src="https://blog.keycrm.app/keycrm/qr/keycrm-telegram-qr.png" style="width: 150px;" alt="">
        
      &#x3C;/td>

      &#x3C;td class="text-center" style="width: 50%; padding: 5px;">
    
        &#x3C;img src="https://blog.keycrm.app/keycrm/qr/keycrm-viber-qr.png" style="width: 150px;" alt="">
          
      &#x3C;/td>
    &#x3C;/tr>

    &#x3C;/tbody>
  &#x3C;/table>

&#x3C;/div>

&#x3C;/body>
&#x3C;style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html, body {
    height: 100%;
  }
  body {
    font-size: 12px;
    line-height: 1.3;
    min-width: 320px;
    font-family: sans-serif;
    overflow-x: hidden;
  }

  .container {
    margin-right: auto;
    margin-left: auto;
  }

  .text-center {
    text-align: center;
  }

  .text-right {
    text-align: right;
  }

  .label {
    font-weight: bold;
  }

  .underline {
    text-decoration: underline;
    font-style: italic;
  }

  .big-text {
    font-size: 14px;
  }

  .width100 {
    width: 100%;
  }

  table {
    border-collapse:collapse;
    border-spacing:0;
    height: auto;
  }

  table thead td, th {
    padding: 5px;
    border: none;
  }

  table thead td,
  table thead th {
    border-bottom: 1px solid black;
  }

  table.table-products {
    /*border: solid 2px black;*/
  }

  table.table-products th {
    padding: 5px 5px;
  }
  table.table-products td {
    padding: 5px 5px;
  }

  table.table-sum {
    margin-top: 7px;
  }

  table.table-sum td {
    padding: 3px 5px 3px 15px;
  }

&#x3C;/style>
&#x3C;/html>
</code></pre>

{% endtab %}
{% endtabs %}

### 3. Видаткова накладна

{% tabs %}
{% tab title="Зовнішній вигляд" %}
![](/files/BG0t34gNguq69C31s5Jw)
{% endtab %}

{% tab title="Код шаблону" %}
**Тип шаблону:** Замовлення

```html
<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Invoice</title>
</head>
<body>

<div class="container">
    
  <table style="padding-bottom: 10px; border-bottom: solid 3px black; margin-bottom: 10px;">
    <tbody>
    <tr>
      <td>
          <img src="https://freerider.in.ua/image/catalog/1_theme/logo.png.pagespeed.ce.NIX_9YdKz2.png" style="height: 40px" alt="">
      </td>
      <td style="font-size: 20px; font-weight: bold; width: 90%">
        {% set mnths = ['','січня','лютого','березня','квітня','травня','червня','липня','серпня','вересня','жовтня','листопада','грудня'] %}
    
        Видаткова накладна № {{ model.id }} від {{ model.created_at|date("j") }} {{ mnths[model.created_at|date("n")] }} {{ model.created_at|date("Y") }} р.
      </td>
    </tr>
    </tbody>
  </table>
  
  <table>
    <tbody>
    <tr>
      <td valign="top">
          <span style="text-decoration: underline">Постачальник:</span>
      </td>
      <td valign="top" style="padding-bottom: 7px;">
        <strong style="background-color: yellow">ТОВАРИСТВО З ОБМЕЖЕНОЮ ВІДПОВІДАЛЬНІСТЮ "ТОРГОВИЙ ДІМ "АЗАРІС"</strong>
        <div style="padding-left: 15px; font-size: 90%;">
        <span style="background-color: yellow">П/р 260001169698, у банку ПАТ "УКРСОЦБАНК", м. Київ МФО 320433,</span><br />
        <span style="background-color: yellow">вул. Лугова, буд № 2а, м. Київ 04742, тел.: (044) 365-32-16,</span><br />
        <span style="background-color: yellow">код за ЄДРПОУ 38510648, ІПН 38533422488, № свід. 20052566,</span><br />
        <span style="background-color: yellow">Є платником податку на прибуток на загальних підставах</span>
      </td>
    </tr>
    <tr>
      <td valign="top">
          <span style="text-decoration: underline">Покупець:</span>
      </td>
      <td valign="top" style="padding-bottom: 7px;">
        <strong>{{ model.client_name }}</strong>
        <div style="padding-left: 15px; font-size: 90%;">
          {% if model.shipping_address %}
            {{ model.shipping_address }},<br />
          {% endif %}
          {% if model.client_phone %}
            {{ model.client_phone }},
          {% endif %}
          {% if model.client_email %}
            {{ model.client_email }}
          {% endif %}
        </div>
      </td>
    </tr>
    <tr>
      <td valign="top">
          <span style="text-decoration: underline">Договір:</span>
      </td>
      <td valign="top" style="padding-bottom: 7px;">
        <span>Основний договір</span>
      </td>
    </tr>
    <tr>
      <td valign="top">
          <span style="text-decoration: underline">Умови постачання:</span>
      </td>
      <td valign="top" style="padding-bottom: 7px;">
        {{ model.shipping_type }}
      </td>
    </tr>
    </tbody>
  </table>

  <br />

   <table class="width100 border">
    <thead class="table-products">
      <tr>
        <th class="text-center">№</th>
        <th>Код товару</th>
        <th class="name-col">Назва товару</th>
        <th>Од.</th>
        <th>Кількість</th>
        <th>Ціна</th>
        <th>Сума</th>
      </tr>
      
      {% for key, product in model.products %}
      <tr>
        <td class="text-center">{{key + 1}}</td>
        <td class="text-center">{{ product.product_sku }}</td>
        <td style="width:50%">{{ product.product_name }}</td>
        <td class="text-center">шт</td>
        <td class="text-center">{{ product.product_quantity }}</td>
        <td class="text-center">{{ product.price_sold|format_currency('UAH', locale='uk') }}</td>
        <td class="text-right">{{ (product.product_quantity * product.price_sold)|format_currency('UAH', locale='uk') }}</td>
      </tr>
      {% endfor %}
    </thead>
    <tbody>
        {% if model.discount_amount or model.shipping_price  %}
        <tr>
          <td colspan="6" class="text-right">Всього за товари:</td>
          <td class="text-right">{{ model.total_price|format_currency('UAH', locale='uk') }}</td>
        </tr>
        {% endif %}

        {% if model.discount_amount %}
        <tr>
          <td colspan="6" class="text-right">Знижка:</td>
          <td class="text-right">{{ model.discount_amount|format_currency('UAH', locale='uk') }}</td>
        </tr>
        {% endif %}

        {% if model.shipping_price %}
        <tr>
          <td colspan="6" class="text-right">Доставка:</td>
          <td class="text-right">{{ model.shipping_price|format_currency('UAH', locale='uk') }}</td>
        </tr>
        {% endif %}

        <tr>
          <td colspan="6" class="text-right">Сума:</td>
          <td class="text-right">{{ model.grand_total|format_currency('UAH', locale='uk') }}</td>
        </tr>
   </tbody>
  </table>
  
  <br />
  
  <table>
    <tr>
      <td>
          <strong>Всього найменувань {{ model.products|length }}, на суму  {{ model.grand_total|format_currency('UAH', locale='uk') }}</strong>
      </td>
    </tr>
  </table>
  
  <br />
  
  <table>
    <tr>
      <td>
          Місце складання: 
      </td>
      <td>
          с. Петропавлівська Борщагівка, вул. Садова 49
      </td>
    </tr>
  </table>
  
  <br />
  
  <table class="width100" style="border-top: solid 3px black;">
    <tr>
      <td valign="top" style="padding-top: 15px; padding-right: 30px;" width="50%">
          <div style="padding-bottom: 35px; margin-bottom: 15px; border-bottom: solid 2px black;">
              <strong>Від постачальника*</strong>
          </div>
          <span style="font-size: 90%;">* Відповідальний за здійснення господарської операції та правильність її оформлення</span>
      </td>
      <td valign="top" style="padding-top: 15px; padding-right: 30px;">
          <div style="padding-bottom: 35px; margin-bottom: 15px; border-bottom: solid 2px black;">
              <strong>Отримав(ла)</strong>
          </div>
          <span style="font-size: 90%;">За довіреністю &nbsp;&nbsp;&nbsp;&nbsp; № &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; від </span>
      </td>
    </tr>
  </table>
</div>

</body>
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html, body {
    height: 100%;
  }
  body {
    font-size: 16px;
    line-height: 1.3;
    min-width: 320px;
    font-family: sans-serif;
    overflow-x: hidden;
  }

  .container {
    margin-right: auto;
    margin-left: auto;
  }

  .text-center {
    text-align: center;
  }

  .text-right {
    text-align: right;
  }

  .label {
    font-weight: bold;
  }
  
  .underline {
      text-decoration: underline;
      font-style: italic;
  }

  .big-text {
    font-size: 18px;
  }
  
  .width100 {
      width: 100%;
  }

  table {
    border-collapse:collapse;
    border-spacing:0;
    height: auto;
  }

  table thead td {
    padding: 5px;
    border: none;
  }

  table th {
    background: #d4d4d4;
  }

  table thead td,
  table thead th {
    border: 1px solid black;
  }
  
  table.table-products {
      border: solid 2px black;
  }

  table.table-products th {
    padding: 15px 5px;
  }
  table.table-products td {
    padding: 5px;
  }
  
  table.table-sum {
      margin-top: 7px;
  }
  
  table.table-sum td {
    padding: 3px 5px 3px 15px;
  }

</style>
</html>
```

{% endtab %}
{% endtabs %}

### 4. Рахунок на оплату

{% tabs %}
{% tab title="Зовнішній вигляд" %}

<figure><img src="/files/ec4Qws5DGMII66cKftTq" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Код шаблону" %}
**Тип шаблону:** Замовлення

```html
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Invoice</title>
</head>
<body>

<div class="container">

    <table style="padding-bottom: 10px; border-bottom: solid 3px black; margin-bottom: 10px;">
        <tbody>
        <tr>
            <td style="font-size: 20px; font-weight: bold; width: 90%">
                {% set mnths =
                ['','січня','лютого','березня','квітня','травня','червня','липня','серпня','вересня','жовтня','листопада','грудня']
                %}

                Рахунок на оплату № {{ model.id }} від {{ model.created_at|date("j") }} {{
                mnths[model.created_at|date("n")] }} {{ model.created_at|date("Y") }} р.
            </td>
        </tr>
        </tbody>
    </table>

    <table>
        <tbody>
        <tr>
            <td valign="top">
                <span style="text-decoration: underline">Постачальник:</span>
            </td>
            <td valign="top" style="padding-bottom: 7px;">
                <strong style="background-color: yellow">ТОВ "Company Name"</strong>
                <div style="padding-left: 15px; font-size: 90%;">
                    <span style="background-color: yellow">адреса м.Київ вул. Хрещатик, 1, АТ КБ "ПРИВАТБАНК" № рахунку: UA111111111111, код ЄДРПОУ 1111111. Директор Тест Тестов Тестовенко</span><br/>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <span style="text-decoration: underline">Покупець:</span>
            </td>
            <td valign="top" style="padding-bottom: 7px;">
                <strong>{{ model.client_name }}</strong>
                <div style="padding-left: 15px; font-size: 90%;">
                    {% if model.client_phone %}
                    {{ model.client_phone }},
                    {% endif %}
                    {% if model.client_email %}
                    {{ model.client_email }}
                    {% endif %}
                </div>
            </td>
        </tr>
        <tr>
        <tr>
            <td valign="top">
                <span style="text-decoration: underline">Предмет:</span>
            </td>
            <td valign="top" style="padding-bottom: 7px;">
                <div style="padding-left: 15px; font-size: 90%;">
                    <span>Постачальник зобов’язується поставити і передати у власність Покупця товар, що вказаний в цьому Рахунку разом з товаросупровідною документацією, а Покупець зобов’язується прийняти і оплатити його з урахуванням цін вказаних у цьому Рахунку. </span><br/>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <span style="text-decoration: underline">Термін:</span>
            </td>
            <td valign="top" style="padding-bottom: 7px;">
                <span>не пізніше 40 днів від дати здійснення попередньої оплати за товар</span>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <span style="text-decoration: underline">Договір:</span>
            </td>
            <td valign="top" style="padding-bottom: 7px;">
                <span>Договору Поставки № 11-2023-11 від 28.11.2023 року</span>
            </td>
        </tr>
        </tbody>
    </table>

    <br/>

    <table class="width100 border">
        <thead class="table-products">
          <tr>
            <th class="text-center">№</th>
            <th>Артикул</th>
            <th class="name-col">Назва товару</th>
            <th>Кількість</th>
            <th>Ціна</th>
            <th>Сума</th>
          </tr>

          {% for key, product in model.products %}
          <tr>
              <td class="text-center">{{key + 1}}</td>
              <td class="text-center">{{ product.product_sku }}</td>
              <td style="width:50%">{{ product.product_name }}</td>
              <td class="text-center">{{ product.product_quantity }} {{ product.product_unit_type }}</td>
              <td class="text-right">{{ product.product_price|format_currency('UAH', locale='uk') }}</td>
              <td class="text-right">{{ (product.product_quantity * product.product_price)|format_currency('UAH', locale='uk') }}</td>
          </tr>
          {% endfor %}
        </thead>

        <tbody>
          <tr>
              <td colspan="5" class="text-right"><strong>ПДВ:</strong></td>
              <td class="text-right">{{ (model.total_price * 0.2)|format_currency('UAH', locale='uk') }}</td>
          </tr>
          <tr>
              <td colspan="5" class="text-right"><strong>Разом:</strong></td>
              <td class="text-right">{{ model.total_price|format_currency('UAH', locale='uk') }}</td>
          </tr>
        
        </tbody>
    </table>

    <br/>

    <table>
        <tr>
            <td>
                <strong>Всього найменувань {{ model.products|length }}, на суму {{
                    model.total_price|format_currency('UAH', locale='uk') }}</strong>
            </td>
        </tr>
    </table>

    <br/>

    <table>
        <tr>
            <td>
                <p>
                    {% set gtc = model.total_price|round(0, 'floor') %}
                    {% set gtr = ((model.total_price - gtc) * 100)|round(0, 'floor') %}
                    <strong>{{ ((gtc|format_number(style="spellout", locale="uk"))|capitalize) }}
                    {% set currencySuffix = (gtc % 100 >= 11 and gtc % 100 <= 14) ? 'гривень' : (gtc % 10 == 1) ?
                    'гривня' : (gtc % 10 >= 2 and gtc % 10 <= 4) ? 'гривні' : 'гривень' %}
                    {{ currencySuffix }}
                    {{ (gtr < 10 ? '0' ~ gtr : gtr) }}
                    {% set centsSuffix = (gtr >= 11 and gtr <= 14) ? 'копійок' : (gtr % 10 == 1) ?
                    'копійка' : (gtr % 10 >= 2 and gtr % 10 <= 4) ? 'копійки' : 'копійок' %}
                    {{ centsSuffix }}
                    </strong>
                </p>
        </tr>
    </table>

    <br/>

    <table class="width100" style="border-top: solid 3px black;">
        <tr>
            <td valign="top" style="padding-top: 15px; padding-right: 30px;" width="50%">
                <span style="font-size: 90%;"><strong>Строк дії Рахунку протягом 3 діб, з моменту надання Покуцю</strong></span>
            </td>
            <td valign="top"
                style="padding-top: 15px; padding-right: 30px; display: flex; justify-content: space-between; border-bottom: solid 1px black;">
                <strong>Виписав(ла)</strong><strong style="background-color: yellow">Тест А.А.</strong>
            </td>
        </tr>
    </table>
</div>

</body>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html, body {
        height: 100%;
    }

    body {
        font-size: 16px;
        line-height: 1.3;
        min-width: 320px;
        font-family: sans-serif;
        overflow-x: hidden;
    }

    .container {
        margin-right: auto;
        margin-left: auto;
    }

    .text-center {
        text-align: center;
    }

    .text-right {
        text-align: right;
    }

    .label {
        font-weight: bold;
    }

    .underline {
        text-decoration: underline;
        font-style: italic;
    }

    .big-text {
        font-size: 18px;
    }

    .width100 {
        width: 100%;
    }

    table {
        border-collapse: collapse;
        border-spacing: 0;
        height: auto;
    }

    table thead td {
        podding: 5px;
        border: none;
    }

    table th {
        background: #d4d4d4;
    }

    table thead td,
    table thead th {
        border: 1px solid black;
        padding: 5px;
    }

    table.table-products {
        border: solid 2px black;
    }

    table.table-products th {
        padding: 15px 5px;
    }

    table.table-products td {
        padding: 5px;
    }

    table.table-sum {
        margin-top: 7px;
    }

    table.table-sum td {
        padding: 3px 5px 3px 15px;
    }

</style>
</html>
```

{% endtab %}
{% endtabs %}

### 5. "Лист на митницю" (при відправці за кордон)

{% tabs %}
{% tab title="Зовнішній вигляд" %}
![](/files/aVC9szgIkIkNUOiJ6Ywe)
{% endtab %}

{% tab title="Код шаблону" %}
**Тип шаблону:** Доставка

```html
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="author" content="KeyCRM">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
</head>
<body>
<table class="head-table">
    <tr>
        <td valign="bottom"><p class="big bold italic">"______"_________________20__року</p></td>
        <td valign="bottom" class="border-bottom">
            <p class="big italic bold">В.о. начальника Київської ДМС України</p>
        </td>
    </tr>
    <tr>
        <td valign="top" class="small text-center bold">(заповнюється митницею)</td>
        <td valign="top" class="small bold">(найменування митного органу)</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td valign="bottom" class="border-bottom">
            <span class="big" style="background-color: yellow">Прізвище Імʼя По-Батькові</span>
        </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td valign="top" class="small">(прiзвище, iм‘я та по батьковi)</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td valign="bottom" class="border-bottom">
            <span class="big" style="background-color: yellow">м. Київ, вул. Хрещатик 24/104</span>
        </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td valign="top" class="small">(мiсце проживання фiзичної особи)</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td valign="bottom" colspan="2" class="big text-center border-bottom">
            <span style="background-color: yellow">Прізвище Імʼя По-Батькові</span>
            <span style="padding: 0 30px"></span>
            <span style="background-color: yellow">ІХ: 572942</span>
        </td>
    </tr>
    <tr>
        <td colspan="2" valign="top">
            <p class="text-center">(прiзвище, iм’я та по батьковi фiзичної особи, паспортні дані)</p>
        </td>
    </tr>
    <tr>
        <td colspan="2" valign="top">
            <p class="big">
                заявляє вiдомостi про товари та iншу iнформацiю, необхiдну для здiйснення митних формальностей.
            </p>
        </td>
    </tr>
</table>


<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p class="big">Номер транспортного документа</p></td>
        <td valign="bottom" class="border-bottom full-width">
            <p class="space-text">
                <span class="big">{{ model.tracking_code }}</span>
                <span class="big bold italic">Від.</span>
                <span class="big">{{ "now"|date("d.m.Y") }}р.</span>
            </p>
        </td>
    </tr>
</table>

<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Рахунок</p></td>
        <td valign="bottom" class="border-bottom full-width">
            <p class="space-text">
                <span class="bold">б/н</span>
                <span class="bold italic">від.</span><span>{{ "now"|date("d.m.Y") }}р.</span>
            </p>
        </td>
    </tr>
</table>

<table class="second-table">
    <tr style="height: 11px;">
        <td valign="top">&nbsp;</td>
        <td valign="top" class="small text-center">(номер, дата)</td>
    </tr>
</table>

<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap">Країна вiдправлення (призначення)</td>
        <td valign="bottom" class="border-bottom full-width">
            <p>{{ model.shipping_address_country }}</p>
        </td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Вiдправник (одержувач)</p></td>
        <td valign="bottom" class="border-bottom full-width"><p>{{ shipment.name }}</p></td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Кiлькiсть мiсць</p></td>
        <td valign="bottom" class="border-bottom full-width"><p>1</p></td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Загальна вага (кiлограмiв)</p></td>
        <td valign="bottom" class="border-bottom full-width"><p>{{ shipment.weight }} кг</p></td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Загальна митна вартiсть</p></td>
        <td valign="bottom" class="border-bottom full-width">
            <p>
                {{ shipment.items|reduce((carry, item) => carry + (item.price * item.quantity), 0)|round(2) }}
                {{ shipment.currency }}
            </p>
        </td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Митний режим</p></td>
        <td valign="bottom" class="border-bottom full-width"><p class="bold italic">експорт</p></td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Умови поставки</p></td>
        <td valign="bottom" class="border-bottom full-width"><span style="background-color: yellow">CPT</span></td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" class="nowrap"><p>Характер угоди</p></td>
        <td valign="bottom" class="border-bottom full-width"><p></p></td>
    </tr>
</table>
<table class="second-table">
    <tr>
        <td valign="bottom" colspan="2"><p>Дозволи уповноважених органів(назва, номер, дата) </p></td>
    </tr>
</table>

<br />

<table class="goods-table" border="1" cellpadding="4" cellspacing="0">
    <tr>
        <th><p>Номер товару</p></th>
        <th><p>Найменування товару, його звичайний торговельний опис</p></th>
        <th><p>Код товару згiдно з УКТЗЕД</p></th>
        <th><p>Вартiсть товару у валютi України або iноземнiй валютi</p></th>
    </tr>
    {% for item in shipment.items %}
        <tr>
            <td><p class="text-center">{{ loop.index }}</p></td>
            <td><p>{{ item.description_local|slice(0, 35) }}</p></td>
            <td><p class="text-center">{{ item.hs_code }}</p></td>
            <td><p class="text-center">{{ item.price }} {{ shipment.currency }}</p></td>
        </tr>
    {% endfor %}
</table>

<table class="signature-table">
    <tr>
        <td valign="bottom">Декларант або уповноважена ним особа</td>
        <td class="border-bottom"></td>
        <td valign="bottom" class="text-center border-bottom">
            <span style="background-color: yellow">Прізвище Імʼя По-Батькові</span>
        </td>
    </tr>
    <tr>
        <td></td>
        <td valign="top" class="text-center">(пiдпис)</td>
        <td valign="top" class="text-center">(iнiцiали, прiзвище)</td>
    </tr>
    <tr>
        <td class="border-bottom"></td>
        <td class="border-bottom"></td>
        <td valign="bottom" class="border-bottom"></td>
    </tr>
    <tr>
        <td valign="top" class="text-center">(найменування посади посадової особи митного органу)</td>
        <td valign="top" class="text-center">(пiдпис)</td>
        <td valign="top" class="text-center">(iнiцiали, прiзвище)</td>
    </tr>
</table>

<table class="stamp-table">
    <tr>
        <td>Місце для відбитка особистої номерної печатки</td>
    </tr>
</table>

</body>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html, body {
        height: 100%;
    }

    body {
        color: #333;
        font-size: 12px;
        line-height: 1.3;
        min-width: 320px;
        font-family: 'Times New Roman', sans-serif;
    }

    img {
        border-style: none;
    }

    @page {
        size: auto;
        margin: 5mm 10mm;
    }


    .italic {
        font-style: italic;
    }

    .bold {
        font-weight: bold;
    }

    .big {
        font-size: 14px;
    }
    
    .small { 
        font-size: 11px;
        line-height: 11px;
    }

    .text-center {
        text-align: center;
    }

    .space-text span{
        margin-right: 10px;
    }
    
    .nowrap { 
        white-space: nowrap;
    }
    
    .full-width {
        width: 90%;
        padding-left: 20px;
    }

    .border-bottom {
        border-bottom: 1px solid black;
    }

    /*head-table*/
    .head-table {
        width: 100%;
    }

    .head-table .border-bottom {
        border-bottom: solid 1px black;
    }

    .head-table td {
        height: 22px;
        padding-right: 5px;
        padding-left: 5px;
    }

    .head-table td:first-child {
        width: 40%;
    }

    .head-table td:last-child {
        width: 60%;
    }

    /*second-table*/
    .second-table {
        width: 100%;
    }

    .second-table .slim-row td {
        height: 10px;
    }

    .second-table td {
        height: 25px;
        padding-right: 5px;
        padding-left: 5px;
    }
    
    .second-table td.nowrap {
        padding-right: 20px;
    }
    
    .second-table td.full-width {
        padding-left: 20px;
    }

    /*goods-table*/
    .goods-table {
        width: 100%;
        border-color: black;
        margin-bottom: 20px;
    }

    .goods-table th:nth-child(1),
    .goods-table td:nth-child(1) {
        width: 6%;
    }

    .goods-table th:nth-child(2),
    .goods-table td:nth-child(2) {
        width: 47%;
    }

    .goods-table th:nth-child(3),
    .goods-table td:nth-child(3) {
        width: 20%;
    }

    .goods-table th:nth-child(4),
    .goods-table td:nth-child(4) {
        width: 16%;
    }

    .goods-table th {
        padding: 5px;
        font-style: bold;
    }

    .goods-table td {
        padding: 5px;
    }

    /*signature-table*/
    .signature-table {
        width: 100%;
        border-spacing: 10px 0;
        margin-bottom: 20px;
    }
    .signature-table td {
        height: 25px;
        padding-right: 5px;
        padding-left: 5px;
    }

    .signature-table td:nth-child(1) {
        width: 45%;
    }

    .signature-table td:nth-child(2) {
        width: 15%;
    }

    .signature-table td:nth-child(3) {
        width: 40%;
    }

    .stamp-table {
        width: 30%;
        border: solid 1px black;
        text-align: center;
    }

    .stamp-table td {
        padding: 30px;
    }
</style>
</html>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://templates.keycrm.app/ua/zamovlennya.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
