32 |
32 |
#======================================================================
|
33 |
33 |
|
34 |
34 |
use SL::BP;
|
|
35 |
use Data::Dumper;
|
35 |
36 |
|
36 |
37 |
1;
|
37 |
38 |
|
... | ... | |
310 |
311 |
sub print {
|
311 |
312 |
$lxdebug->enter_sub();
|
312 |
313 |
|
|
314 |
$form->get_lists(printers => 'ALL_PRINTERS');
|
|
315 |
# use the command stored in the databse or fall back to $myconfig{printer}
|
|
316 |
my $selected_printer = (grep { $_->{id} eq $form->{printer} } @{ $form->{ALL_PRINTERS} })[0]->{'printer_command'} || $myconfig{printer};
|
|
317 |
|
313 |
318 |
if ($form->{callback}) {
|
314 |
319 |
map { $form->{callback} .= "&checked_$_=1" if $form->{"checked_$_"} }
|
315 |
320 |
(1 .. $form->{rowcount});
|
... | ... | |
318 |
323 |
|
319 |
324 |
for $i (1 .. $form->{rowcount}) {
|
320 |
325 |
if ($form->{"checked_$i"}) {
|
321 |
|
$form->{OUT} = "| $myconfig{printer}";
|
|
326 |
$form->{OUT} = "| $selected_printer";
|
322 |
327 |
$form->info($locale->text('Printing ... '));
|
323 |
328 |
|
324 |
329 |
if (BP->print_spool(\%myconfig, \%$form, $spool)) {
|
... | ... | |
553 |
558 |
<input type=hidden name=password value=$form->{password}>
|
554 |
559 |
|;
|
555 |
560 |
|
556 |
|
if ($myconfig{printer}) {
|
|
561 |
# if ($myconfig{printer}) {
|
557 |
562 |
print qq|
|
558 |
563 |
<input type=hidden name=transdateto value=$form->{transdateto}>
|
559 |
564 |
<input type=hidden name=transdatefrom value=$form->{transdatefrom}>
|
... | ... | |
564 |
569 |
<input type=hidden name=vendor value=$form->{vendor}>
|
565 |
570 |
<input class=submit type=submit name=action value="|
|
566 |
571 |
. $locale->text('Select all') . qq|">
|
567 |
|
<input class=submit type=submit name=action value="|
|
568 |
|
. $locale->text('Print') . qq|">
|
569 |
572 |
<input class=submit type=submit name=action value="|
|
570 |
573 |
. $locale->text('Remove') . qq|">
|
|
574 |
<input class=submit type=submit name=action value="|
|
|
575 |
. $locale->text('Print') . qq|">
|
571 |
576 |
|;
|
572 |
|
}
|
|
577 |
|
|
578 |
$form->get_lists(printers=>"ALL_PRINTERS");
|
|
579 |
print qq|<select name="printer">|;
|
|
580 |
print map(qq|<option value="$_->{id}">| . $form->quote_html($_->{printer_description}) . qq|</option>|, @{ $form->{ALL_PRINTERS} });
|
|
581 |
print qq|</select>|;
|
|
582 |
|
|
583 |
# }
|
573 |
584 |
|
574 |
585 |
print qq|
|
575 |
586 |
</form>
|
... | ... | |
578 |
589 |
</html>
|
579 |
590 |
|;
|
580 |
591 |
|
581 |
|
$lxdebug->leave_sub();
|
|
592 |
$main::lxdebug->leave_sub();
|
582 |
593 |
}
|
583 |
594 |
|
584 |
595 |
sub select_all {
|
Erste Version Druckqueue.
Es ist nun wieder moeglich aus der Warteschlange zu drucken, und zwar auf selektierte Drucker.