Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2a4980a8

Von Sven Schöling vor fast 17 Jahren hinzugefügt

  • ID 2a4980a82c334d9836da4c990a6ce3f5fb61ebb9
  • Vorgänger 8b797f8b
  • Nachfolger ae7dfc51

Waren/Dienstleistungen/Erzeugnisse Suche auf Template umgestellt

Unterschiede anzeigen:

bin/mozilla/ic.pl
75 75
sub search {
76 76
  $lxdebug->enter_sub();
77 77

  
78
  my ($button1, $button2, $onhand, $makemodel, $serialnumber, $l_serialnumber, $toplevel, $bought);
79

  
80
  $form->{title} = (ucfirst $form->{searchitems}) . "s";
81
  $form->{title} = $locale->text($form->{title});
82

  
83 78
  # switch for backward sorting
84 79
  $form->{revers} = 0;
85 80

  
......
92 87
  # $locale->text('Parts')
93 88
  # $locale->text('Services')
94 89

  
95
  # use JavaScript Calendar or not
96
  $form->{jsscript} = 1;
97
  my $jsscript = "";
98
  if ($form->{jsscript}) {
99

  
100
    # with JavaScript Calendar
101
    $button1 = qq|
102
       <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>
103
       <td><input type=button name=transdatefrom id="trigger1" value=|
104
      . $locale->text('button') . qq|></td>
105
      |;
106
    $button2 = qq|
107
       <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>
108
       <td><input type=button name=transdateto name=transdateto id="trigger2" value=|
109
      . $locale->text('button') . qq|></td>
110
     |;
111

  
112
    #write Trigger
113
    $jsscript = Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1", "transdateto", "BL", "trigger2");
114
  } else {
115

  
116
    # without JavaScript Calendar
117
    $button1 = qq| <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
118
    $button2 = qq| <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
119
  }
120

  
121
  unless ($form->{searchitems} eq 'service') {
122

  
123
    $onhand = qq| <input name=itemstatus class=radio type=radio value=onhand>&nbsp;| . $locale->text('On Hand') . qq|
124
                  <input name=itemstatus class=radio type=radio value=short>&nbsp;| . $locale->text('Short') . qq|
125
|;
126

  
127
    $makemodel = qq|
128
        <tr>
129
          <th align=right nowrap>| . $locale->text('Make') . qq|</th> <td><input name=make size=20></td>
130
          <th align=right nowrap>| . $locale->text('Model') . qq|</th> <td><input name=model size=20></td>
131
        </tr>
132
|;
133

  
134
    $serialnumber = qq|
135
          <th align=right nowrap>| . $locale->text('Serial Number') . qq|</th> <td><input name=serialnumber size=20></td>
136
|;
90
  my $is_service  = $form->{searchitems} eq 'service';
91
  my $is_assembly = $form->{searchitems} eq 'assembly';
137 92

  
138
    $l_serialnumber = qq|
139
        <td><input name=l_serialnumber class=checkbox type=checkbox value=Y>&nbsp;| . $locale->text('Serial Number') . qq|</td>
140
|;
141

  
142
  }
143

  
144
  if ($form->{searchitems} eq 'assembly') {
145

  
146
    $form->{title} = $locale->text('Assemblies');
147

  
148
    $toplevel = qq|
149
        <tr>
150
	  <td></td>
151
          <td colspan=3>
152
	  <input name=null class=radio type=radio value=1 checked>&nbsp;|
153
      . $locale->text('Top Level') . qq|
154
	  <input name=bom class=checkbox type=checkbox value=1>&nbsp;|
155
      . $locale->text('Individual Items') . qq|
156
          </td>
157
        </tr>
158
|;
159

  
160
    $bought = qq|
161
	<tr>
162
	  <td></td>
163
	  <td colspan=3>
164
	    <table>
165
	      <tr>
166
	        <td>
167
		  <table>
168
		    <tr>
169
		      <td><input name=sold class=checkbox type=checkbox value=1></td>
170
		      <td nowrap>| . $locale->text('Sold') . qq|</td>
171
		    </tr>
172
		    <tr>
173
		      <td colspan=2><hr size=1 noshade></td>
174
		    </tr>
175
		    <tr>
176
		      <td><input name=ordered class=checkbox type=checkbox value=1></td>
177
		      <td nowrap>| . $locale->text('Ordered') . qq|</td>
178
		    </tr>
179
		    <tr>
180
		      <td colspan=4><hr size=1 noshade></td>
181
		    </tr>
182
		    <tr>
183
		      <td><input name=quoted class=checkbox type=checkbox value=1></td>
184
		      <td nowrap>| . $locale->text('Quoted') . qq|</td>
185
		    </tr>
186
		  </table>
187
		</td>
188
		<td width=5%>&nbsp;</td>
189
		<th>| . $locale->text('From') . qq|</th>
190
                $button1
191
		<th>| . $locale->text('To (time)') . qq|</th>
192
                $button2
193
	      </tr>
194
	    </table>
195
	  </td>
196
	</tr>
197
|;
198

  
199
  } else {
93
  $form->{title} = (ucfirst $form->{searchitems}) . "s";
94
  $form->{title} = $locale->text($form->{title});
95
  $form->{title} = $locale->text('Assemblies') if $is_assembly;
200 96

  
201
    $bought = qq|
202
        <tr>
203
          <td></td>
204
          <td colspan=3>
205
	    <table>
206
	      <tr>
207
	        <td>
208
		  <table>
209
		    <tr>
210
		      <td><input name=bought class=checkbox type=checkbox value=1></td>
211
		      <td nowrap>| . $locale->text('Bought') . qq|</td>
212
		      <td><input name=sold class=checkbox type=checkbox value=1></td>
213
		      <td nowrap>| . $locale->text('Sold') . qq|</td>
214
		    </tr>
215
		    <tr>
216
		      <td colspan=4><hr size=1 noshade></td>
217
		    </tr>
218
		    <tr>
219
		      <td><input name=onorder class=checkbox type=checkbox value=1></td>
220
		      <td nowrap>| . $locale->text('On Order') . qq|</td>
221
		      <td><input name=ordered class=checkbox type=checkbox value=1></td>
222
		      <td nowrap>| . $locale->text('Ordered') . qq|</td>
223
		    </tr>
224
		    <tr>
225
		      <td colspan=4><hr size=1 noshade></td>
226
		    </tr>
227
		    <tr>
228
		      <td><input name=rfq class=checkbox type=checkbox value=1></td>
229
		      <td nowrap>| . $locale->text('RFQ') . qq|</td>
230
		      <td><input name=quoted class=checkbox type=checkbox value=1></td>
231
		      <td nowrap>| . $locale->text('Quoted') . qq|</td>
232
		    </tr>
233
		  </table>
234
		</td>
235
		<td width=5%>&nbsp;</td>
236
		<td>
237
		  <table>
238
		    <tr>
239
		      <th>| . $locale->text('From') . qq|</th>
240
		      $button1
241
		      <th>| . $locale->text('To (time)') . qq|</th>
242
		      $button2
243
		    </tr>
244
		  </table>
245
		</td>
246
	      </tr>
247
	    </table>
248
	  </td>
249
	</tr>
250
|;
251
  }
97
  $form->{jsscript} = 1;
252 98

  
253 99
  $form->header;
254 100

  
255
  print qq|
256
<body>
257

  
258
<form method=post action=$form->{script}>
259

  
260
<input type=hidden name=searchitems value=$form->{searchitems}>
261
<input type=hidden name=title value="$form->{title}">
101
  print $form->parse_html_template('ic/search', { is_assembly => $is_assembly, is_service => $is_service, dateformat => $myconfig{dateformat} });
262 102

  
263
<input type=hidden name=revers value="$form->{revers}">
264
<input type=hidden name=lastsort value="$form->{lastsort}">
265

  
266
<table width="100%">
267
  <tr><th class=listtop>$form->{title}</th></tr>
268
  <tr height="5"></tr>
269
  <tr valign=top>
270
    <td>
271
      <table>
272
        <tr>
273
          <th align=right nowrap>| . $locale->text('Part Number') . qq|</th>
274
          <td><input name=partnumber size=20></td>
275
          <th align=right nowrap>| . $locale->text('EAN') . qq|</th>
276
          <td><input name=ean size=20></td>
277
        </tr>
278
        <tr>
279
          <th align=right nowrap>|
280
    . $locale->text('Part Description') . qq|</th>
281
          <td colspan=3><input name=description size=40></td>
282
        </tr>
283
	<tr>
284
          <th align=right nowrap>| . $locale->text('Group') . qq|</th>
285
          <td><input name=partsgroup size=20></td>
286
	  $serialnumber
287
	</tr>
288
	$makemodel
289
        <tr>
290
          <th align=right nowrap>| . $locale->text('Drawing') . qq|</th>
291
          <td><input name=drawing size=20></td>
292
          <th align=right nowrap>| . $locale->text('Microfiche') . qq|</th>
293
          <td><input name=microfiche size=20></td>
294
        </tr>
295
	$toplevel
296
        <tr>
297
          <td></td>
298
          <td colspan=3>
299
            <input name=itemstatus class=radio type=radio value=active checked>&nbsp;|
300
    . $locale->text('Active') . qq|
301
	    $onhand
302
            <input name=itemstatus class=radio type=radio value=obsolete>&nbsp;|
303
    . $locale->text('Obsolete') . qq|
304
            <input name=itemstatus class=radio type=radio value=orphaned>&nbsp;|
305
    . $locale->text('Orphaned') . qq|
306
	  </td>
307
	</tr>
308
	$bought
309
        <tr>
310
	  <td></td>
311
          <td colspan=3>
312
	    <hr size=1 noshade>
313
	  </td>
314
	</tr>
315
	<tr>
316
          <th align=right nowrap>|
317
    . $locale->text('Include in Report') . qq|</th>
318
          <td colspan=3>
319
            <table>
320
              <tr>
321
                <td><input name=l_partnumber class=checkbox type=checkbox value=Y checked>&nbsp;|
322
    . $locale->text('Part Number') . qq|</td>
323
		<td><input name=l_description class=checkbox type=checkbox value=Y checked>&nbsp;|
324
    . $locale->text('Part Description') . qq|</td>
325
		$l_serialnumber
326
		<td><input name=l_unit class=checkbox type=checkbox value=Y checked>&nbsp;|
327
    . $locale->text('Unit of measure') . qq|</td>
328
	      </tr>
329
	      <tr>
330
                <td><input name=l_listprice class=checkbox type=checkbox value=Y>&nbsp;|
331
    . $locale->text('List Price') . qq|</td>
332
		<td><input name=l_sellprice class=checkbox type=checkbox value=Y checked>&nbsp;|
333
    . $locale->text('Sell Price') . qq|</td>
334
		<td><input name=l_lastcost class=checkbox type=checkbox value=Y checked>&nbsp;|
335
    . $locale->text('Last Cost') . qq|</td>
336
		<td><input name=l_linetotal class=checkbox type=checkbox value=Y checked>&nbsp;|
337
    . $locale->text('Line Total') . qq|</td>
338
	      </tr>
339
	      <tr>
340
                <td><input name=l_priceupdate class=checkbox type=checkbox value=Y>&nbsp;|
341
    . $locale->text('Updated') . qq|</td>
342
		<td><input name=l_bin class=checkbox type=checkbox value=Y>&nbsp;|
343
    . $locale->text('Bin') . qq|</td>
344
		<td><input name=l_rop class=checkbox type=checkbox value=Y>&nbsp;|
345
    . $locale->text('ROP') . qq|</td>
346
		<td><input name=l_weight class=checkbox type=checkbox value=Y>&nbsp;|
347
    . $locale->text('Weight') . qq|</td>
348
              </tr>
349
	      <tr>
350
                <td><input name=l_image class=checkbox type=checkbox value=Y>&nbsp;|
351
    . $locale->text('Image') . qq|</td>
352
		<td><input name=l_drawing class=checkbox type=checkbox value=Y>&nbsp;|
353
    . $locale->text('Drawing') . qq|</td>
354
		<td><input name=l_microfiche class=checkbox type=checkbox value=Y>&nbsp;|
355
    . $locale->text('Microfiche') . qq|</td>
356
		<td><input name=l_partsgroup class=checkbox type=checkbox value=Y>&nbsp;|
357
    . $locale->text('Group') . qq|</td>
358
              </tr>
359
	      <tr>
360
                <td><input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
361
    . $locale->text('Subtotal') . qq|</td>
362
		<td><input name=l_soldtotal class=checkbox type=checkbox value=Y>&nbsp;|
363
    . $locale->text('soldtotal') . qq|</td>
364
		<td><input name=l_deliverydate class=checkbox type=checkbox value=Y>&nbsp;|
365
    . $locale->text('deliverydate') . qq|</td>    
366
	      </tr>
367
            </table>
368
          </td>
369
        </tr>
370
      </table>
371
    </td>
372
  </tr>
373
  <tr><td colspan=4><hr size=3 noshade></td></tr>
374
</table>
375

  
376
$jsscript
377

  
378
<input type=hidden name=nextsub value=generate_report>
379

  
380
<input type=hidden name=login value=$form->{login}>
381
<input type=hidden name=password value=$form->{password}>
382

  
383
<input type=hidden name=revers value="$form->{revers}">
384
<input type=hidden name=lastsort value="$form->{lastsort}">
385
<input type=hidden name=sort value="description">
386

  
387
<input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">
388

  
389
<br>
390
<input class=submit type=submit name=action value="|
391
    . $locale->text('Continue') . qq|">
392
<input class=submit type=submit name=action value="|
393
    . $locale->text('TOP100') . qq|">
394
</form>
395

  
396
</body>
397
</html>
398
|;
399 103
  $lxdebug->leave_sub();
400 104
}    #end search()
401 105

  

Auch abrufbar als: Unified diff