Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5a577869

Von Hans Peter Schlaepfer vor fast 6 Jahren hinzugefügt

  • ID 5a5778690d576dc50a3209255c219a6463a6d7ed
  • Vorgänger ccbe3efb
  • Nachfolger a8253337

Neues kivitendo Design Aenderungen in templates/webpages/wh/..

Unterschiede anzeigen:

templates/webpages/wh/journal_filter.html
1
[%- USE T8 %]
2
[%- USE L %]
3
[%- USE P %]
4
[%- USE HTML %][%- USE JavaScript %]
1
[% USE T8 %]
2
[% USE L %]
3
[% USE P %]
4
[% USE HTML %]
5
[% USE JavaScript %]
6

  
5 7
<h1>[% 'Report about warehouse transactions' | $T8 %]</h1>
6 8

  
7
 <script type="text/javascript">
8
   <!--
9
      warehouses = new Array();
10
      warehouses[0] = new Array();
11
      warehouses[0]['id'] = "0";
12
      warehouses[0]['bins'] = new Array();
13
      warehouses[0]['bins'][0] = new Array();
14
      warehouses[0]['bins'][0]['description'] = "---";
15
      warehouses[0]['bins'][0]['id'] = "";
16
      [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
9
<script type="text/javascript"><!--
10
    warehouses = new Array();
11
    warehouses[0] = new Array();
12
    warehouses[0]['id'] = "0";
13
    warehouses[0]['bins'] = new Array();
14
    warehouses[0]['bins'][0] = new Array();
15
    warehouses[0]['bins'][0]['description'] = "---";
16
    warehouses[0]['bins'][0]['id'] = "";
17
    [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
18
    [% FOREACH warehouse = WAREHOUSES_it %]
17 19
      warehouses[[% WAREHOUSES_it.count %]] = new Array();
18 20
      warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %];
19 21
      warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array();
20 22
      warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array();
21 23
      warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---";
22 24
      warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = "";
23
      [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
24
      warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
25
      warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
26
      warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
27
      [% END %]
25
      [% USE BINS_it = Iterator(warehouse.BINS) %]
26
      [% FOREACH bin = BINS_it %]
27
        warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
28
        warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
29
        warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
28 30
      [% END %]
31
    [% END %]
29 32

  
30
      function warehouse_selected(warehouse_id, bin_id) {
31
        var control = document.getElementById("bin_id");
32

  
33
        for (var i = control.options.length - 1; i >= 0; i--) {
34
          control.options[i] = null;
35
        }
33
    function warehouse_selected(warehouse_id, bin_id) {
34
      var control = document.getElementById("bin_id");
36 35

  
37
        var warehouse_index = 0;
36
      for (var i = control.options.length - 1; i >= 0; i--) {
37
        control.options[i] = null;
38
      }
38 39

  
39
        for (i = 0; i < warehouses.length; i++)
40
          if (warehouses[i]['id'] == warehouse_id) {
41
            warehouse_index = i;
42
            break;
43
          }
40
      var warehouse_index = 0;
44 41

  
45
        var warehouse = warehouses[warehouse_index];
46
        var bin_index = 0;
42
      for (i = 0; i < warehouses.length; i++)
43
        if (warehouses[i]['id'] == warehouse_id) {
44
          warehouse_index = i;
45
          break;
46
        }
47 47

  
48
        for (i = 0; i < warehouse['bins'].length; i++)
49
          if (warehouse['bins'][i]['id'] == bin_id) {
50
            bin_index = i;
51
            break;
52
          }
48
      var warehouse = warehouses[warehouse_index];
49
      var bin_index = 0;
53 50

  
54
        for (i = 0; i < warehouse['bins'].length; i++) {
55
          control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
51
      for (i = 0; i < warehouse['bins'].length; i++)
52
        if (warehouse['bins'][i]['id'] == bin_id) {
53
          bin_index = i;
54
          break;
56 55
        }
57 56

  
58

  
59
        control.options[bin_index].selected = true;
57
      for (i = 0; i < warehouse['bins'].length; i++) {
58
        control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
60 59
      }
61 60

  
62
      $(function() {
63
        warehouse_selected(0, 0);
64
        document.Form.partnumber.focus();
65
      })
66
     -->
67
 </script>
68 61

  
69
 <form method="post" name="Form" action="wh.pl" id="form">
62
      control.options[bin_index].selected = true;
63
    }
70 64

  
71
   <table>
72
    <tr>
73
     <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th>
74
    </tr>
65
    $(function() {
66
      warehouse_selected(0, 0);
67
      document.Form.partnumber.focus();
68
    })
69
   --></script>
75 70

  
71
<form method="post" name="Form" action="wh.pl" id="form">
72
<div class="wrapper">
73

  
74
<table class="tbl-horizontal">
75
  <tbody>
76 76
    <tr>
77
     <td>
78
      <table>
79
       <tr>
80
        <th align="right" nowrap>[% 'Warehouse' | $T8 %]:</th>
81
        <td>
82
         <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
83
          <option value="">---</option>
84
          [%- FOREACH warehouse = WAREHOUSES %]
77
      <th>[% 'Warehouse' | $T8 %]:</th>
78
      <td>
79
      <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-normal">
80
        <option value="">---</option>
81
        [% FOREACH warehouse = WAREHOUSES %]
85 82
          <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
86
          [%- END %]
87
         </select>
88
        </td>
89
       </tr>
90
       <tr>
91
        <th align="right" nowrap>[% 'Bin' | $T8 %]:</th>
92
        <td><select name="bin_id" id="bin_id"></select></td>
93
       </tr>
94
       <tr>
95
        <th align="right" nowrap>[% 'Part Number' | $T8 %]:</th>
96
        <td><input name="partnumber" id="partnumber" size=20></td>
97
       </tr>
98
       <tr>
99
        <th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th>
100
        <td>[% P.part.select_classification('classification_id') %]</td>
101
       </tr>
102
       <tr>
103
        <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
104
        <td><input name="description" size=40></td>
105
       </tr>
106
       <tr>
107
        <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
108
        <td><input name="chargenumber" size=40></td>
109
       </tr>
110
       [% IF INSTANCE_CONF.get_show_bestbefore %]
111
       <tr>
112
        <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
113
        <td>
114
          [% L.date_tag('bestbefore') %]
115
        </td>
116
       </tr>
117
       [% END %]
118
       <tr>
119
        <th align="right" nowrap>[% 'Transfer Quantity' | $T8 %]:</th>
120
        <td>
121
         <select name="qty_op">
83
        [% END %]
84
      </select>
85
      </td>
86
    </tr>
87
    <tr>
88
      <th>[% 'Bin' | $T8 %]:</th>
89
      <td>
90
        <select name="bin_id" id="bin_id" class="wi-normal">
91
      </select>
92
      </td>
93
    </tr>
94
    <tr>
95
      <th>[% 'Part Number' | $T8 %]:</th>
96
      <td><input type="text" name="partnumber" id="partnumber" class="wi-normal">
97
      </td>
98
    </tr>
99
    <tr>
100
      <th>[% 'Parts Classification' | $T8 %]:</th>
101
      <td>[% P.part.select_classification('classification_id', class='wi-normal') %]</td>
102
    </tr>
103
    <tr>
104
      <th>[% 'Part Description' | $T8 %]:</th>
105
      <td><input type="text" name="description" class="wi-normal">
106
      </td>
107
    </tr>
108
    <tr>
109
      <th>[% 'Charge Number' | $T8 %]:</th>
110
      <td><input type="text" name="chargenumber" class="wi-normal">
111
      </td>
112
    </tr>
113
    [% IF INSTANCE_CONF.get_show_bestbefore %]
114
      <tr>
115
        <th>[% 'Best Before' | $T8 %]:</th>
116
        <td> [% L.date_tag('bestbefore') %] </td>
117
      </tr>
118
    [% END %]
119
    <tr>
120
      <th>[% 'Transfer Quantity' | $T8 %]:</th>
121
      <td>
122
        <select name="qty_op" class="wi-normal">
122 123
          <option value="dontcare">---</option>
123 124
          <option value="atleast">[% 'At least' | $T8 %]</option>
124 125
          <option value="atmost">[% 'At most' | $T8 %]</option>
125 126
          <option value="exact">[% 'Exact' | $T8 %]</option>
126
         </select>
127
         <input name="qty">
128
         <select name="qty_unit">
129
          [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
130
         </select>
131
        </td>
132
       </tr>
133
       <tr>
134
        <th align="right" nowrap>[% 'From Date' | $T8 %]</th>
135
        <td>
136
          [% L.date_tag('fromdate') %]
137
        </td>
138
       </tr>
139
       <tr>
140
        <th align="right">[% 'To Date' | $T8 %]</th>
141
        <td>
142
          [% L.date_tag('todate') %]
143
        </td>
144
       </tr>
145
      </table>
146
     </td>
127
        </select>
128
        <input name="qty" type="text" class="wi-verysmall">
129
        <select name="qty_unit" class="wi-small">
130
          [% FOREACH unit = UNITS %]
131
            <option>[% unit.name %]</option>
132
          [% END %]
133
        </select>
134
      </td>
147 135
    </tr>
148

  
149
    <tr height="5"><td>&nbsp;</td></tr>
150

  
151 136
    <tr>
152
     <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
137
      <th>[% 'From Date' | $T8 %]</th>
138
      <td> <span class="wi-date">[% L.date_tag('fromdate') %]</span> </td>
153 139
    </tr>
154

  
155 140
    <tr>
156
     <td>
157
      <table>
158
       <tr>
159
        <td><input name="l_partdescription" id="l_partdescription" class="checkbox" type="hidden" value="Y" checked></td>
160
        <td nowrap><label for="l_partdescription">[% 'Part Description' | $T8 %]</label></td>
161
        <td><input name="l_qty" id="l_qty" class="checkbox" type="hidden" value="Y" checked></td>
162
        <td nowrap><label for="l_qty">[% 'Quantity' | $T8 %]</label></td>
163
       </tr>
164
       <tr>
165
        <td align="right"><input name="l_date" id="l_date" class="checkbox" type="checkbox" value="Y" checked></td>
166
        <td nowrap><label for="l_date">[% 'Date' | $T8 %]</label></td>
167
        <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
168
        <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
169
        <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
170
        <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
171
        [% IF INSTANCE_CONF.get_show_bestbefore %]
172
        <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
173
        <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
174
        [% END %]
175
       </tr>
176
       <tr>
177
        <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
178
        <td nowrap><label for="l_trans_id">[% 'Trans Id' | $T8 %]</label></td>
179
        <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
180
        <td nowrap><label for="l_trans_type">[% 'Trans Type' | $T8 %]</label></td>
181
        <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
182
        <td nowrap><label for="l_comment">[% 'Comment' | $T8 %]</label></td>
183
       </tr>
184
       <tr>
185
        <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
186
        <td nowrap><label for="l_warehouse_from">[% 'Warehouse From' | $T8 %]</label></td>
187
        <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
188
        <td nowrap><label for="l_bin_from">[% 'Bin From' | $T8 %]</label></td>
189
        <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
190
        <td nowrap><label for="l_warehouse_to">[% 'Warehouse To' | $T8 %]</label></td>
191
        <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
192
        <td nowrap><label for="l_bin_to">[% 'Bin To' | $T8 %]</label></td>
193
       </tr>
194
       <tr>
195
        <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
196
        <td nowrap><label for="l_employee">[% 'Employee' | $T8 %]</label></td>
197
        <td align="right"><input name="l_oe_id" id="l_oe_id" class="checkbox" type="checkbox" value="Y"></td>
198
        <td nowrap><label for="l_oe_id">[% 'Document' | $T8 %]</label></td>
199
        <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
200
        <td nowrap><label for="l_projectnumber">[% 'Project Number' | $T8 %]</label></td>
201
       </tr>
202
      </table>
203
     </td>
141
      <th>[% 'To Date' | $T8 %]</th>
142
      <td> <span class="wi-date">[% L.date_tag('todate') %]</span> </td>
204 143
    </tr>
205
   </table>
206
 </form>
144
  </tbody>
145
</table>
146

  
147
</div><!-- /.wrapper -->
148

  
149
<div class="form-addition control-panel">
150
<h3>[% 'Include in Report' | $T8 %]</h3>
151

  
152
<div class="col list">
153
<h4>[% 'Article data' | $T8 %]</h4>
154
  <div>
155
    <input name="l_partdescription" id="l_partdescription" type="checkbox" value="Y" checked>
156
    <label for="l_partdescription">[% 'Part Description' | $T8 %]</label>
157
  </div>
158
  <div>
159
    <input name="l_partnumber" id="l_partnumber" type="checkbox" value="Y" checked>
160
    <label for="l_partnumber">[% 'Part Number' | $T8 %]</label>
161
  </div>
162
  <div>
163
    <input name="l_chargenumber" id="l_chargenumber" type="checkbox" value="Y" checked>
164
    <label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label>
165
  </div>
166
  <div>
167
    <input name="l_qty" id="l_qty" type="checkbox" value="Y" checked>
168
    <label for="l_qty">[% 'Quantity' | $T8 %]</label>
169
  </div>
170
</div>
171

  
172
<div class="col list">
173
<h4>[% 'Storage' | $T8 %]</h4>
174
  <div>
175
    <input name="l_warehouse_from" id="l_warehouse_from" type="checkbox" value="Y" checked>
176
    <label for="l_warehouse_from">[% 'Warehouse From' | $T8 %]</label>
177
  </div>
178
  <div>
179
    <input name="l_bin_from" id="l_bin_from" type="checkbox" value="Y" checked>
180
    <label for="l_bin_from">[% 'Bin From' | $T8 %]</label>
181
  </div>
182
  <div>
183
    <input name="l_warehouse_to" id="l_warehouse_to" type="checkbox" value="Y" checked>
184
    <label for="l_warehouse_to">[% 'Warehouse To' | $T8 %]</label>
185
  </div>
186
  <div>
187
    <input name="l_bin_to" id="l_bin_to" type="checkbox" value="Y" checked>
188
    <label for="l_bin_to">[% 'Bin To' | $T8 %]</label>
189
  </div>
190
</div>
191

  
192
<div class="col list">
193
<h4>[% 'Miscellaneous' | $T8 %]</h4>
194
  <div>
195
    <input name="l_date" id="l_date" type="checkbox" value="Y" checked>
196
    <label for="l_date">[% 'Date' | $T8 %]</label>
197
  </div>
198
  [% IF INSTANCE_CONF.get_show_bestbefore %]
199
    <div>
200
      <input name="l_bestbefore" id="l_bestbefore" type="checkbox" value="Y" checked>
201
      <label for="l_bestbefore">[% 'Best Before' | $T8 %]</label>
202
    </div>
203
  [% END %]
204
  <div>
205
    <input name="l_trans_id" id="l_trans_id" type="checkbox" value="Y">
206
    <label for="l_trans_id">[% 'Trans Id' | $T8 %]</label>
207
  </div>
208
  <div>
209
    <input name="l_trans_type" id="l_trans_type" type="checkbox" value="Y" checked>
210
    <label for="l_trans_type">[% 'Trans Type' | $T8 %]</label>
211
  </div>
212
  <div>
213
    <input name="l_comment" id="l_comment" type="checkbox" value="Y">
214
    <label for="l_comment">[% 'Comment' | $T8 %]</label>
215
  </div>
216
  <div>
217
    <input name="l_employee" id="l_employee" type="checkbox" value="Y">
218
    <label for="l_employee">[% 'Employee' | $T8 %]</label>
219
  </div>
220
  <div>
221
    <input name="l_oe_id" id="l_oe_id" type="checkbox" value="Y">
222
    <label for="l_oe_id">[% 'Document' | $T8 %]</label>
223
  </div>
224
  <div>
225
    <input name="l_projectnumber" id="l_projectnumber" type="checkbox" value="Y" checked>
226
    <label for="l_projectnumber">[% 'Project Number' | $T8 %]</label>
227
  </div>
228
</div>
229

  
230
</div><!-- /.form-addition -->
231

  
232

  
233
</form>
templates/webpages/wh/removal_parts_selection.html
1
[%- USE T8 %]
2
[%- USE HTML %][%- USE JavaScript %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE JavaScript %]
4

  
3 5
<h1>[% title %]</h1>
4 6

  
5 7
 <form method="post" action="wh.pl" id="form">
......
8 10

  
9 11
  <p>[% 'Removal from warehouse' | $T8 %]: [% warehouse_description %]</p>
10 12

  
11
  <p>
12 13
   <table>
13 14
    <tr>
14 15
     <td>[% 'Select type of removal' | $T8 %]:</td>
15 16
     <td>
16 17
      <select name="transfer_type_id">
17
       [%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% HTML.escape(type.description) %]</option>[% END %]
18
       [% FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% HTML.escape(type.description) %]</option>[% END %]
18 19
      </select>
19 20
     </td>
20 21
    </tr>
21

  
22 22
    <tr>
23 23
     <td>[% 'Optional comment' | $T8 %]:</td>
24
     <td><input name="comment" size="60"></td>
24
     <td><input type="text" name="comment" size="60"></td>
25 25
    </tr>
26 26
   </table>
27
  </p>
28 27

  
29
  <p>
30 28
   <table>
31 29
    <tr>
32
     <th class="listheading">[% 'Bin' | $T8 %]</th>
33
     <th class="listheading">[% 'Part Number' | $T8 %]</th>
34
     <th class="listheading">[% 'Part Description' | $T8 %]</th>
35
     <th class="listheading">[% 'Charge Number' | $T8 %]</th>
30
     <th>[% 'Bin' | $T8 %]</th>
31
     <th>[% 'Part Number' | $T8 %]</th>
32
     <th>[% 'Part Description' | $T8 %]</th>
33
     <th>[% 'Charge Number' | $T8 %]</th>
36 34
     [% IF INSTANCE_CONF.get_show_bestbefore %]
37
     <th class="listheading">[% 'Best Before' | $T8 %]</th>
35
     <th>[% 'Best Before' | $T8 %]</th>
38 36
     [% END %]
39
     <th class="listheading">[% 'EAN' | $T8 %]</th>
40
     <th class="listheading">[% 'Available qty' | $T8 %]</th>
41
     <th class="listheading">[% 'Removal qty' | $T8 %]</th>
37
     <th>[% 'EAN' | $T8 %]</th>
38
     <th>[% 'Available qty' | $T8 %]</th>
39
     <th>[% 'Removal qty' | $T8 %]</th>
42 40
    </tr>
43

  
44 41
    [% FOREACH row = CONTENTS %]
45 42
    <tr class="listrow[% loop.count % 2 %]">
46 43
     <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
......
62 59
     <td>[% HTML.escape(row.ean) %]</td>
63 60
     <td>[% HTML.escape(row.qty) %]</td>
64 61
     <td>
65
      <input name="qty_[% loop.count %]">
62
      <input type="text" name="qty_[% loop.count %]">
66 63
      <select name="unit_[% loop.count %]">
67 64
       [% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
68 65
      </select>
69 66
     </td>
70 67
    </tr>
71

  
72 68
    [% END %]
73

  
74 69
    <input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
75

  
76 70
    <tr><td colspan="7"><hr size="3" noshade></td></tr>
77

  
78 71
   </table>
79
  </p>
80 72
 </form>
templates/webpages/wh/report_filter.html
1
[%- USE T8 %]
2
[%- USE L %]
3
[%- USE P %]
4
[%- USE HTML %][%- USE JavaScript %]
1
[% USE T8 %]
2
[% USE L %]
3
[% USE P %]
4
[% USE HTML %]
5
[% USE JavaScript %]
6

  
5 7
<h1>[% 'Report about warehouse contents' | $T8 %]</h1>
6 8

  
7
 <script type="text/javascript">
8
   <!--
9
      warehouses = new Array();
10
      warehouses[0] = new Array();
11
      warehouses[0]['id'] = "0";
12
      warehouses[0]['bins'] = new Array();
13
      warehouses[0]['bins'][0] = new Array();
14
      warehouses[0]['bins'][0]['description'] = "---";
15
      warehouses[0]['bins'][0]['id'] = "";
16
      [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
17
      warehouses[[% WAREHOUSES_it.count %]] = new Array();
18
      warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %];
19
      warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array();
20
      warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array();
21
      warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---";
22
      warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = "";
23
      [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
9
<script type="text/javascript"><!--
10
  warehouses = new Array();
11
  warehouses[0] = new Array();
12
  warehouses[0]['id'] = "0";
13
  warehouses[0]['bins'] = new Array();
14
  warehouses[0]['bins'][0] = new Array();
15
  warehouses[0]['bins'][0]['description'] = "---";
16
  warehouses[0]['bins'][0]['id'] = "";
17
  [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
18
  [%- FOREACH warehouse = WAREHOUSES_it %]
19
    warehouses[[% WAREHOUSES_it.count %]] = new Array();
20
    warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %];
21
    warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array();
22
    warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array();
23
    warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---";
24
    warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = "";
25
    [% USE BINS_it = Iterator(warehouse.BINS) %]
26
    [% FOREACH bin = BINS_it %]
24 27
      warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
25 28
      warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
26 29
      warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
27
      [% END %]
28
      [% END %]
30
    [% END %]
31
  [% END %]
29 32

  
30
      function warehouse_selected(warehouse_id, bin_id) {
31
        var control = document.getElementById("bin_id");
33
  function warehouse_selected(warehouse_id, bin_id) {
34
    var control = document.getElementById("bin_id");
32 35

  
33
        for (var i = control.options.length - 1; i >= 0; i--) {
34
          control.options[i] = null;
35
        }
36
    for (var i = control.options.length - 1; i >= 0; i--) {
37
      control.options[i] = null;
38
    }
36 39

  
37
        var warehouse_index = 0;
40
    var warehouse_index = 0;
38 41

  
39
        for (i = 0; i < warehouses.length; i++)
40
          if (warehouses[i]['id'] == warehouse_id) {
41
            warehouse_index = i;
42
            break;
43
          }
42
    for (i = 0; i < warehouses.length; i++)
43
      if (warehouses[i]['id'] == warehouse_id) {
44
        warehouse_index = i;
45
        break;
46
      }
44 47

  
45
        var warehouse = warehouses[warehouse_index];
46
        var bin_index = 0;
48
    var warehouse = warehouses[warehouse_index];
49
    var bin_index = 0;
47 50

  
48
        for (i = 0; i < warehouse['bins'].length; i++)
49
          if (warehouse['bins'][i]['id'] == bin_id) {
50
            bin_index = i;
51
            break;
52
          }
51
    for (i = 0; i < warehouse['bins'].length; i++)
52
      if (warehouse['bins'][i]['id'] == bin_id) {
53
        bin_index = i;
54
        break;
55
      }
53 56

  
54
        for (i = 0; i < warehouse['bins'].length; i++) {
55
          control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
56
        }
57
    for (i = 0; i < warehouse['bins'].length; i++) {
58
      control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
59
    }
57 60

  
58 61

  
59
        control.options[bin_index].selected = true;
60
      }
62
    control.options[bin_index].selected = true;
63
  }
64

  
65
  $(function () {
66
    warehouse_selected(0, 0);
67
    document.Form.partnumber.focus();
68
  });
61 69

  
62
      $(function () {
63
        warehouse_selected(0, 0);
64
        document.Form.partnumber.focus();
65
      });
66
     -->
67
 </script>
70
--></script>
68 71

  
69
 <form method="post" name="Form" action="wh.pl" id="form">
72
<form method="post" name="Form" action="wh.pl" id="form">
73
<div class="wrapper">
70 74

  
71
  <input type="hidden" name="nextsub" value="generate_report">
75
<input type="hidden" name="nextsub" value="generate_report">
72 76

  
73
   <table>
77
<table class="tbl-horizontal">
78
  <tbody>
74 79
    <tr>
75
     <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th>
80
      <th>[% 'Warehouse' | $T8 %]:</th>
81
      <td>
82
      <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-normal">
83
        <option value="">---</option>
84
        [% FOREACH warehouse = WAREHOUSES %]
85
        <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
86
        [% END %]
87
      </select>
88
      </td>
76 89
    </tr>
77

  
78 90
    <tr>
79
     <td>
80
      <table>
81
       <tr>
82
        <th align="right" nowrap>[% 'Warehouse' | $T8 %]:</th>
83
        <td>
84
         <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
85
          <option value="">---</option>
86
          [%- FOREACH warehouse = WAREHOUSES %]
87
          <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
88
          [%- END %]
89
         </select>
90
        </td>
91
       </tr>
92
       <tr>
93
        <th align="right" nowrap>[% 'Bin' | $T8 %]:</th>
94
        <td><select name="bin_id" id="bin_id"></select></td>
95
       </tr>
96
       <tr>
97
        <th align="right" nowrap>[% 'Part Number' | $T8 %]:</th>
98
        <td><input name="partnumber" size=20></td>
99
       </tr>
100
       <tr>
101
        <th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th>
102
        <td>[% P.part.select_classification('classification_id') %]</td>
103
       </tr>
104
       <tr>
105
        <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
106
        <td><input name="description" size=40></td>
107
       </tr>
108
       <tr>
109
        <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
110
        <td><input name="chargenumber" size=40></td>
111
       </tr>
112
       [% IF INSTANCE_CONF.get_show_bestbefore %]
113
       <tr>
114
        <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
115
        <td>
116
          [% L.date_tag('bestbefore') %]
117
        </td>
118
       </tr>
119
       [% END %]
120
       <tr>
121
        <th align="right" nowrap>[% 'Qty in stock' | $T8 %]:</th>
122
        <td>
123
         <select name="qty_op">
124
          <option value="dontcare">---</option>
125
          <option value="atleast">[% 'At least' | $T8 %]</option>
126
          <option value="atmost">[% 'At most' | $T8 %]</option>
127
          <option value="exact">[% 'Exact' | $T8 %]</option>
128
         </select>
129
         <input name="qty">
130
         <select name="qty_unit">
131
          [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
132
         </select>
133
        </td>
134
       </tr>
135
       <tr>
136
        <th align="right" nowrap>[% 'Stock Qty for Date' | $T8 %]:</th>
137
        <td>[% L.date_tag('date') %]</td>
138
       </tr>
139
      </table>
140
     </td>
91
      <th>[% 'Bin' | $T8 %]:</th>
92
      <td>
93
      <select name="bin_id" id="bin_id" class="wi-normal">
94
      </select>
95
      </td>
141 96
    </tr>
142

  
143
    <tr height="5"><td>&nbsp;</td></tr>
144

  
145 97
    <tr>
146
     <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
98
      <th>[% 'Part Number' | $T8 %]:</th>
99
      <td><input type="text" name="partnumber" class="wi-normal">
100
      </td>
147 101
    </tr>
148

  
149 102
    <tr>
150
     <td>
151
      <input name="l_partdescription" type="hidden" value="Y">
152
      <input name="l_qty" type="hidden" value="Y">
153

  
154
      <table>
155
       <tr>
156
        <td align="right"><input name="l_warehousedescription" id="l_warehousedescription" class="checkbox" type="checkbox" value="Y" checked></td>
157
        <td nowrap><label for="l_warehousedescription">[% 'Warehouse' | $T8 %]</label></td>
158
        <td align="right"><input name="l_bindescription" id="l_bindescription" class="checkbox" type="checkbox" value="Y" checked></td>
159
        <td nowrap><label for="l_bindescription">[% 'Bin' | $T8 %]</label></td>
160
       </tr>
161

  
162
       <tr>
163
        <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
164
        <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
165
        <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
166
        <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
167
        [% IF INSTANCE_CONF.get_show_bestbefore %]
168
        <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
169
        <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
103
      <th>[% 'Parts Classification' | $T8 %]:</th>
104
      <td>[% P.part.select_classification('classification_id', class='wi-normal') %]</td>
105
    </tr>
106
    <tr>
107
      <th>[% 'Part Description' | $T8 %]:</th>
108
      <td><input type="text" name="description" class="wi-normal">
109
      </td>
110
    </tr>
111
    <tr>
112
      <th>[% 'Charge Number' | $T8 %]:</th>
113
      <td><input type="text" name="chargenumber" class="wi-normal">
114
      </td>
115
    </tr>
116
    [% IF INSTANCE_CONF.get_show_bestbefore %]
117
    <tr>
118
      <th>[% 'Best Before' | $T8 %]:</th>
119
      <td><span class="wi-date">[% L.date_tag('bestbefore') %]</span></td>
120
    </tr>
121
    [% END %]
122
    <tr>
123
      <th>[% 'Qty in stock' | $T8 %]:</th>
124
      <td>
125
      <select name="qty_op" class="wi-normal">
126
        <option value="dontcare">---</option>
127
        <option value="atleast">[% 'At least' | $T8 %]</option>
128
        <option value="atmost">[% 'At most' | $T8 %]</option>
129
        <option value="exact">[% 'Exact' | $T8 %]</option>
130
      </select>
131
      <input type="text" name="qty" class="wi-verysmall">
132
      <select name="qty_unit" class="wi-small">
133
        [% FOREACH unit = UNITS %]
134
          <option>[% unit.name %]</option>
170 135
        [% END %]
171
       </tr>
172

  
173
       <tr><td colspan="4"><hr noshade height="1"></td></tr>
174

  
175
       <tr>
176
        <td align="right"><input name="subtotal" id="subtotal" class="checkbox" type="checkbox" value="Y"></td>
177
        <td nowrap><label for="subtotal">[% 'Subtotal' | $T8 %]</label></td>
178
        <td align="right"><input name="include_empty_bins" id="include_empty_bins" class="checkbox" type="checkbox" value="Y"></td>
179
        <td nowrap><label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label></td>
180
        <td align="right"><input name="include_invalid_warehouses" id="include_invalid_warehouses" class="checkbox" type="checkbox" value="Y"></td>
181
        <td nowrap><label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label></td>
182
       </tr>
183

  
184
       <tr>
185
        <td align="right"><input name="l_stock_value" id="l_stock_value" class="checkbox" type="checkbox" value="Y"></td>
186
        <td nowrap><label for="l_stock_value">[% 'Stock value' | $T8 %]</label></td>
187
        <td align="right"><input name="l_purchase_price" id="l_purchase_price" class="checkbox" type="checkbox" value="Y"></td>
188
        <td nowrap><label for="l_purchase_price">[% 'Purchase price' | $T8 %]</label></td>
189
       </tr>
190

  
191
      </table>
192
     </td>
136
      </select>
137
      </td>
138
    </tr>
139
    <tr>
140
      <th>[% 'Stock Qty for Date' | $T8 %]:</th>
141
      <td><span class="wi-date">[% L.date_tag('date') %]</span></td>
193 142
    </tr>
194
   </table>
195
 </form>
143
  </tbody>
144
</table>
145

  
146
</div><!-- /.wrapper -->
147

  
148
<div class="form-addition control-panel">
149
  <h3>[% 'Include in Report' | $T8 %]</h3>
150
  <input name="l_partdescription" type="hidden" value="Y">
151
  <input name="l_qty" type="hidden" value="Y">
152

  
153
  <div class="list col">
154
    <h4>[% 'Store & Articles' | $T8 %]</h4>
155
    <input name="l_warehousedescription" id="l_warehousedescription" type="checkbox" value="Y" checked>
156
    <label for="l_warehousedescription">[% 'Warehouse' | $T8 %]</label>
157
    <input name="l_bindescription" id="l_bindescription" type="checkbox" value="Y" checked>
158
    <label for="l_bindescription">[% 'Bin' | $T8 %]</label>
159
    <input name="l_partnumber" id="l_partnumber" type="checkbox" value="Y" checked>
160
    <label for="l_partnumber">[% 'Part Number' | $T8 %]</label>
161
    <input name="l_chargenumber" id="l_chargenumber" type="checkbox" value="Y" checked>
162
    <label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label>
163
  </div>
164
  <div class="list col">
165
    <h4>[% 'Options' | $T8 %]</h4>
166
    [% IF INSTANCE_CONF.get_show_bestbefore %] <input name="l_bestbefore" id="l_bestbefore" type="checkbox" value="Y" checked>
167
    <label for="l_bestbefore">[% 'Best Before' | $T8 %]</label>
168
    [% END %] <input name="subtotal" id="subtotal" type="checkbox" value="Y">
169
    <label for="subtotal">[% 'Subtotal' | $T8 %]</label>
170
    <input name="include_empty_bins" id="include_empty_bins" type="checkbox" value="Y">
171
    <label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label>
172
    <input name="include_invalid_warehouses" id="include_invalid_warehouses" type="checkbox" value="Y">
173
    <label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label>
174
  </div>
175
  <div class="list col">
176
    <h4>[% 'Values & Prices' | $T8 %]</h4>
177
    <input name="l_stock_value" id="l_stock_value" type="checkbox" value="Y">
178
    <label for="l_stock_value">[% 'Stock value' | $T8 %]</label>
179
    <input name="l_purchase_price" id="l_purchase_price" type="checkbox" value="Y">
180
    <label for="l_purchase_price">[% 'Purchase price' | $T8 %]</label>
181
  </div>
182
</div>
183
<!-- /.form-addition -->
184

  
185
</form>
templates/webpages/wh/transfer_parts_selection.html
1
[%- USE T8 %]
2
[%- USE HTML %][%- USE JavaScript %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE JavaScript %]
4

  
3 5
<h1>[% title %]</h1>
4 6

  
5
 <script type="text/javascript">
6
  <!--
7
      warehouses = new Array();
8
      [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
9
      warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
10
      [% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
11
      [% END %]
12
      [% END %]
7
<script type="text/javascript"><!--
8
  warehouses = new Array();
9
  [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
10
  [% FOREACH wh = WAREHOUSES_it %]
11
    warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
12
    [% USE BINS_it = Iterator(wh.BINS) %]
13
    [% FOREACH bin = BINS_it %]
14
      warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
15
    [% END %]
16
  [% END %]
13 17

  
14
      function warehouse_selected(row, index) {
15
        var cname = "dst_bin_id_" + row;
16
        var control = document.getElementById(cname);
18
  function warehouse_selected(row, index) {
19
    var cname = "dst_bin_id_" + row;
20
    var control = document.getElementById(cname);
17 21

  
18
        for (var i = control.options.length - 1; i >= 0; i--) {
19
          control.options[i] = null;
20
        }
22
    for (var i = control.options.length - 1; i >= 0; i--) {
23
      control.options[i] = null;
24
    }
21 25

  
22
        for (i = 0; i < warehouses[index].length; i++) {
23
          control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
24
        }
26
    for (i = 0; i < warehouses[index].length; i++) {
27
      control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
28
    }
25 29

  
26
        control.options[0].selected = true;
27
      }
30
    control.options[0].selected = true;
31
  }
28 32

  
29
      $(function() {
30
        [% FOREACH row = CONTENTS %]
31
        warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
32
        [% END %]
33
      });
34
    -->
35
 </script>
33
  $(function() {
34
    [% FOREACH row = CONTENTS %]
35
    warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
36
    [% END %]
37
  });
38
--></script>
36 39

  
37
 <form method="post" action="wh.pl" id="form">
40
<form method="post" action="wh.pl" id="form">
38 41

  
39
  <input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
42
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
40 43

  
41
  <p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
44
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
42 45

  
43
  <p>
44
   <table>
46
<table class="tbl-horizontal">
47
  <tbody>
45 48
    <tr>
46
     <td>[% 'Select type of transfer' | $T8 %]:</td>
47
     <td>
48
      <select name="transfer_type_id">
49
       [%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %]
50
      </select>
51
     </td>
49
      <th>[% 'Select type of transfer' | $T8 %]:</th>
50
      <td>
51
        <select name="transfer_type_id">
52
          [% FOREACH type = TRANSFER_TYPES %]
53
           <option value="[% HTML.escape(type.id) %]">[% type.description %]</option>
54
          [% END %]
55
        </select>
56
      </td>
52 57
    </tr>
53

  
54 58
    <tr>
55
     <td>[% 'Optional comment' | $T8 %]:</td>
56
     <td><input name="comment" size="20"></td>
59
      <th>[% 'Optional comment' | $T8 %]:</th>
60
      <td><input type="text" name="comment" size="20"></td>
57 61
    </tr>
58 62
    <tr>
59
     <td>[% 'Change default bin for this parts' | $T8 %]:</td>
60
    <td><input type="checkbox" name="change_default_bin"<td>
63
      <td>[% 'Change default bin for this parts' | $T8 %]:</th>
64
      <td><input type="checkbox" name="change_default_bin"><td>
61 65
    </tr>
62
   </table>
63
  </p>
66
  </tbody>
67
</table>
64 68

  
65
  <p>
66
   <table>
69
<table class="tbl-list">
70
  <thead>
67 71
    <tr>
68
     <th class="listheading">[% 'Source bin' | $T8 %]</th>
69
     <th class="listheading">[% 'Part Number' | $T8 %]</th>
70
     <th class="listheading">[% 'Part Description' | $T8 %]</th>
71
     <th class="listheading">[% 'Charge Number' | $T8 %]</th>
72
     [% IF INSTANCE_CONF.get_show_bestbefore %]
73
     <th class="listheading">[% 'Best Before' | $T8 %]</th>
74
     [% END %]
75
     <th class="listheading">[% 'EAN' | $T8 %]</th>
76
     <th class="listheading">[% 'Available qty' | $T8 %]</th>
77
     <th class="listheading" colspan="2">[% 'Transfer qty' | $T8 %]</th>
78
     <th class="listheading" colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
72
      <th>[% 'Source bin' | $T8 %]</th>
73
      <th>[% 'Part Number' | $T8 %]</th>
74
      <th>[% 'Part Description' | $T8 %]</th>
75
      <th>[% 'Charge Number' | $T8 %]</th>
76
      [% IF INSTANCE_CONF.get_show_bestbefore %]
77
      <th>[% 'Best Before' | $T8 %]</th>
78
      [% END %]
79
      <th>[% 'EAN' | $T8 %]</th>
80
      <th>[% 'Available qty' | $T8 %]</th>
81
      <th colspan="2">[% 'Transfer qty' | $T8 %]</th>
82
      <th colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
79 83
    </tr>
80

  
84
  </thead>
85
  <tbody>
81 86
    [% FOREACH row = CONTENTS %]
82
    <tr class="listrow[% loop.count % 2 %]">
83
     <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
84
     <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
85
     <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
86
     <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
87
     <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
88
     [% IF INSTANCE_CONF.get_show_bestbefore %]
89
     <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
90
     [% END %]
91
     <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
92
     <td>[% HTML.escape(row.bindescription) %]</td>
93
     <td>[% HTML.escape(row.partnumber) %]</td>
94
     <td>[% HTML.escape(row.partdescription) %]</td>
95
     <td>[% HTML.escape(row.chargenumber) %]</td>
96
     [% IF INSTANCE_CONF.get_show_bestbefore %]
97
     <td>[% HTML.escape(row.bestbefore) %]</td>
98
     [% END %]
99
     <td>[% HTML.escape(row.ean) %]</td>
100
     <td>[% HTML.escape(row.qty) %]</td>
101
     <td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
102
     <td>
103
      <select name="unit_[% loop.count %]">
104
       [% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
105
      </select>
106
     </td>
107

  
108
     <td>
109
      <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
110
       [% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %]
111
      </select>
112
     </td>
113
     <td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td>
114
    </tr>
115

  
87
      <tr>
88
        <td>
89
          <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
90
          <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
91
          <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
92
          <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
93
          <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
94
          [% IF INSTANCE_CONF.get_show_bestbefore %]
95
            <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
96
          [% END %]
97
          <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
98
          [% HTML.escape(row.bindescription) %]
99
        </td>
100
        <td>[% HTML.escape(row.partnumber) %]</td>
101
        <td>[% HTML.escape(row.partdescription) %]</td>
102
        <td>[% HTML.escape(row.chargenumber) %]</td>
103
        [% IF INSTANCE_CONF.get_show_bestbefore %]
104
          <td>[% HTML.escape(row.bestbefore) %]</td>
105
        [% END %]
106
        <td>[% HTML.escape(row.ean) %]</td>
107
        <td>[% HTML.escape(row.qty) %]</td>
108
        <td><input type="text" name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
109
        <td>
110
          <select name="unit_[% loop.count %]">
111
            [% FOREACH unit = row.UNITS %]
112
              <option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
113
            [% END %]
114
          </select>
115
        </td>
116
        <td>
117
          <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
118
            [% FOREACH wh = WAREHOUSES %]
119
              <option value="[% HTML.escape(wh.id) %]" [% if wh.selected %] selected[% end %]>[% HTML.escape(wh.description) %]</option>
120
            [% END %]
121
          </select>
122
        </td>
123
        <td>
124
          <select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select>
125
        </td>
126
      </tr>
116 127
    [% END %]
128
  </tbody>
129
</table>
117 130

  
118
    <input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
131
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
119 132

  
120
   </table>
121
  </p>
122
 </form>
133
</form>
templates/webpages/wh/warehouse_selection.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE L %]
4
[%- USE JavaScript %][%- USE P -%]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE L %]
4
[% USE JavaScript %]
5
[% USE P %]
6

  
5 7
<h1>[% title %]</h1>
6 8

  
7
 <script type="text/javascript">
8
   <!--
9
      warehouses = new Array();
10
      [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
11
      warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
12
      warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
13
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
14
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0] = new Array();
15
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['description'] = "---";
16
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['id'] = "";
17
      [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
9
<script type="text/javascript"><!--
10
  warehouses = new Array();
11
  [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
12
  [% FOREACH warehouse = WAREHOUSES_it %]
13
    warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
14
    warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
15
    warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
16
    warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0] = new Array();
17
    warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['description'] = "---";
18
    warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['id'] = "";
19
    [% USE BINS_it = Iterator(warehouse.BINS) %]
20
    [% FOREACH bin = BINS_it %]
18 21
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]] = new Array();
19 22
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
20 23
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
21
      [% END %]
22
      [% END %]
24
    [% END %]
25
  [% END %]
23 26

  
24
      function warehouse_selected(warehouse_id, bin_id) {
25
        var control = document.getElementById("bin_id");
27
  function warehouse_selected(warehouse_id, bin_id) {
28
    var control = document.getElementById("bin_id");
26 29

  
27
        for (var i = control.options.length - 1; i >= 0; i--) {
28
          control.options[i] = null;
29
        }
30
    for (var i = control.options.length - 1; i >= 0; i--) {
31
      control.options[i] = null;
32
    }
30 33

  
31
        var warehouse_index = 0;
34
    var warehouse_index = 0;
32 35

  
33
        for (i = 0; i < warehouses.length; i++)
34
          if (warehouses[i]['id'] == warehouse_id) {
35
            warehouse_index = i;
36
            break;
37
          }
36
    for (i = 0; i < warehouses.length; i++)
37
      if (warehouses[i]['id'] == warehouse_id) {
38
        warehouse_index = i;
39
        break;
40
      }
38 41

  
39
        var warehouse = warehouses[warehouse_index];
40
        var bin_index = 0;
42
    var warehouse = warehouses[warehouse_index];
43
    var bin_index = 0;
41 44

  
42
        for (i = 0; i < warehouse['bins'].length; i++)
43
          if (warehouse['bins'][i]['id'] == bin_id) {
44
            bin_index = i;
45
            break;
46
          }
45
    for (i = 0; i < warehouse['bins'].length; i++)
46
      if (warehouse['bins'][i]['id'] == bin_id) {
47
        bin_index = i;
48
        break;
49
      }
47 50

  
48
        for (i = 0; i < warehouse['bins'].length; i++) {
49
          control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
50
        }
51
    for (i = 0; i < warehouse['bins'].length; i++) {
52
      control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
53
    }
51 54

  
52 55

  
53
        control.options[bin_index].selected = true;
54
      }
56
    control.options[bin_index].selected = true;
57
  }
55 58

  
56
      $(function() {
57
        warehouse_selected(0, 0);
58
        document.Form.partnumber.focus();
59
      });
60
     -->
61
 </script>
59
  $(function() {
60
    warehouse_selected(0, 0);
61
    document.Form.partnumber.focus();
62
  });
63
--></script>
62 64

  
63
 <form name="Form" method="post" action="wh.pl" id="form">
65
<form name="Form" method="post" action="wh.pl" id="form">
66
<div class="wrapper">
64 67

  
65
  [% IF saved_message %]
68
[% IF saved_message %]
66 69
  <p>[% saved_message %]</p>
67
  [% END %]
70
[% END %]
68 71

  
69
  <p>
70
   [% 'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' | $T8 %]
71
  </p>
72
<p>[% 'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' | $T8 %]</p>
72 73

  
73
  <p>
74
   <table>
74
<table class="tbl-horizontal">
75
  <tbody>
75 76
    <tr>
76
     <th align="right" nowrap>[% 'Transfer from warehouse' | $T8 %]:</th>
77
     <td>
78
      <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
79
       [%- FOREACH warehouse = WAREHOUSES %]
80
       <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
81
       [%- END %]
82
      </select>
83
     </td>
77
      <th>[% 'Transfer from warehouse' | $T8 %]</th>
78
      <td>
79
        <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-lightwide">
80
          [% FOREACH warehouse = WAREHOUSES %]
81
          <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
82
          [% END %]
83
        </select>
84
      </td>
84 85
    </tr>
85

  
86 86
    <tr>
87
     <th align="right" nowrap>[% 'Bin' | $T8 %]:</th>
88
     <td><select id="bin_id" name="bin_id"></select></td>
87
      <th>[% 'Bin' | $T8 %]</th>
88
      <td>
89
        <select id="bin_id" name="bin_id" class="wi-lightwide"></select>
90
      </td>
89 91
    </tr>
90

  
91 92
    <tr>
92
     <th align="right" nowrap>[% 'Limit part selection' | $T8 %]:</th>
93
     <td></td>
93
      <th>[% 'Limit part selection' | $T8 %]</th>
94
      <td><span class="plain-data">&nbsp;</span></td>
94 95
    </tr>
95

  
96 96
    <tr>
97
     <th align="right" nowrap>[% 'Part' | $T8 %]</th>
98
     <td>
99
      [% P.part.picker("part_id", '', size="30", part_type="part,assembly") %]
100
     </td>
97
      <th>[% 'Part' | $T8 %]</th>
98
      <td>[% P.part.picker("part_id", '', part_type="part,assembly", class="wi-lightwide") %]</td>
101 99
    </tr>
102

  
103 100
    <tr>
104
     <th align="right" nowrap>[% 'Charge number' | $T8 %]</th>
105
     <td><input name="chargenumber" size="30"></td>
101
      <th>[% 'Charge number' | $T8 %]</th>
102
      <td><input type="text" name="chargenumber" class="wi-lightwide"></td>
106 103
    </tr>
107

  
108 104
    [% IF INSTANCE_CONF.get_show_bestbefore %]
109
    <tr>
110
     <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
111
     <td>
112
       [% L.date_tag('bestbefore') %]
113
     </td>
114
    </tr>
105
      <tr>
106
        <th>[% 'Best Before' | $T8 %]</th>
107
        <td><span class="wi-date">[% L.date_tag('bestbefore') %]</span></td>
108
      </tr>
115 109
    [% END %]
116

  
117 110
    <tr>
118
     <th align="right" nowrap>[% 'EAN' | $T8 %]</th>
119
     <td><input name="ean" size="30"></td>
111
      <th>[% 'EAN' | $T8 %]</th>
112
      <td><input type="text" name="ean" class="wi-lightwide"></td>
120 113
    </tr>
121
   </table>
122
  </p>
123
 </form>
114
  </tbody>
115
</table>
116

  
117
</div><!-- /.wrapper -->
118
</form>
templates/webpages/wh/warehouse_selection_assembly.html
1
[%- USE T8 %]
2
[%- USE L %]
3
[%- USE HTML %][%- USE JavaScript %][%- USE LxERP %][%- USE P -%]
1
[% USE T8 %]
2
[% USE L %]
3
[% USE HTML %]
4
[% USE JavaScript %]
5
[% USE LxERP %]
6
[% USE P %]
7

  
4 8
<h1>[% title %]</h1>
5 9

  
6
 <script type="text/javascript">
7
  <!--
8
      warehouses = new Array();
9
      [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
10
      warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
11
      warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
12
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
13
      [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
10
<script type="text/javascript"><!--
11
  warehouses = new Array();
12
  [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
13
  [% FOREACH warehouse = WAREHOUSES_it %]
14
    warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
15
    warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
16
    warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
17
    [% USE BINS_it = Iterator(warehouse.BINS) %]
18
    [% FOREACH bin = BINS_it %]
14 19
      warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]] = new Array();
15 20
      warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['description'] = "[% JavaScript.escape(bin.description) %]";
16 21
      warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['id'] = [% bin.id %];
17
      [% END %]
18
      [% END %]
22
    [% END %]
23
  [% END %]
19 24

  
20
      function warehouse_selected(warehouse_id, bin_id) {
21
        var control = document.getElementById("bin_id");
25
  function warehouse_selected(warehouse_id, bin_id) {
26
    var control = document.getElementById("bin_id");
22 27

  
23
        for (var i = control.options.length - 1; i >= 0; i--) {
24
          control.options[i] = null;
25
        }
28
    for (var i = control.options.length - 1; i >= 0; i--) {
29
      control.options[i] = null;
30
    }
26 31

  
27
        var warehouse_index = 0;
32
    var warehouse_index = 0;
28 33

  
29
        for (i = 0; i < warehouses.length; i++)
30
          if (warehouses[i]['id'] == warehouse_id) {
31
            warehouse_index = i;
32
            break;
33
          }
34
    for (i = 0; i < warehouses.length; i++)
35
      if (warehouses[i]['id'] == warehouse_id) {
36
        warehouse_index = i;
37
        break;
38
      }
34 39

  
35
        var warehouse = warehouses[warehouse_index];
36
        var bin_index = 0;
40
    var warehouse = warehouses[warehouse_index];
41
    var bin_index = 0;
37 42

  
38
        for (i = 0; i < warehouse['bins'].length; i++)
39
          if (warehouse['bins'][i]['id'] == bin_id) {
40
            bin_index = i;
41
            break;
42
          }
43
    for (i = 0; i < warehouse['bins'].length; i++)
44
      if (warehouse['bins'][i]['id'] == bin_id) {
45
        bin_index = i;
46
        break;
47
      }
43 48

  
44
        for (i = 0; i < warehouse['bins'].length; i++) {
45
          control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
46
        }
49
    for (i = 0; i < warehouse['bins'].length; i++) {
50
      control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
51
    }
47 52

  
48 53

  
49
        control.options[bin_index].selected = true;
50
      }
54
    control.options[bin_index].selected = true;
55
  }
51 56

  
52
      $(function() {
53
        warehouse_selected([% warehouse_id %], [% bin_id %]);
54
      })
55
    -->
56
 </script>
57
  $(function() {
58
    warehouse_selected([% warehouse_id %], [% bin_id %]);
59
  })
60
--></script>
57 61

  
58
 <form name="Form" method="post" action="wh.pl" id="form">
62
<form name="Form" method="post" action="wh.pl" id="form">
63
<div class="wrapper">
59 64

  
60
  [% IF saved_message %]
65
[% IF saved_message %]
61 66
  <p>[% saved_message %]</p>
62
  [% END %]
67
[% END %]
63 68

  
64
  <p>
65
   <table>
66
    <tr>
67
     <th align="right" nowrap>[% 'Assembly' | $T8 %]</th>
68
     <td>
69
      [% P.part.picker("parts_id", parts_id, part_type="assembly", class="initial_focus", fat_set_item="1") %]
70
     </td>
71
    </tr>
72 69

  
70
<table class="tbl-horizontal">
71
  <tbody>
73 72
    <tr>
74
     <th align="right" nowrap>[% 'Destination warehouse' | $T8 %]</th>
75
     <td>
76
      <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
77
       [%- FOREACH warehouse = WAREHOUSES %]
78
       <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
79
       [%- END %]
80
      </select>
81
     </td>
73
      <th>[% 'Assembly' | $T8 %]</th>
74
      <td>[% P.part.picker("parts_id", parts_id, part_type="assembly", class="initial_focus", fat_set_item="1", class="wi-lightwide") %] </td>
82 75
    </tr>
83

  
84 76
    <tr>
85
     <th align="right" nowrap>[% 'Destination bin' | $T8 %]:</th>
86
     <td><select id="bin_id" name="bin_id"></select></td>
77
      <th>[% 'Destination warehouse' | $T8 %]</th>
78
      <td>
79
        <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-lightwide">
80
          [% FOREACH warehouse = WAREHOUSES %]
81
            <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
82
          [% END %]
83
        </select>
84
      </td>
87 85
    </tr>
88

  
89 86
    <tr>
90
     <th align="right" nowrap>[% 'Charge number' | $T8 %]</th>
91
     <td><input name="chargenumber" size="30" value="[% HTML.escape(chargenumber) %]"></td>
87
      <th>[% 'Destination bin' | $T8 %]</th>
88
      <td><select id="bin_id" name="bin_id" class="wi-lightwide"></select></td>
92 89
    </tr>
93

  
94
    [% IF INSTANCE_CONF.get_show_bestbefore %]
95 90
    <tr>
96
     <th align="right" nowrap>[% 'Best Before' | $T8 %]</th>
97
     <td>
98
      [% L.date_tag('bestbefore', bestbefore) %]
99
     </td>
91
      <th>[% 'Charge number' | $T8 %]</th>
92
      <td><input type="text" name="chargenumber" class="wi-lightwide" value="[% HTML.escape(chargenumber) %]"></td>
100 93
    </tr>
94
    [% IF INSTANCE_CONF.get_show_bestbefore %]
95
      <tr>
96
        <th>[% 'Best Before' | $T8 %]</th>
97
        <td><span class="wi-date">[% L.date_tag('bestbefore', bestbefore) %]</span> </td>
98
      </tr>
101 99
    [% END %]
102

  
103 100
    <tr>
104
     <th align="right" nowrap>[% 'Quantity' | $T8 %]</th>
105
     <td>
106
      <input name="qty" size="10" value="[% HTML.escape(LxERP.format_amount(qty)) %]">
107
      <select name="unit">
108
       [%- FOREACH unit = UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
109
      </select>
110
     </td>
101
      <th>[% 'Quantity' | $T8 %]</th>
102
      <td>
103
        <input type="text" name="qty" class="wi-verysmall" value="[% HTML.escape(LxERP.format_amount(qty)) %]">
104
        <select name="unit" class="wi-small">
105
          [% FOREACH unit = UNITS %]
106
            <option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
107
          [% END %]
108
        </select>
... Dieser Diff wurde abgeschnitten, weil er die maximale Anzahl anzuzeigender Zeilen überschreitet.

Auch abrufbar als: Unified diff