{% extends "default_content_page.html" %} {% block title %}Взаємодія: {{ farmer.name }}{% endblock %} {% block page-heading %}

Нова взаємодія

{{ farmer.name }}
{% endblock %} {% block content-inner %}
{% csrf_token %}
{% include "includes/field_errors.html" with errors=form.non_field_errors %}
Як зв'язувалися
{% for radio in form.interaction_type %} {% endfor %}
{% include "includes/field_errors.html" with errors=form.interaction_type.errors %}
{{ form.contact_person }} {% include "includes/field_errors.html" with errors=form.contact_person.errors %}
{{ form.cultures }} {% include "includes/field_errors.html" with errors=form.cultures.errors %}
{{ form.price }} {% include "includes/field_errors.html" with errors=form.price.errors %}
{{ form.desired_price }} {% include "includes/field_errors.html" with errors=form.desired_price.errors %}
{{ form.basis }} {% include "includes/field_errors.html" with errors=form.basis.errors %}
{{ form.comment }} {% include "includes/field_errors.html" with errors=form.comment.errors %}
Статус клієнта після розмови
{% for radio in form.client_status %} {% endfor %}
{% include "includes/field_errors.html" with errors=form.client_status.errors %}
{{ form.next_interaction_date }}
Задача з'явиться в «Моїх задачах» на цю дату. {% include "includes/field_errors.html" with errors=form.next_interaction_date.errors %}
{% if not form.fields.assigned_to.widget.is_hidden %}
{{ form.assigned_to }} {% include "includes/field_errors.html" with errors=form.assigned_to.errors %}
{% else %} {{ form.assigned_to }} {% endif %}
Скасувати

Про фермера

Статус
{{ farmer.get_client_status_display }}
Керівник
{{ farmer.director|default:"—" }}
Телефони
{% for phone in farmer.phone_list %}{{ phone }}{% if not forloop.last %}, {% endif %}{% empty %}—{% endfor %}
Площа
{% if farmer.landing_area %}{{ farmer.landing_area|floatformat:0 }} га{% else %}—{% endif %}

Попередні взаємодії

{{ interactions|length }}
{% if interactions %}
    {% for interaction in interactions|slice:":10" %}
  1. {{ interaction.date|date:"d.m.Y" }}, {{ interaction.get_interaction_type_display|lower }}
    {{ interaction.user.get_full_name|default:interaction.user.email }}
    {% for culture in interaction.cultures.all %}{{ culture.cultureable_name }}{% if not forloop.last %}, {% endif %}{% endfor %}{% if interaction.price %}: {{ interaction.price|floatformat:0 }} грн{% endif %}{% if interaction.desired_price %}, хоче {{ interaction.desired_price|floatformat:0 }} грн{% endif %}, {{ interaction.basis }}
    {% if interaction.comment %}
    {{ interaction.comment }}
    {% endif %}
  2. {% endfor %}
{% else %}

Це перша взаємодія з цим фермером.

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