{% 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 }} # TODO : check later
{% endif %}
{% if opportunity.car.id_car_make.logo %} {% endif %}
{% if opportunity.customer %}
{{ opportunity.customer|capfirst }}
Individual
{% else %}
{{ opportunity.organization|capfirst }}
Organization
{% endif %}
STAGE : {{ opportunity.get_stage_display }}{{ opportunity.get_status_display }}

{{ opportunity.get_status_display }}

{{ opportunity.created|naturaltime|capfirst }}

{{ _("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 }}

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 %}
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 %}
Title Notes Assigned to Due Date 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 %}
{% comment %}

Notes

{%if perms.inventory.change_opportunity%}
{% csrf_token %}
{% endif %}
{% for note in opportunity.get_notes %}

{{ note.note }}

{{note.created|naturaltime|capfirst}}

by{{note.created_by}}

{% endfor %}
{% endcomment %} {% comment %}

Meeting

23 tasks

{% if perms.inventory.change_opportunity%} {% endif %}
{% for metting in opportunity.lead.get_meetings %}

{{metting.purpose}}

{{metting.scheduled_at}} - {{meeting.duration}}
{% endfor %}
{% endcomment %} {% comment %}

Call

{% if perms.inventory.change_opportunity%} {% endif %}
{{opportunity.get_all_notes}}
{% for call in opportunity.lead.get_calls %} {% endfor %}
Purpose Scheduled By Created at
{{call.purpose}} {{call.scheduled_by}} {{call.created_at|naturaltime|capfirst}}
{% endcomment %}

Emails

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

Attachments

Silly_sight_1.png

768kB|Shantinan Mekalan|21st Dec, 12:56 PM

All_images.zip

12.8 mB|Yves Tanguy|19th Dec, 08:56 PM

Project.txt

123 kB|Shantinan Mekalan|12th Dec, 12:56 PM

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 %}