{% load i18n %} {% load humanize %} {% load waldur_core %} {% load waldur_marketplace %} {% trans "Marketplace Order Details" %}

{{ deployment_name }}

{% if deployment_address %}
{{ deployment_address }}
{% endif %} {% if deployment_phone %}
{{ deployment_phone }}
{% endif %} {% if deployment_email %}
{{ deployment_email }}
{% endif %}
{% trans "Requested by" %}: {{ order.created_by.full_name }} ({{ order.created_by.email }})
{% trans "Requested at" %}: {{ order.created|date:"SHORT_DATE_FORMAT" }} {{ order.created|time:"H:i" }}
{% if order.approved_by %}
{% trans "Approved by" %}: {{ order.approved_by.full_name }} ({{ order.approved_by.email }})
{% endif %} {% if order.approved_at %}
{% trans "Approved at" %}: {{ order.approved_at|date:"SHORT_DATE_FORMAT" }} {{ order.approved_at|time:"H:i" }}
{% endif %}

{% trans "Marketplace order" %}

UUID: {{ order.uuid|upper }}
{% for item in order.items.all %} {% endfor %}
# {% trans "DESCRIPTION" %} {% trans "PLAN" %} {% trans "PRICE" %}
{{ forloop.counter }}

{% if item.attributes.name %} {{ item.attributes.name }} {% elif item.offering.name %} {{ item.offering.name }} {% endif %}

{% if item.attributes.description %} {{ item.attributes.description }} {% elif item.offering.description %} {{ item.offering.description }} {% endif %}
{{ item.plan.name }} {{ currency }} {{ item.cost | floatformat:2 | intcomma }}
{% trans "TOTAL" %} {{ currency }} {{ order.total_cost | floatformat:2 | intcomma}}

{% trans "Details of order items" %}

{% for item in order.items.all %}
{{ forloop.counter }}. {% if item.attributes.name %} {{ item.attributes.name }} {% elif item.offering.name %} {{ item.offering.name }} {% endif %}
{% if item.attributes %}

{% trans "Offering request details" %}

{% for key, value in item.safe_attributes.items|dictsort:"0.lower" %} {% endfor %}
# {% trans "NAME" %} {% trans "VALUE" %}
{{ forloop.counter }} {{ key }} {{ value | pretty_json }}
{% endif %} {% if item.plan %}

{% trans "Billing plan components" %}

{% for component in item.plan.components.all %} {% endfor %}
# {% trans "NAME" %} {% trans "TYPE" %} {% trans "AMOUNT" %} {% trans "PRICE PER UNIT" %}
{{ forloop.counter }} {{ component.component.name }} {{ component.component.get_billing_type_display }} {% get_invoice_item_component_amount item component %} {{ component.component.measured_unit }} {{ currency }} {{ component.price | floatformat:4 | intcomma }}
{% trans "TOTAL" %} {{ currency }} {{ item.cost | floatformat:2 | intcomma}}
{% endif %} {% endfor %}