{% extends "cmc/base.html" %} {# Or your actual base template path #} {% load static %} {% block title %}{{ page_title }}{% endblock %} {% block content %}
{% translate "Enquiry" %}:
{{ enquiry.title }}
{% translate "Customer" %}:
{% if enquiry.customer %} {{ enquiry.customer.name }} {% else %} N/A {% endif %}
{% translate "Contact" %}:
{% if enquiry.contact %} {{ enquiry.contact.first_name }} {{ enquiry.contact.last_name }} {{ enquiry.contact.email }} {% else %} N/A {% endif %}
{% comment %} Status CSS Class Logic {% endcomment %} {% with status_id=enquiry.status.id|default:0 %} {% if status_id == 3 %}{%_status_class = "jobwon" %}{% endif %} {% if status_id == 4 or status_id == 8 or status_id == 9 or status_id == 10 %}{%_status_class = "joblost" %}{% endif %} {% if status_id == 6 %}{%_status_class = "information" %}{% endif %} {% if status_id == 11 %}{%_status_class = "informationsent" %}{% endif %} {% if status_id == 5 %}{%_status_class = "quoted" %}{% endif %} {% if status_id == 1 %}{%_status_class = "requestforquote" %}{% endif %} {% endwith %}
{% translate "Status" %}:
{% if enquiry.status %} {{ enquiry.status.name }} {% else %} N/A {% endif %}

{% translate "Details" %}

{% translate "Assigned to User" %}
{% if enquiry.user %} {{ enquiry.user.username }} {% else %} N/A {% endif %}
{% translate "State" %}
{% if enquiry.state %} {{ enquiry.state.name }} {% else %} N/A {% endif %}
{% translate "Country" %}
{% if enquiry.country %} {{ enquiry.country.name }} {% else %} N/A {% endif %}
{% translate "GST Applicable" %}
{% if enquiry.gst %} {% translate "Yes - GST Applicable" %} {% else %} {% translate "No - GST Not Applicable" %} {% endif %}
{% translate "Principle" %}
{% if enquiry.principle %} {{ enquiry.principle.name }} {% else %} N/A {% endif %}
{% translate "Comments" %}
{{ enquiry.comments|linebreaksbr|default_if_none:"" }}
{% translate "Billing Address" %}
{% if enquiry.billing_address %} {{ enquiry.billing_address.address_line_1 }}
{% if enquiry.billing_address.address_line_2 %}{{ enquiry.billing_address.address_line_2 }}
{% endif %} {{ enquiry.billing_address.city }} {{ enquiry.billing_address.state.name }} {{ enquiry.billing_address.postcode }}
{{ enquiry.billing_address.country.name }} {% else %} {% translate "No Billing Address Assigned for this Enquiry" %} {% endif %}
{% translate "Shipping Address" %}
{% if enquiry.shipping_address %} {{ enquiry.shipping_address.address_line_1 }}
{% if enquiry.shipping_address.address_line_2 %}{{ enquiry.shipping_address.address_line_2 }}
{% endif %} {{ enquiry.shipping_address.city }} {{ enquiry.shipping_address.state.name }} {{ enquiry.shipping_address.postcode }}
{{ enquiry.shipping_address.country.name }} {% else %} {% translate "No Shipping Address Assigned for this Enquiry" %} {% endif %}
{% comment %} Convert 'principle_contacts_email_box' element. This will likely be an include tag. You'll need to create 'cmc/partials/principle_contacts_email_box.html' and pass the necessary context. {% endcomment %} {% if principle_contacts %} {% include 'cmc/partials/principle_contacts_email_box.html' with enquiry_title=enquiry.title principle_contacts=principle_contacts %} {% endif %}
{# Assuming you have this JS file #}
{% comment %} Dialogs - These will require JavaScript to function. The HTML structure is provided. {% endcomment %}

{% translate "Note: View an OrderAcknowledgement to create an Invoice pre-filled with the same data" %}

{% comment %} This div was empty, perhaps for AJAX content later? {% endcomment %}
{% endblock %} {% block extra_js %} {# Add any page-specific JavaScript here, especially for the dialogs #} {% endblock %}