{% extends "base.html" %} {% block body%}
{% for sku in inventory %} {% if (sku.excess_stock > sku.shortages) %}

{{sku.sku.sku_id}}

{% elif (sku.excess_stock < sku.shortages) %}

{{sku.sku.sku_id}}

{% else %}

{{sku.sku.sku_id}}

{% endif %} {% endfor %}
{% for sku in inventory %}

Quantity On Hand: {{"{:,.2f}".format(sku.quantity_on_hand)}}

{% for cur in currency if (cur.id == sku.currency_id) %} {% autoescape false %} {% set sym = cur.symbol %}

Retail Price: {{sym}}{{"{:,.2f}".format(sku.retail_price)}}

Unit Cost: {{sym}}{{"{:,.2f}".format(sku.unit_cost)}}

Markup: {{(sku.markup_percentage * 100)|round(0)|int}}%

Gross Margin: {{sym}}{{"{:,.2f}".format(sku.gross_profit_margin)}}

Average Orders: {{sku.average_orders}}

Minimum Order: {{sku.min_order}}

Maximum Order: {{sku.max_order}}

Standard Deviation: {{sku.standard_deviation}}

{% if (sku.excess_stock > sku.shortages) %}

Status: Excess

Excess Units: {{sku.excess_stock}}

Excess Cost: {{sym}}{{"{:,.2f}".format(sku.excess_cost)}}

{% elif (sku.excess_stock < sku.shortages) %}

Status: Shortage

Shortage Units: {{sku.shortages}}

Shortage Cost: {{sym}}{{"{:,.2f}".format(sku.shortage_cost)}}

{% else %}

Status: Healthy

{% endif %}

Revenue: {{sym}}{{"{:,.2f}".format(sku.revenue)}}

Contribution to Revenue: {{"{:.2f}".format(sku.percentage_contribution_revenue *100)}}

Revenue Rank: {{sku.revenue_rank}}

{% endautoescape %} {% endfor %} {% endfor %}
{% set count = 1 %} {% for order in orders %} {% endfor %}
Period Orders
{{ count }} {% set count = count + 1 %} {{order.order_quantity}}
{% for sku in inventory %} {% for cur in currency if (cur.id == sku.currency_id) %} {% autoescape false %} {% set sym = cur.symbol %}

{% endautoescape %} {% endfor %}
Economic Order (qty): {{sku.economic_order_quantity}}
Retail Price {{sym}}{{"{:,.2f}".format(sku.retail_price)}}
Unit Cost {{sym}}{{"{:,.2f}".format(sku.unit_cost)}}
Retail Price {{sym}}{{"{:,.2f}".format(sku.retail_price)}}
Markup {{(sku.markup_percentage * 100)|round(0)|int}}%
Gross Margin: {{sym}}{{"{:,.2f}".format(sku.gross_profit_margin)}}
Reorder Quantity: {{sku.reorder_quantity}}
Inventory Turns: {{sku.inventory_turns}}
Inventory Classification: {{sku.abc_xyz_classification}}
Safety Stock: {{sku.safety_stock}}
Reorder Level: {{sku.reorder_level}}

Recommendations:

{% for recommendation in recommendations%} {{recommendation.statement}} {% endfor %} {% endfor %}

Holts Trend Corrected Forecast

Trend:

{% set holts = "htces" %} {% set simple = "ses" %} {% for item in statistics %} {% if (item.details.type == holts) and (item.trending == true) %}

Linear Trend

{% elif (item.details.type == holts) and (item.trending == false) %}

No Linear Trend

{% else %} {% endif %} {% endfor %}
{% for item in statistics %} {% if (item.details.type == holts) %}

MAPE:

{{item.mape |round(2)}}

{% else %} {% endif %} {% endfor %}

Shortage as % Inventory

10

{% for item in forecast %} {% if (item.type.type == holts) %} {% else %} {% endif %} {% endfor %}
Forecast Period Forecast Quantity
{{item.period}} {{item.forecast_quantity |round |int}}
{% for item in statistics %} {% if (item.details.type == holts) %} {% else %} {% endif %} {% endfor %}
p-value: {{item.p_value |round(4)}}
Slope: {{item.slope |round(4)}}
Optimal Alpha: {{item.optimal_alpha |round(4)}}
Optimal Gamma: {{item.optimal_gamma |round(4)}}
Intercept: {{item.intercept |round(4)}}
Standard Error: {{item.slope_standard_error |round(4)}}
{% for item in breakdown %} {% if (item.breakdown.type == holts)%} {% else %} {% endif %} {% endfor %}
Forecast Period Level Estimate One Step Forecast Forecast Error Trend Squared Error Regression
{{item.period}} {{item.level_estimates |round(4) }} {{item.one_step_forecast |round(4)}} {{item.forecast_error |round(4)}} {{item.trend |round(4)}} {{item.squared_error |round(4)}} {{item.regression | round(4)}}

Simple Exponential Smoothing

Trend:

{% set holts = "htces" %} {% set simple = "ses" %} {% for item in statistics %} {% if (item.details.type == simple) and (item.trending == true) %}

Linear Trend

{% elif (item.details.type == simple) and (item.trending == false) %}

No Linear Trend

{% else %} {% endif %} {% endfor %}
{% for item in statistics %} {% if (item.details.type == simple) %}

MAPE:

{{item.mape |round(2)}}

{% else %} {% endif %} {% endfor %}

{% for item in forecast %} {% if (item.type.type == simple) %} {% else %} {% endif %} {% endfor %}
Forecast Period Forecast Quantity
{{item.period}} {{item.forecast_quantity |round |int}}
{% for item in statistics %} {% if (item.details.type == simple) %} {% else %} {% endif %} {% endfor %}
p-value: {{item.p_value |round(4)}}
Slope: {{item.slope |round(4)}}
Optimal Alpha: {{item.optimal_alpha |round(4)}}
Intercept: {{item.intercept |round(4)}}
Standard Error: {{item.slope_standard_error |round(4)}}
{% set holts = "htces" %} {% set simple = "ses" %} {% for item in breakdown %} {% if (item.breakdown.type == simple)%} {% else %} {% endif %} {% endfor %}
Forecast Period Level Estimate One Step Forecast Forecast Error Squared Error Regression
{{item.period}} {{item.level_estimates |round(4) }} {{item.one_step_forecast |round(4)}} {{item.forecast_error |round(4)}} {{item.squared_error |round(4)}} {{item.regression | round(4)}}
{% endblock %}