{% extends "base.html" %} {% block content %}

Inventory

{% for i in json_file['unit'] %} {% endfor %} {% for brick in inventory_file.results %} {% if brick.is_spare == False %} {% if brick.element_id == None %} {% else %} {% endif %} {% for i in json_file['unit'] %} {% endfor %} {% endif %} {% endfor %}
ID Name Color QtyMissing ({{ loop.index }})
{{ brick.part.part_num }} {{ brick.part.name }} {{ brick.color.name }} {{ brick.quantity }}
{% set ns = namespace(count='') %}
{% for j in json_file['unit'][loop.index0]['bricks']['missing'] %} {% if j['brick']['ID'] == brick.part.part_num and j['brick']['color_name'] == brick.color.name %} {% if j['brick']['is_spare']|lower == brick.is_spare|lower %} {% set ns.count = j['brick']['amount'] %} {% endif %} {% endif %} {% endfor %}

Spares

{% for i in json_file['unit'] %} {% endfor %} {% for brick in inventory_file.results %} {% if brick.is_spare == True %} {% if brick.element_id == None %} {% else %} {% endif %} {% for i in json_file['unit'] %} {% endfor %} {% endif %} {% endfor %}
img element_id part_num name color qtyMissing ({{ loop.index }})
{{ brick.element_id }} {{ brick.part.part_num }} {{ brick.part.name }} {{ brick.color.name }} {{ brick.quantity }} {% set ns = namespace(count='') %}
{% for j in json_file['unit'][loop.index0]['bricks']['missing'] %} {% if j['brick']['ID'] == brick.part.part_num and j['brick']['color_name'] == brick.color.name and j['brick']['is_spare']|lower == brick.is_spare|lower %} {% set ns.count = j['brick']['amount'] %} {% endif %} {% endfor %}
{% endblock %}