{% load report %}

<h4>Component Shortfall Report</h4>
<hr>
<table class='table table-striped table-condensed'>
    <thead>
        <tr>
            <th>Part</th>
            <th>Required</th>
            <th>Stock</th>
            <th>On Order</th>
            <th>Shortfall</th>
        </tr>
    </thead>
    <tbody>
        {% for entry in requirements %}
        <tr>
            <td>
                <a href='{{ entry.part_url }}'>{{ entry.part.full_name }}</a>
            </td>
            <td>{% format_number entry.required %}</td>
            <td>{% format_number entry.stock %}</td>
            <td>{% format_number entry.on_order %}</td>
            <td>{% format_number entry.shortfall %}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>

{% if download_link %}
<hr>
<div>
    <a href='{{ download_link }}'>Download Excel Report</a>
</div>
{% endif %}
