[%- USE P -%] [%- USE T8 %] [%- USE HTML %] [%- USE LxERP %]

[% HTML.escape(title) %]

[%- INCLUDE 'common/flash.html' %]
[% FOREACH key = hidden_vars.keys; P.hidden_tag(key, HTML.escape(hidden_vars.$key)); END %]
[% FOREACH part_id = stocked_by_parts_id.keys.sort -%] [% NEXT UNLESS stocked_by_parts_id.$part_id.size > 1 %] [% FOREACH part = stocked_by_parts_id.$part_id -%] [% SET alloc_qty = ''; FOREACH alloc = allocated_by_parts_id.$part_id; IF (alloc.warehouse_id == part.warehouse.id && alloc.bin_id == part.bin_id && HTML.escape(alloc.chargenumber) == HTML.escape(part.chargenumber)); SET alloc_qty = alloc.qty; END; END -%] [% END %] [% END %]
[% 'The following assembly items are ambigious. Please check the selection.' | $T8 %]
[% 'Partnumber' | $T8%] [% 'Description' | $T8%] [% 'Chargenumber' | $T8%] [% 'Warehouse' | $T8%] [% 'Bin' | $T8%] [% 'Onhand' | $T8%] [% 'Qty' | $T8%] [% 'Unit' | $T8%]
[% 'needed qty' | $T8 %] [% LxERP.format_amount(needed_by_parts_id.$part_id, -2) %] [% stocked_by_parts_id.$part_id.0.part.unit | html %]
[% P.hidden_tag('allocations[+].parts_id', part_id )%] [% P.hidden_tag('allocations[].chargenumber', part.chargenumber )%] [% P.hidden_tag('allocations[].warehouse_id', part.warehouse_id )%] [% P.hidden_tag('allocations[].bin_id', part.bin_id )%] [% part.part.partnumber | html %] [% part.part.description | html %] [% part.chargenumber | html %] [% part.warehouse.description | html %] [% part.bin.description | html %] [% LxERP.format_amount(part.qty, -2) %] [% P.input_number_tag('allocations[].qty', alloc_qty, precision => -2, class="wi-verysmall") %] [% part.part.unit | html %]
[% FOREACH part_id = stocked_by_parts_id.keys.sort -%] [% NEXT UNLESS stocked_by_parts_id.$part_id.size <= 1 %] [% FOREACH part = stocked_by_parts_id.$part_id -%] [% SET alloc_qty = ''; FOREACH alloc = allocated_by_parts_id.$part_id; IF (alloc.warehouse_id == part.warehouse.id && alloc.bin_id == part.bin_id && HTML.escape(alloc.chargenumber) == HTML.escape(part.chargenumber)); SET alloc_qty = alloc.qty; END; END -%] [% END %] [% END %]
[% 'The following assembly items are unambigious and will be used for production.' | $T8 %]
[% 'Partnumber' | $T8%] [% 'Description' | $T8%] [% 'Chargenumber' | $T8%] [% 'Warehouse' | $T8%] [% 'Bin' | $T8%] [% 'Onhand' | $T8%] [% 'Qty' | $T8%] [% 'Unit' | $T8%]
[% P.hidden_tag('allocations[+].parts_id', part_id )%] [% P.hidden_tag('allocations[].chargenumber', part.chargenumber )%] [% P.hidden_tag('allocations[].warehouse_id', part.warehouse_id )%] [% P.hidden_tag('allocations[].bin_id', part.bin_id )%] [% part.part.partnumber | html %] [% part.part.description | html %] [% part.chargenumber | html %] [% part.warehouse.description | html %] [% part.bin.description | html %] [% LxERP.format_amount(part.qty, -2) %] [% P.hidden_tag('allocations[].qty', LxERP.format_amount(alloc_qty, -2)) %] [% LxERP.format_amount(alloc_qty, -2) %] [% part.part.unit | html %]