1 [% USE HTML %][% USE JavaScript %]<body onload="on_load();">
3 <script type="text/javascript" src="js/common.js"></script>
4 <script type="text/javascript" src="js/part_selection.js"></script>
5 <script type="text/javascript">
7 warehouses = new Array();
8 [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
9 warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
10 warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
11 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
12 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0] = new Array();
13 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['description'] = "---";
14 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['id'] = "";
15 [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
16 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]] = new Array();
17 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
18 warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
22 function warehouse_selected(warehouse_id, bin_id) {
23 var control = document.getElementById("bin_id");
25 for (var i = control.options.length - 1; i >= 0; i--) {
26 control.options[i] = null;
29 var warehouse_index = 0;
31 for (i = 0; i < warehouses.length; i++)
32 if (warehouses[i]['id'] == warehouse_id) {
37 var warehouse = warehouses[warehouse_index];
40 for (i = 0; i < warehouse['bins'].length; i++)
41 if (warehouse['bins'][i]['id'] == bin_id) {
46 for (i = 0; i < warehouse['bins'].length; i++) {
47 control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
51 control.options[bin_index].selected = true;
55 warehouse_selected(0, 0);
56 document.Form.partnumber.focus();
61 <form name="Form" method="post" action="wh.pl">
63 <input type="hidden" name="nextsub" value="[% HTML.escape(nextsub) %]">
65 [% IF saved_message %]
66 <p>[% saved_message %]</p>
69 <div class="listtop">[% title %]</div>
72 <translate>If you enter values for the part number and / or part
73 description then only those bins containing parts whose part
74 number or part description match your input will be
81 <th align="right" nowrap><translate>Transfer from warehouse</translate>:</th>
83 <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
84 [%- FOREACH warehouse = WAREHOUSES %]
85 <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
92 <th align="right" nowrap><translate>Bin</translate>:</th>
93 <td><select id="bin_id" name="bin_id"></select></td>
97 <th align="right" nowrap><translate>Limit part selection</translate>:</th>
102 <th align="right" nowrap><translate>Part Number</translate></th>
104 <input type="hidden" name="parts_id" id="parts_id">
105 <input name="partnumber" id="partnumber" size="30">
110 <th align="right" nowrap><translate>Part Description</translate></th>
112 <input name="description" size="30">
113 <input type="button" onclick="part_selection_window('partnumber', 'description', 'parts_id', 0, 'Form', 'no_services:no_assemblies')" value="?">
118 <th align="right" nowrap><translate>Charge number</translate></th>
119 <td><input name="chargenumber" size="30"></td>
125 <input type="submit" class="submit" name="action" value="<translate>Continue</translate>">