{% extends "base.html.twig" %}
{% block body %}
<h2>Юридическая чистота</h2>
<table class="block jurist">
<tbody>
{% if pledgeBYVisible %}
<tr>
<td class="img-td">
{% if pledgeBY %}
<img src="/var/www/app/public/resources/img/warning.png" alt="">
{% else %}
<img src="/var/www/app/public/resources/img/ok.png" alt="">
{% endif %}
</td>
<td>
{% if pledgeBY %}
<p>Может находиться в залоге на территории Республики Беларусь</p>
<p>В "Реестре движимого имущества, обременённого залогом Республики Беларусь" есть записи о залоге на дату проверки.</p>
{% else %}
<p>Не зарегистрирован залог на территории Республики Беларусь</p>
<p>Сведения о нахождении в залоге в "Реестре движимого имущества, обременённого залогом Республики Беларусь" на дату проверки не обнаружены.</p>
{% endif %}
</td>
</tr>
{% endif %}
{% if avtocod is defined %}
<tr>
<td class="img-td">
{% if avtocod.stealings.is_wanted %}
<img src="/var/www/app/public/resources/img/warning.png" alt="">
{% else %}
<img src="/var/www/app/public/resources/img/ok.png" alt="">
{% endif %}
</td>
<td>
{% if avtocod.stealings.is_wanted %}
<p>Числится в розыске на территории Российской Федерации</p>
<p class="dark-grey-text">Обнаружены записи в официальном реестре розыска ГИБДД РФ по ТС с указанным VIN.</p>
{% else %}
<p>Не числится в розыске на территории Российской Федерации</p>
<p class="dark-grey-text">Записи в официальном реестре розыска ГИБДД РФ по ТС с указанным VIN на момент проверки отсутствуют.</p>
{% endif %}
</td>
</tr>
<tr>
<td class="img-td">
{% if pledgeAvtocod %}
<img src="/var/www/app/public/resources/img/warning.png" alt="">
{% else %}
<img src="/var/www/app/public/resources/img/ok.png" alt="">
{% endif %}
</td>
<td>
{% if pledgeAvtocod %}
<p>Находится в залоге на территории Российской Федерации</p>
<p class="dark-grey-text">Обнаружены сведения о действующих официальных обременениях, зарегистрированных Федеральной нотариальной палатой РФ или Национальным бюро кредитных историй РФ.</p>
{% else %}
<p>Не находится в залоге на территории Российской Федерации</p>
<p class="dark-grey-text">Отсутствуют сведения о действующих официальных обременениях, зарегистрированных Федеральной нотариальной палатой РФ или Национальным бюро кредитных историй РФ.</p>
{% endif %}
</td>
</tr>
<tr>
<td class="img-td">
{% if avtocod.restrictions.registration_actions.count is defined and avtocod.restrictions.registration_actions.count > 0 %}
<img src="/var/www/app/public/resources/img/warning.png" alt="">
{% else %}
<img src="/var/www/app/public/resources/img/ok.png" alt="">
{% endif %}
</td>
<td>
{% if avtocod.restrictions.registration_actions.count is defined and avtocod.restrictions.registration_actions.count > 0 %}
<p>Обнаружен запрет регистрационных действий в Российской Федерации </p>
<p class="dark-grey-text">Обнаружены действующие ограничения регистрационных действий.</p>
{% else %}
<p>Не обнаружен запрет регистрационных действий в Российской Федерации </p>
<p class="dark-grey-text">Не обнаружены действующие ограничения регистрационных действий.</p>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td class="img-td">
<img src="/var/www/app/public/resources/img/question.png" alt="">
</td>
<td>
<p>Розыск на территории Российской Федерации</p>
<p class="dark-grey-text">Ожидаем получение данных из источника.</p>
</td>
</tr>
<tr>
<td class="img-td">
<img src="/var/www/app/public/resources/img/question.png" alt="">
</td>
<td>
<p>Залог на территории Российской Федерации</p>
<p class="dark-grey-text">Ожидаем получение данных из источника.</p>
</td>
</tr>
{% endif %}
</tbody>
</table>
{% if custom is defined %}
<div class="vin-custom">
<h2>Таможенное оформление в Республике Беларусь</h2>
{% if custom.description is defined and custom.description is not empty %}
<p>{{ custom.description | raw }}</p>
<p><strong>Дата таможенного оформления:</strong> {{ custom.customDate | format_datetime('short', 'none', locale='ru') }}</p>
<p class="grey-text">Данные получены с сайта Государственного таможенного комитета РБ</p>
{% else %}
<p>Отсутствуют сведения о таможенном оформление в Республике Беларусь. Если автомобиль имеет белорусские регистрационные знаки, это означает, что автомобиль был ввезен в Республику Беларусь до 1998 года, либо таможенное оформление проходило на территории страны ЕАЭС</p>
{% endif %}
</div>
{% endif %}
{% if carPictures is defined %}
<div class="car-pictures">
<h2>Фотографии автомобиля</h2>
<div class="pics">
{% for pictureUrl in carPictures %}
<img src="{{ pictureUrl }}" alt="">
{% endfor %}
</div>
</div>
{% endif %}
<div class="vin-decode">
<h2>Декодирование VIN</h2>
<p class="grey-text">Декодирование VIN в соответствии со стандартом ISO 3779 и ISO 3780</p>
{% if vin.country %}
<p><strong>Страна производства:</strong> {{ vin.country }}</p>
{% endif %}
{% if vin.manufacturer %}
<p><strong>Производитель:</strong> {{ vin.manufacturer }}</p>
{% endif %}
{% if vin.year is not null %}
<p><strong>Год выпуска:</strong> {{ vin.year }}</p>
{% endif %}
{% if vin.checkSum is not null %}
<p><strong>Контрольная сумма:</strong> проверка {% if not vin.checkSum %}не{% endif %} пройдена</p>
{% if not vin.checkSum %}
<p class="grey-text">Внимание! VIN либо был изменён, либо автомобиль был собран из комплекта SDK. Рекомендуем дополнительно проверить контрольную сумму номера кузова.</p>
{% endif %}
{% endif %}
</div>
{% if carHistoryRecords is defined %}
<h2 class="car-history-header">История объявлений</h2>
<table class="table car-history-records">
<thead>
<tr>
<th>Наименование</th>
<th>Дата объявления</th>
<th>Пробег</th>
<th>Цена</th>
</tr>
</thead>
<tbody>
{% for item in carHistoryRecords %}
<tr>
<td>{{ item.name }}</td>
<td>{{ item.date }}</td>
<td>{{ item.mileage }}</td>
<td>{{ item.price }}</td>
</tr>
<tr>
<td colspan="4"> {{ item.description | raw }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<h2>История эксплуатации в РФ</h2>
{% if avtocod is defined %}
{% if avtocod.accidents.history.count is defined and avtocod.accidents.history.count > 0 %}
<h3>Участие в ДТП</h3>
<table class="table car-accidents">
<thead>
<tr>
<th>Дата и время</th>
<th>Тип происшествия</th>
<th>Регион</th>
</tr>
</thead>
<tbody>
{% for item in avtocod.accidents.history.items | reverse %}
<tr>
<td>{{ item.accident.date | dateFormat(true) }}</td>
<td>{{ item.type }}</td>
<td>{{ item.geo.region }}</td>
</tr>
{% if item.scheme is defined %}
<tr>
<td class="img-td">
<img src={{ item.scheme }} alt="">
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% else %}
<h3>Участие в ДТП</h3>
<table class="table car-accidents">
<thead>
<tr>
<th>Дата и время</th>
<th>Тип происшествия</th>
<th>Регион</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">Официально зарегистрированные ДТП с участием данного автомобиля на дату проверки не обнаружены.</td>
</tr>
</tbody>
</table>
{% endif %}
{% if avtocod.ownership.history.count is defined and avtocod.ownership.history.count > 0 %}
<h3>История регистрационных действий</h3>
<table class="table car-ownership">
<thead>
<tr>
<th>Период</th>
<th>Владелец</th>
<th>Последнее действие от ГИБДД</th>
</tr>
</thead>
<tbody>
{% for item in avtocod.ownership.history.items | reverse %}
<tr>
<td>с {{ item.date.start | dateFormat }} по {% if item.date.end is defined %}{{ item.date.end | dateFormat }}{% else %}н.в.{% endif %}</td>
<td>{{ item.owner.type | ownerType }}</td>
<td>{{ item.last_operation.description | raw }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h3>История регистрационных действий</h3>
<table class="table car-ownership">
<thead>
<tr>
<th>Период</th>
<th>Владелец</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">Отсутствуют сведения о регистрационных действиях на территории РФ.</td>
</tr>
</tbody>
</table>
{% endif %}
{% if avtocod.mileages.count is defined and avtocod.mileages.count > 0 %}
<h3>История пробегов</h3>
<table class="table car-mileages">
<thead>
<tr>
<th>Дата</th>
<th>Пробег</th>
</tr>
</thead>
<tbody>
{% for item in avtocod.mileages.items %}
<tr>
<td>{{ item.date.event | dateFormat }}</td>
<td>{{ item.mileage }} км</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if avtocod.restrictions.registration_actions.count is defined and avtocod.restrictions.registration_actions.count > 0 %}
<h3>Действующие ограничения регистрационных действий</h3>
<table class="table car-restrictions">
<thead>
<tr>
<th>Начало ограничения</th>
<th>Вид ограничения</th>
<th>Основание</th>
<th>Регион</th>
<th>Инициатор</th>
</tr>
</thead>
<tbody>
{% for item in avtocod.restrictions.registration_actions.items %}
<tr>
<td>{{ item.date.start | dateFormat }}</td>
<td>{{ item.restrict.type }}</td>
<td>{{ item.restrict.reason }}</td>
<td>{{ item.initiator.region.name }}</td>
<td>{{ item.initiator.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% else %}
<h3>Участие в ДТП</h3>
<table class="table car-accidents">
<thead>
<tr>
<th>Дата и время</th>
<th>Тип происшествия</th>
<th>Регион</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">Ожидаем получение данных.</td>
</tr>
</tbody>
</table>
<h3>История регистрационных действий</h3>
<table class="table car-ownership">
<thead>
<tr>
<th>Период</th>
<th>Владелец</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">Ожидаем получение данных.</td>
</tr>
</tbody>
</table>
{% endif %}
<p class="footer-text">Отчет сформирован сервисом vin.kufar.by </p>
{% endblock %}