{% extends 'base.html' %} {% load i18n static humanize %} {% load crispy_forms_tags %} {% block title %} {{ _("Opportunity Detail") }} {% endblock title %} {% block content %}

{{ _("Opportunity details") }}

{% if opportunity.car %}

{{ opportunity.car.id_car_make.get_local_name }} - {{ opportunity.car.id_car_model.get_local_name }} - {{ opportunity.car.year }}

{% endif %}
{% if opportunity.car.marked_price %}
{{ opportunity.car.total }}
{% endif %}
{% if opportunity.car.id_car_make.logo %} {% endif %}
{% if opportunity.customer %}
{{ opportunity.customer|capfirst }}
{% trans "Individual" %}
{% else %}
{{ opportunity.organization|capfirst }}
{% trans "Organization" %}
{% endif %}
{% trans "STAGE" %} : {{ opportunity.get_stage_display }}{{ opportunity.get_status_display }}

{{ opportunity.get_status_display }}

{{ opportunity.created|naturaltime|capfirst }}
{{ car.vin }}

{{ _("Upcoming Events") }}

    {% for event in schedules %}
  • {{ event.scheduled_type|capfirst }} {{ event.purpose }}
    {{ event.scheduled_at|naturaltime|capfirst }}
  • {% empty %}
  • {{ _("No upcoming events") }}
  • {% endfor %}

{{ _("Related Records") }}

{{ _("Estimate") }}
{% if opportunity.estimate %} {{ _("View Quotation") }} {% else %}

{{ _("No Estimate") }}

{% endif %}
{{ _("Invoice") }}
{% if opportunity.estimate.invoicemodel_set.all %} {{ _("View Invoice") }} {% else %}

{{ _("No Invoice") }}

{% endif %}

{{ _("System Information") }}

{{ _("Created ") }}
{{ opportunity.created|naturalday|capfirst }}
{{ _("Last Updated") }}
{{ opportunity.updated }}

{{ _("Quotation Amount") }}

{% if opportunity.estimate %}{{ opportunity.estimate.get_invoiced_amount.invoice_amount_paid__sum }}{% endif %}

{{ _("Amount") }}

{{ opportunity.amount }}

{{ _("Expected Revenue") }}

{{ opportunity.expected_revenue }}

{% trans "Probability (%)" %}

:

{{ opportunity.probability }} (%)

{{ _("Estimated Revenue") }}

:

{{ opportunity.expected_revenue }}

{{ _("Phone Number") }}

: {{ opportunity.customer.phone_number }}

{{ _("Email") }}

: {{ opportunity.customer.email }}

{{ _("Contact Name") }}

: {% if opportunity.customer %}
{{ opportunity.customer.full_name }}
{% else %}
{{ opportunity.organization }}
{% endif %}

{{ _("Assigned To") }}

: {% if request.user.email == opportunity.staff.email %}
{% trans "You" %}
{% else %}
{{ opportunity.staff.get_local_name }}
{% endif %}

{{ _("Create Date") }}

:
{{ opportunity.created|naturaltime|capfirst }}

{{ _("Expected Closing Date") }}

:
{{ opportunity.expected_close_date|date }}

{{ _("Tasks") }}

{% if perms.inventory.change_opportunity %} {% endif %}
{% for task in schedules %} {% include "partials/task.html" %} {% endfor %}
{% trans "Title" %} {% trans "Notes" %} {% trans "Assigned to" %} {% trans "Due Date" %} {% trans "Completed" %}

{{ _("Notes") }}

{% if perms.inventory.change_lead %} {% endif %}
{% for note in opportunity.get_notes %} {% endfor %}
{{ _("Note") }} {{ _("Created On") }} {{ _("Last Updated") }}
{{ note.note }} {{ note.created|naturalday|capfirst }} {{ note.updated|naturalday|capfirst }} {% if note.created_by == request.user %} "> {{ _("Update") }} {% endif %}

Emails

{% if perms.inventory.change_opportunity %}
{% if opportunity.lead %} {% endif %}
{% endif %}
{% for email in opportunity.lead.get_emails %} {% endfor %}
{% trans "Subject" %} {% trans "Sent by" %} {% trans "Date" %} {% trans "Status" %}
{{ email.subject }}
{{ email.to_email }}
{{ email.from_email }} {{ email.created }} {% trans "sent" %}

{% trans "Activity" %}

{% if perms.inventory.change_opportunity %}
{% endif %}
{% for activity in opportunity.get_activities %}
{% if activity.activity_type == "call" %} {% elif activity.activity_type == "email" %} {% elif activity.activity_type == "note" %} {% elif activity.activity_type == "task" %} {% elif activity.activity_type == "meeting" %} {% elif activity.activity_type == "whatsapp" %} {% endif %}

{{ activity.notes }}

{% if request.user.email == activity.created_by %}

by You

{% else %}

by{{ activity.created_by }}

{% endif %}
{{ activity.created|naturalday|capfirst }}

{% endfor %}
{% include 'modal/delete_modal.html' %} {% include "components/email_modal.html" %} {% include "components/task_modal.html" with content_type="opportunity" slug=opportunity.slug %} {% include "components/note_modal.html" with content_type="opportunity" slug=opportunity.slug %} {% include "components/schedule_modal.html" with content_type="opportunity" slug=opportunity.slug %} {% endblock %} {% block customJS %} {% endblock customJS %}