Revision 1a500c31
Von Sven Schöling vor mehr als 16 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
154 | 154 |
$lxdebug->leave_sub(); |
155 | 155 |
} |
156 | 156 |
|
157 |
sub choice { |
|
158 |
$lxdebug->enter_sub(); |
|
159 |
|
|
160 |
$auth->assert('part_service_assembly_edit'); |
|
161 |
|
|
162 |
our ($j, $lastndx); |
|
163 |
my ($totop100); |
|
164 |
|
|
165 |
$form->{title} = $locale->text('Top 100 hinzufuegen'); |
|
166 |
|
|
167 |
$form->header; |
|
168 |
|
|
169 |
push @custom_hiddens, qw(searchitems title bom titel revers lastsort sort ndxs_counter extras); |
|
170 |
push @custom_hiddens, qw(itemstatus l_linetotal l_partnumber l_description l_onhand l_unit l_sellprice l_linetotalsellprice); |
|
171 |
my @HIDDENS = ( |
|
172 |
+{ name => 'row', value => $j }, |
|
173 |
+{ name => 'nextsub', value => 'item_selected' }, |
|
174 |
+{ name => 'test', value => 'item_selected' }, |
|
175 |
+{ name => 'lastndx', value => $lastndx }, |
|
176 |
map(+{ name => $_, value => $form->{$_} }, @custom_hiddens), |
|
177 |
); |
|
178 |
|
|
179 |
my ($partnumber, $description, $unit, $sellprice, $soldtotal); |
|
180 |
# if choice set data |
|
181 |
# if ($form->{ndx}) { |
|
182 |
# for my $i (0 .. $form->{ndxs_counter}) { |
|
157 |
#sub choice { |
|
158 |
# $lxdebug->enter_sub(); |
|
183 | 159 |
# |
184 |
# # insert data into top100 |
|
185 |
# push @{ $form->{parts} }, |
|
186 |
# { number => "", |
|
187 |
# partnumber => $form->{"totop100_partnumber_$j"}, |
|
188 |
# description => $form->{"totop100_description_$j"}, |
|
189 |
# unit => $form->{"totop100_unit_$j"}, |
|
190 |
# sellprice => $form->{"totop100_sellprice_$j"}, |
|
191 |
# soldtotal => $form->{"totop100_soldtotal_$j"}, |
|
192 |
# }; |
|
193 |
# } #rof |
|
194 |
# } #fi |
|
195 |
|
|
196 |
$totop100 = ""; |
|
197 |
|
|
198 |
# set data for next page |
|
199 |
for my $i (1 .. $form->{ndxs_counter}) { |
|
200 |
$partnumber = $form->{"totop100_partnumber_$i"}; |
|
201 |
$description = $form->{"totop100_description_$i"}; |
|
202 |
$unit = $form->{"totop100_unit_$i"}; |
|
203 |
$sellprice = $form->{"totop100_sellprice_$i"}; |
|
204 |
$soldtotal = $form->{"totop100_soldtotal_$i"}; |
|
205 |
|
|
206 |
push @PARTS, { |
|
207 |
totop100_partnumber => $form->{"totop100_partnumber_$i"}, |
|
208 |
totop100_description => $form->{"totop100_description_$i"}, |
|
209 |
totop100_unit => $form->{"totop100_unit_$i"}, |
|
210 |
totop100_sellprice => $form->{"totop100_sellprice_$i"}, |
|
211 |
totop100_soldtotal => $form->{"totop100_soldtotal_$i"}, |
|
212 |
} |
|
160 |
# $auth->assert('part_service_assembly_edit'); |
|
161 |
# |
|
162 |
# our ($j, $lastndx); |
|
163 |
# my ($totop100); |
|
164 |
# |
|
165 |
# $form->{title} = $locale->text('Top 100 hinzufuegen'); |
|
166 |
# |
|
167 |
# $form->header; |
|
168 |
# |
|
169 |
# push @custom_hiddens, qw(searchitems title bom titel revers lastsort sort ndxs_counter extras); |
|
170 |
# push @custom_hiddens, qw(itemstatus l_linetotal l_partnumber l_description l_onhand l_unit l_sellprice l_linetotalsellprice); |
|
171 |
# my @HIDDENS = ( |
|
172 |
# +{ name => 'row', value => $j }, |
|
173 |
# +{ name => 'nextsub', value => 'item_selected' }, |
|
174 |
# +{ name => 'test', value => 'item_selected' }, |
|
175 |
# +{ name => 'lastndx', value => $lastndx }, |
|
176 |
# map(+{ name => $_, value => $form->{$_} }, @custom_hiddens), |
|
177 |
# ); |
|
178 |
# |
|
179 |
# my ($partnumber, $description, $unit, $sellprice, $soldtotal); |
|
180 |
# # if choice set data |
|
181 |
## if ($form->{ndx}) { |
|
182 |
## for my $i (0 .. $form->{ndxs_counter}) { |
|
183 |
## |
|
184 |
## # insert data into top100 |
|
185 |
## push @{ $form->{parts} }, |
|
186 |
## { number => "", |
|
187 |
## partnumber => $form->{"totop100_partnumber_$j"}, |
|
188 |
## description => $form->{"totop100_description_$j"}, |
|
189 |
## unit => $form->{"totop100_unit_$j"}, |
|
190 |
## sellprice => $form->{"totop100_sellprice_$j"}, |
|
191 |
## soldtotal => $form->{"totop100_soldtotal_$j"}, |
|
192 |
## }; |
|
193 |
## } #rof |
|
194 |
## } #fi |
|
195 |
# |
|
196 |
# $totop100 = ""; |
|
197 |
# |
|
198 |
# # set data for next page |
|
199 |
# for my $i (1 .. $form->{ndxs_counter}) { |
|
200 |
# $partnumber = $form->{"totop100_partnumber_$i"}; |
|
201 |
# $description = $form->{"totop100_description_$i"}; |
|
202 |
# $unit = $form->{"totop100_unit_$i"}; |
|
203 |
# $sellprice = $form->{"totop100_sellprice_$i"}; |
|
204 |
# $soldtotal = $form->{"totop100_soldtotal_$i"}; |
|
205 |
# |
|
206 |
# push @PARTS, { |
|
207 |
# totop100_partnumber => $form->{"totop100_partnumber_$i"}, |
|
208 |
# totop100_description => $form->{"totop100_description_$i"}, |
|
209 |
# totop100_unit => $form->{"totop100_unit_$i"}, |
|
210 |
# totop100_sellprice => $form->{"totop100_sellprice_$i"}, |
|
211 |
# totop100_soldtotal => $form->{"totop100_soldtotal_$i"}, |
|
212 |
# } |
|
213 |
# |
|
214 |
## $totop100 .= qq| |
|
215 |
##<input type=hidden name=totop100_partnumber_$i value=$form->{"totop100_partnumber_$i"}> |
|
216 |
##<input type=hidden name=totop100_description_$i value=$form->{"totop100_description_$i"}> |
|
217 |
##<input type=hidden name=totop100_unit_$i value=$form->{"totop100_unit_$i"}> |
|
218 |
##<input type=hidden name=totop100_sellprice_$i value=$form->{"totop100_sellprice_$i"}> |
|
219 |
##<input type=hidden name=totop100_soldtotal_$i value=$form->{"totop100_soldtotal_$i"}> |
|
220 |
## |; |
|
221 |
# } #rof |
|
222 |
# |
|
223 |
# print $form->parse_html_template('ic/choice', +{ HIDDENS => \@HIDDENS, PARTS => \@PARTS }); |
|
224 |
# |
|
225 |
# $lxdebug->leave_sub(); |
|
226 |
#} #end choice |
|
213 | 227 |
|
214 |
# $totop100 .= qq| |
|
228 |
#sub list { |
|
229 |
# $lxdebug->enter_sub(); |
|
230 |
# |
|
231 |
# $auth->assert('part_service_assembly_edit'); |
|
232 |
# |
|
233 |
# our ($lastndx); |
|
234 |
# our ($partnumber, $description, $unit, $sellprice, $soldtotal); |
|
235 |
# |
|
236 |
# my @sortorders = ("", "partnumber", "description", "all"); |
|
237 |
# my $sortorder = $sortorders[($form->{description} ? 2 : 0) + ($form->{partnumber} ? 1 : 0)]; |
|
238 |
# IC->get_parts(\%myconfig, \%$form, $sortorder); |
|
239 |
# |
|
240 |
# $form->{title} = $locale->text('Top 100 hinzufuegen'); |
|
241 |
# |
|
242 |
# $form->header; |
|
243 |
# |
|
244 |
# print qq| |
|
245 |
#<body> |
|
246 |
# <form method=post action=ic.pl> |
|
247 |
# <table width=100%> |
|
248 |
# <tr> |
|
249 |
# <th class=listtop colspan=6>| . $locale->text('choice part') . qq|</th> |
|
250 |
# </tr> |
|
251 |
# <tr height="5"></tr> |
|
252 |
# <tr class=listheading> |
|
253 |
# <th> </th> |
|
254 |
# <th class=listheading>| . $locale->text('Part Number') . qq|</th> |
|
255 |
# <th class=listheading>| . $locale->text('Part Description') . qq|</th> |
|
256 |
# <th class=listheading>| . $locale->text('Unit of measure') . qq|</th> |
|
257 |
# <th class=listheading>| . $locale->text('Sell Price') . qq|</th> |
|
258 |
# <th class=listheading>| . $locale->text('soldtotal') . qq|</th> |
|
259 |
# </tr>|; |
|
260 |
# |
|
261 |
# my $j = 0; |
|
262 |
# my $i = $form->{rows}; |
|
263 |
# |
|
264 |
# for ($j = 1; $j <= $i; $j++) { |
|
265 |
# |
|
266 |
# print qq| |
|
267 |
# <tr class=listrow| . ($j % 2) . qq|>|; |
|
268 |
# if ($j == 1) { |
|
269 |
# print qq| |
|
270 |
# <td><input name=ndx class=radio type=radio value=$j checked></td>|; |
|
271 |
# } else { |
|
272 |
# print qq| |
|
273 |
# <td><input name=ndx class=radio type=radio value=$j></td>|; |
|
274 |
# } |
|
275 |
# print qq| |
|
276 |
# <td><input name="new_partnumber_$j" type=hidden value="$form->{"partnumber_$j"}">$form->{"partnumber_$j"}</td> |
|
277 |
# <td><input name="new_description_$j" type=hidden value="$form->{"description_$j"}">$form->{"description_$j"}</td> |
|
278 |
# <td><input name="new_unit_$j" type=hidden value="$form->{"unit_$j"}">$form->{"unit_$j"}</td> |
|
279 |
# <td><input name="new_sellprice_$j" type=hidden value="$form->{"sellprice_$j"}">$form->{"sellprice_$j"}</td> |
|
280 |
# <td><input name="new_soldtotal_$j" type=hidden value="$form->{"soldtotal_$j"}">$form->{"soldtotal_$j"}</td> |
|
281 |
# </tr> |
|
282 |
# |
|
283 |
# <input name="new_id_$j" type=hidden value="$form->{"id_$j"}">|; |
|
284 |
# } |
|
285 |
# |
|
286 |
# print qq| |
|
287 |
# |
|
288 |
#</table> |
|
289 |
# |
|
290 |
#<br> |
|
291 |
# |
|
292 |
# |
|
293 |
#<input type=hidden name=itemstatus value="$form->{itemstatus}"> |
|
294 |
#<input type=hidden name=l_linetotal value="$form->{l_linetotal}"> |
|
295 |
#<input type=hidden name=l_partnumber value="$form->{l_partnumber}"> |
|
296 |
#<input type=hidden name=l_description value="$form->{l_description}"> |
|
297 |
#<input type=hidden name=l_onhand value="$form->{l_onhand}"> |
|
298 |
#<input type=hidden name=l_unit value="$form->{l_unit}"> |
|
299 |
#<input type=hidden name=l_sellprice value="$form->{l_sellprice}"> |
|
300 |
#<input type=hidden name=l_linetotalsellprice value="$form->{l_linetotalsellprice}"> |
|
301 |
#<input type=hidden name=sort value="$form->{sort}"> |
|
302 |
#<input type=hidden name=revers value="$form->{revers}"> |
|
303 |
#<input type=hidden name=lastsort value="$form->{lastsort}"> |
|
304 |
# |
|
305 |
#<input type=hidden name=bom value="$form->{bom}"> |
|
306 |
#<input type=hidden name=titel value="$form->{titel}"> |
|
307 |
#<input type=hidden name=searchitems value="$form->{searchitems}"> |
|
308 |
# |
|
309 |
#<input type=hidden name=row value=$j> |
|
310 |
# |
|
311 |
#<input type=hidden name=nextsub value=item_selected> |
|
312 |
# |
|
313 |
#<input name=lastndx type=hidden value=$lastndx> |
|
314 |
# |
|
315 |
#<input name=ndxs_counter type=hidden value=$form->{ndxs_counter}>|; |
|
316 |
# |
|
317 |
# my $totop100 = ""; |
|
318 |
# |
|
319 |
# if (($form->{ndxs_counter}) > 0) { |
|
320 |
# for ($i = 1; ($i < $form->{ndxs_counter} + 1); $i++) { |
|
321 |
# |
|
322 |
# $partnumber = $form->{"totop100_partnumber_$i"}; |
|
323 |
# $description = $form->{"totop100_description_$i"}; |
|
324 |
# $unit = $form->{"totop100_unit_$i"}; |
|
325 |
# $sellprice = $form->{"totop100_sellprice_$i"}; |
|
326 |
# $soldtotal = $form->{"totop100_soldtotal_$i"}; |
|
327 |
# |
|
328 |
# $totop100 .= qq| |
|
215 | 329 |
#<input type=hidden name=totop100_partnumber_$i value=$form->{"totop100_partnumber_$i"}> |
216 | 330 |
#<input type=hidden name=totop100_description_$i value=$form->{"totop100_description_$i"}> |
217 | 331 |
#<input type=hidden name=totop100_unit_$i value=$form->{"totop100_unit_$i"}> |
218 | 332 |
#<input type=hidden name=totop100_sellprice_$i value=$form->{"totop100_sellprice_$i"}> |
219 | 333 |
#<input type=hidden name=totop100_soldtotal_$i value=$form->{"totop100_soldtotal_$i"}> |
220 |
# |; |
|
221 |
} #rof |
|
222 |
|
|
223 |
print $form->parse_html_template('ic/choice', +{ HIDDENS => \@HIDDENS, PARTS => \@PARTS }); |
|
224 |
|
|
225 |
$lxdebug->leave_sub(); |
|
226 |
} #end choice |
|
227 |
|
|
228 |
sub list { |
|
229 |
$lxdebug->enter_sub(); |
|
230 |
|
|
231 |
$auth->assert('part_service_assembly_edit'); |
|
232 |
|
|
233 |
our ($lastndx); |
|
234 |
our ($partnumber, $description, $unit, $sellprice, $soldtotal); |
|
235 |
|
|
236 |
my @sortorders = ("", "partnumber", "description", "all"); |
|
237 |
my $sortorder = $sortorders[($form->{description} ? 2 : 0) + ($form->{partnumber} ? 1 : 0)]; |
|
238 |
IC->get_parts(\%myconfig, \%$form, $sortorder); |
|
239 |
|
|
240 |
$form->{title} = $locale->text('Top 100 hinzufuegen'); |
|
241 |
|
|
242 |
$form->header; |
|
243 |
|
|
244 |
print qq| |
|
245 |
<body> |
|
246 |
<form method=post action=ic.pl> |
|
247 |
<table width=100%> |
|
248 |
<tr> |
|
249 |
<th class=listtop colspan=6>| . $locale->text('choice part') . qq|</th> |
|
250 |
</tr> |
|
251 |
<tr height="5"></tr> |
|
252 |
<tr class=listheading> |
|
253 |
<th> </th> |
|
254 |
<th class=listheading>| . $locale->text('Part Number') . qq|</th> |
|
255 |
<th class=listheading>| . $locale->text('Part Description') . qq|</th> |
|
256 |
<th class=listheading>| . $locale->text('Unit of measure') . qq|</th> |
|
257 |
<th class=listheading>| . $locale->text('Sell Price') . qq|</th> |
|
258 |
<th class=listheading>| . $locale->text('soldtotal') . qq|</th> |
|
259 |
</tr>|; |
|
260 |
|
|
261 |
my $j = 0; |
|
262 |
my $i = $form->{rows}; |
|
263 |
|
|
264 |
for ($j = 1; $j <= $i; $j++) { |
|
265 |
|
|
266 |
print qq| |
|
267 |
<tr class=listrow| . ($j % 2) . qq|>|; |
|
268 |
if ($j == 1) { |
|
269 |
print qq| |
|
270 |
<td><input name=ndx class=radio type=radio value=$j checked></td>|; |
|
271 |
} else { |
|
272 |
print qq| |
|
273 |
<td><input name=ndx class=radio type=radio value=$j></td>|; |
|
274 |
} |
|
275 |
print qq| |
|
276 |
<td><input name="new_partnumber_$j" type=hidden value="$form->{"partnumber_$j"}">$form->{"partnumber_$j"}</td> |
|
277 |
<td><input name="new_description_$j" type=hidden value="$form->{"description_$j"}">$form->{"description_$j"}</td> |
|
278 |
<td><input name="new_unit_$j" type=hidden value="$form->{"unit_$j"}">$form->{"unit_$j"}</td> |
|
279 |
<td><input name="new_sellprice_$j" type=hidden value="$form->{"sellprice_$j"}">$form->{"sellprice_$j"}</td> |
|
280 |
<td><input name="new_soldtotal_$j" type=hidden value="$form->{"soldtotal_$j"}">$form->{"soldtotal_$j"}</td> |
|
281 |
</tr> |
|
282 |
|
|
283 |
<input name="new_id_$j" type=hidden value="$form->{"id_$j"}">|; |
|
284 |
} |
|
285 |
|
|
286 |
print qq| |
|
287 |
|
|
288 |
</table> |
|
289 |
|
|
290 |
<br> |
|
291 |
|
|
292 |
|
|
293 |
<input type=hidden name=itemstatus value="$form->{itemstatus}"> |
|
294 |
<input type=hidden name=l_linetotal value="$form->{l_linetotal}"> |
|
295 |
<input type=hidden name=l_partnumber value="$form->{l_partnumber}"> |
|
296 |
<input type=hidden name=l_description value="$form->{l_description}"> |
|
297 |
<input type=hidden name=l_onhand value="$form->{l_onhand}"> |
|
298 |
<input type=hidden name=l_unit value="$form->{l_unit}"> |
|
299 |
<input type=hidden name=l_sellprice value="$form->{l_sellprice}"> |
|
300 |
<input type=hidden name=l_linetotalsellprice value="$form->{l_linetotalsellprice}"> |
|
301 |
<input type=hidden name=sort value="$form->{sort}"> |
|
302 |
<input type=hidden name=revers value="$form->{revers}"> |
|
303 |
<input type=hidden name=lastsort value="$form->{lastsort}"> |
|
304 |
|
|
305 |
<input type=hidden name=bom value="$form->{bom}"> |
|
306 |
<input type=hidden name=titel value="$form->{titel}"> |
|
307 |
<input type=hidden name=searchitems value="$form->{searchitems}"> |
|
308 |
|
|
309 |
<input type=hidden name=row value=$j> |
|
310 |
|
|
311 |
<input type=hidden name=nextsub value=item_selected> |
|
312 |
|
|
313 |
<input name=lastndx type=hidden value=$lastndx> |
|
314 |
|
|
315 |
<input name=ndxs_counter type=hidden value=$form->{ndxs_counter}>|; |
|
316 |
|
|
317 |
my $totop100 = ""; |
|
318 |
|
|
319 |
if (($form->{ndxs_counter}) > 0) { |
|
320 |
for ($i = 1; ($i < $form->{ndxs_counter} + 1); $i++) { |
|
321 |
|
|
322 |
$partnumber = $form->{"totop100_partnumber_$i"}; |
|
323 |
$description = $form->{"totop100_description_$i"}; |
|
324 |
$unit = $form->{"totop100_unit_$i"}; |
|
325 |
$sellprice = $form->{"totop100_sellprice_$i"}; |
|
326 |
$soldtotal = $form->{"totop100_soldtotal_$i"}; |
|
327 |
|
|
328 |
$totop100 .= qq| |
|
329 |
<input type=hidden name=totop100_partnumber_$i value=$form->{"totop100_partnumber_$i"}> |
|
330 |
<input type=hidden name=totop100_description_$i value=$form->{"totop100_description_$i"}> |
|
331 |
<input type=hidden name=totop100_unit_$i value=$form->{"totop100_unit_$i"}> |
|
332 |
<input type=hidden name=totop100_sellprice_$i value=$form->{"totop100_sellprice_$i"}> |
|
333 |
<input type=hidden name=totop100_soldtotal_$i value=$form->{"totop100_soldtotal_$i"}> |
|
334 |
|; |
|
335 |
} #rof |
|
336 |
} #fi |
|
337 |
|
|
338 |
print $totop100; |
|
339 |
|
|
340 |
print qq| |
|
341 |
<input class=submit type=submit name=action value="| |
|
342 |
. $locale->text('TOP100') . qq|"> |
|
343 |
|
|
344 |
</form> |
|
345 |
</body> |
|
346 |
</html> |
|
347 |
|; |
|
348 |
$lxdebug->leave_sub(); |
|
349 |
} #end list() |
|
334 |
# |; |
|
335 |
# } #rof |
|
336 |
# } #fi |
|
337 |
# |
|
338 |
# print $totop100; |
|
339 |
# |
|
340 |
# print qq| |
|
341 |
#<input class=submit type=submit name=action value="| |
|
342 |
# . $locale->text('TOP100') . qq|"> |
|
343 |
# |
|
344 |
#</form> |
|
345 |
#</body> |
|
346 |
#</html> |
|
347 |
#|; |
|
348 |
# $lxdebug->leave_sub(); |
|
349 |
#} #end list() |
|
350 | 350 |
|
351 | 351 |
sub top100 { |
352 | 352 |
$lxdebug->enter_sub(); |
... | ... | |
932 | 932 |
print $totop100; |
933 | 933 |
|
934 | 934 |
print qq| |
935 |
<input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">
|
|
935 |
<!-- <input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">-->
|
|
936 | 936 |
|
937 | 937 |
<input class=submit type=submit name=action value="| |
938 | 938 |
. $locale->text('choice') . qq|"> |
Auch abrufbar als: Unified diff
Top100 Editor deaktiviert, da er seit mehreren Versionen nicht mehr funktioniert.
Muss detailliert modernisiert werden.
top100 und addto100 funktionieren eingeschränkt und bleiben daher erhalten.