{% extends "industry_reforged/base.html" %} {% load i18n humanize %} {% load industry_tags %} {% block details %}

{% trans "Order #" %}{{ order.id }}

{% if order.status == 'REQUESTED' %} {% if perms.industry_reforged.corp_access %} {% trans "Requires Quote" %} {% else %} {% trans "Pending Quote from Director" %} {% endif %} {% elif order.status == 'QUOTED' %} {% if is_owner %} {% trans "Reject" %} {% trans "Accept Quote" %} {% else %} {% trans "Pending Acceptance by User" %} {% endif %} {% endif %} {% if order.status == 'REQUESTED' or order.status == 'QUOTED' %} {% if is_owner or perms.industry_reforged.corp_access %} {% endif %} {% endif %} {% trans "Back" %}
{% if order.parent_order %}
{% trans "Suborder Notice" %}

{% trans "This is a suborder. It is managed entirely through its parent order." %}

{% if order.root_order and order.root_order != order.parent_order %} {% trans "Main Order" %} #{{ order.root_order.id }} {% endif %} {% trans "Parent Order" %} #{{ order.parent_order.id }}
{% endif %} {% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access and not order.parent_order %}

{% trans "Provide Quote" %}

{% trans "Review the order details and the estimated BOM cost, then provide a final quote." %}

{% if order.child_orders.exists or order.parent_order %}
{% trans "Order Family Overview" %}

{% trans "This order is part of a larger production group. The final unified quote sent to the customer will be the sum of all orders in this group:" %} {% if order.parent_order %}{{ order.parent_order.grand_total|eve_isk }}{% else %}{{ order.grand_total|eve_isk }}{% endif %}

{% with family_parent=order.parent_order|default:order %}
{% trans "Parent Order" %} #{{ family_parent.id }} {% for item in family_parent.items.all %} {{ item.item_type.name }} {% endfor %} {{ family_parent.get_status_display }}
{{ family_parent.total_price|eve_isk }} {% if order != family_parent %} {% trans "View" %} {% endif %}
{% for child in family_parent.child_orders.all %}
{% trans "Child Order" %} #{{ child.id }} {% for item in child.items.all %} {{ item.item_type.name }} {% endfor %} {{ child.get_status_display }}
{{ child.total_price|eve_isk }} {% if order != child %} {% trans "View" %} {% endif %}
{% endfor %}
{% endwith %}
{% endif %}
{% csrf_token %}
ISK
{% trans "Est. Value:" %} {{ order.total_price|eve_isk_short }}
{% trans "Page will reload on change" %}
ISK
{% trans "Optional ISK downpayment" %}
1 PLEX = {{ plex_price|eve_isk_short }}
{% trans "Optional quote note" %}
{% endif %}
{% if order.status == 'REQUESTED' or order.status == 'QUOTED' %}

{% trans "Profit & Loss (Quote Analysis)" %}

{% trans "Jita Sell Value (Requested Items)" %} {{ original_price|eve_isk }}
{% trans "Material Cost (BOM Jita Sell)" %} -{{ total_bom_price|eve_isk }}
{% trans "Estimated Build Cost" %} -{{ estimated_build_cost|eve_isk }}
{% trans "Suggested Price" %} {{ order.total_price|eve_isk }}
{% trans "Profit Margin" %} {{ profit_margin|eve_isk }}
{% include "industry_reforged/_order_details_sidebar.html" %}
{% endif %}
{% if order_items %}

{% trans "Itemized Invoice" %}

{% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %}
{% csrf_token %} {% endif %} {% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %} {% endif %} {% if build_items %} {% if buy_items %} {% endif %} {% for item in build_items %} {% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %} {% endif %} {% endfor %} {% endif %} {% if buy_items %} {% for item in buy_items %} {% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %} {% endif %} {% endfor %} {% endif %} {% if not build_items and not buy_items %} {% endif %} {% if savings > 0 %} {% endif %} {% if order.upfront_payment > 0 %} {% endif %} {% if order.upfront_payment_plex > 0 %} {% endif %} {% if order.upfront_payment > 0 or order.upfront_payment_plex > 0 %} {% endif %}
{% trans "Item" %} {% trans "Quantity" %} {% trans "Discount" %} {% trans "Unit Price" %} {% trans "Total" %}
{% trans "Manufactured Items" %}
{{ item.item_type.name }} {{ item.item_type.name }}
{{ item.quantity }} {% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %} {% endif %} {% if item.discount_applied > 0 %} {{ item.discount_applied }}% {% else %} - {% endif %} {% if item.discount_applied > 0 %} {{ item.original_price_per_unit|eve_isk }}
{% endif %} {{ item.price_per_unit|eve_isk }}
{{ item.line_total|eve_isk }}
{% trans "Buy Products (Jita Price)" %}
{{ item.item_type.name }} {{ item.item_type.name }}
{{ item.quantity }} {% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %} {% endif %} {% if item.discount_applied > 0 %} {{ item.discount_applied }}% {% else %} - {% endif %} {% if item.discount_applied > 0 %} {{ item.original_price_per_unit|eve_isk }}
{% endif %} {{ item.price_per_unit|eve_isk }}
{{ item.line_total|eve_isk }}
No items found.
{% trans "Original Jita Price (Est.):" %} {{ original_price|eve_isk }}
{% trans "Your Savings (Corp Discount / Adjustment):" %} -{{ savings|eve_isk }}
{% trans "Current Quote Total:" %} {{ order.total_price|eve_isk }}
{% trans "Upfront Payment Required:" %} {{ order.upfront_payment|eve_isk }}
{% trans "Upfront Payment Required (PLEX):" %}
{% trans "Current rate" %}: 1 PLEX = {{ plex_price|eve_isk_short }}
{{ order.upfront_payment_plex }} PLEX
{% trans "Remaining Balance on Delivery:" %} {{ order.remaining_balance|eve_isk }}
{% if order.status == 'REQUESTED' and perms.industry_reforged.corp_access %}
{% trans "Select items to split them into a new Child Order." %}
{% endif %}
{% endif %} {% if display_child_orders and order.child_orders.exists %} {% for child in order.child_orders.all %}

{% trans "Split Order #" %}{{ child.id }}

{% for item in child.items.all %} {% empty %} {% endfor %}
{% trans "Item" %} {% trans "Quantity" %} {% trans "Discount" %} {% trans "Unit Price" %} {% trans "Total" %}
{{ item.item_type.name }} {{ item.item_type.name }}
{{ item.quantity }} {% if item.discount_applied > 0 %} {{ item.discount_applied }}% {% else %} - {% endif %} {% if item.discount_applied > 0 %} {{ item.original_price_per_unit|eve_isk }}
{% endif %} {{ item.price_per_unit|eve_isk }}
{{ item.line_total|eve_isk }}
No items found.
{% trans "Target Facility:" %} {% if child.target_facility %}{{ child.target_facility.name }}{% else %}{% trans "Default" %}{% endif %}
{% trans "Child Order Total:" %} {{ child.total_price|eve_isk }}
{% endfor %}

{% trans "Grand Total (All Orders):" %}

{{ order.grand_total|eve_isk }}

{% endif %}
{% include "industry_reforged/_order_details_sidebar.html" %}
{% if perms.industry_reforged.corp_access %}
{% csrf_token %}

{% trans "Required Blueprints (ME & BPC Overrides)" %}

{% if order.status == 'REQUESTED' %}
{% endif %}
{% for p in products_me %} {% empty %} {% endfor %}
{% trans "Blueprint" %} {% trans "Material Efficiency" %} {% trans "Max Runs (BPC)" %}
{{ p.name }} {{ p.name }} {% if p.missing_bp and p.has_blueprint %} {% endif %}
{% if not p.has_blueprint %} N/A {% else %} {% if order.status == 'REQUESTED' %}
%
{% else %} {{ p.current_me }}% {% endif %} {% endif %}
{% if not p.has_blueprint %} N/A {% else %} {% if order.status == 'REQUESTED' %}
{% else %} {% if p.current_max_runs == 0 %}Infinite (BPO){% else %}{{ p.current_max_runs }}{% endif %} {% endif %} {% endif %}
{% trans "No blueprints required for this order." %}

{% trans "Missing Blueprints" %}

{% for p in missing_bps %} {% empty %} {% endfor %}
{% trans "Item" %} {% trans "Status" %}
icon {{ p.name }} {% trans "Missing" %}
{% trans "All required blueprints are available in the corporation." %}
{% endif %}
{% include "industry_reforged/partials/quote_bom_panes.html" %}
{% endblock %}