{% extends "base.html" %} {% block content %}
{% 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 %}
{{ ns.count }}
{% if minifigs_file.figs | length > 0 %}

Minifigs

{% for fig in minifigs_file.figs %}

{{ fig.name}}

X {{ fig.quantity }}
{% for part in fig.parts %} {% for i in json_file['unit'] %} {% endfor %} {% endfor %}
ID Name Total Qty
{{ part.part_num }} {{ part.name }} {{ part.quantity * fig.quantity }}
{% set ns = namespace(count='') %}
{% for j in json_file['unit'][loop.index0]['bricks']['missing'] %} {% if j['brick']['ID'] == part.part_num and j['brick']['color_name'] == part.color_name %} {% endif %} {% endfor %}
{{ ns.count }}
{% endfor %} {% endif %} {% endblock %} {% block scripts %} {% endblock %}