{% extends "default_content_page.html" %} {% load pricing_extras %} {% block title %}Прорахунок вартості{% endblock %} {% block content-title %}Прорахунок вартості{% endblock %} {% block content-inner %} {% if not google_configured %}
Відстані не рахуються: на сервері не вказано ключ Google Maps. Зверніться до адміністратора.
{% endif %}
{{ form.farmer }} {% include "includes/field_errors.html" with errors=form.farmer.errors %}
або
{{ form.settlement }} {% include "includes/field_errors.html" with errors=form.settlement.errors %}
Якщо зерно відвантажують не за адресою господарства, оберіть населений пункт: відстань рахуватиметься від нього.
{% if form.non_field_errors %}
{% include "includes/field_errors.html" with errors=form.non_field_errors %}
{% endif %}
{{ form.culture }} {% include "includes/field_errors.html" with errors=form.culture.errors %}
{{ form.price }} {% include "includes/field_errors.html" with errors=form.price.errors %}
{{ form.tons }} {% include "includes/field_errors.html" with errors=form.tons.errors %}
{% if calculation %} {% with culture=form.cleaned_data.culture price=form.cleaned_data.price tons=form.cleaned_data.tons %} {% if calculation.error %}
{{ calculation.error }}
{% endif %} {% if not calculation.options %}

Зараз жодне місце розвантаження не купує {{ culture }} за актуальною ціною. {% if calculation.skipped_prices %}Ще {{ calculation.skipped_prices }} цін мають статус «Оновлюється» або «Стоп».{% endif %}

{% else %} {% with best=calculation.best %} {% if best %}
{% if best.profit_total >= 0 %}Найвигідніше везти до{% else %}Усі варіанти збиткові. Найменший збиток —{% endif %}

{{ best.point.name }}

{{ best.point.region }} обл.{% if best.point.terminal %}, {{ best.point.terminal }}{% endif %}, {{ best.distance_km|money }} км{% if best.duration_min %}, близько {{ best.duration_min|duration }} у дорозі{% endif %}
{% if best.margin_per_ton >= 0 %}+{% endif %}{{ best.margin_per_ton|money }} грн/т
відхилення з тонни, {{ tons|money:1 }} т
{% endif %} {% endwith %}

Усі місця розвантаження

{{ culture }}, {{ tons|money:1 }} т по {{ price|money }} грн/т{% if calculation.skipped_prices %}. Не враховано {{ calculation.skipped_prices }} цін зі статусом «Оновлюється» чи «Стоп»{% endif %}
{% for option in calculation.options %} {% if option.available %} {% else %} {% endif %} {% endfor %}
Місце розвантаження Відстань Ціна для фермера
FCA, грн/т
Перевезення,
грн/т
Ціна для фермера
CPT, грн/т
Бажана ціна
для фермера
FCA, грн/т
Відхилення,
грн/т
{{ option.point.name }}
{{ option.point.region }} обл.{% if option.point.district %}, {{ option.point.district }} р-н{% endif %} {% if option.price.specification %}
{{ option.price.culture }} {{ option.price.specification }}{% endif %}
{{ option.distance_km|money }} км
{{ option.duration_min|duration }}
{{ option.fca_price|money }} {{ option.transport_per_ton|money }}
{{ option.rate|money:2 }} × {{ option.distance_km|money }} км{% if option.beyond_tariffs %}, тариф з останнього діапазону{% endif %}
{{ option.price.price|money }} {{ price|money }} {{ option.margin_per_ton|money }}{{ option.problem }}{% if option.price.price %}. Ціна CPT {{ option.price.price|money }} грн/т{% endif %}

Відстані — найкоротший автомобільний маршрут за Google Maps від {{ origin_label }}. Тарифи — з розділу «Тарифи перевезення», ціни — з «Місць розвантаження».

{% endif %} {% endwith %} {% endif %} {% endblock %} {% block extra_body_scripts %} {% endblock %}