{% extends "build/build_base.html" %} {% load static %} {% load inventree_extras %} {% block page_title %} InvenTree | Allocate Parts {% endblock %} {% block details %} {% include "build/tabs.html" with tab='allocate' %}

Allocate Parts for Build


Part

Available

Required

Allocated

{% for bom_item in bom_items.all %} {% include "build/allocation_item.html" with item=bom_item build=build collapse_id=bom_item.id %} {% endfor %} {% endblock %} {% block js_load %} {{ block.super }} {% endblock %} {% block js_ready %} {{ block.super }} {% for bom_item in bom_items.all %} loadAllocationTable( $("#allocate-table-id-{{ bom_item.sub_part.id }}"), {{ bom_item.sub_part.id }}, "{{ bom_item.sub_part.full_name }}", "{% url 'api-build-item-list' %}?build={{ build.id }}&part={{ bom_item.sub_part.id }}", {% multiply build.quantity bom_item.quantity %}, $("#new-item-{{ bom_item.sub_part.id }}") ); {% endfor %} $("#auto-allocate-build").on('click', function() { launchModalForm( "{% url 'build-auto-allocate' build.id %}", { reload: true, } ); }); $('#unallocate-build').on('click', function() { launchModalForm( "{% url 'build-unallocate' build.id %}", { reload: true, } ); }); {% endblock %}