X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fbp.pl;h=6e7d9277a7d20d7d6b85d466f3c7b5714acd00bf;hb=8cef58b276ce4005c0e2ada350fecd5d7a103e89;hp=653577f6352b0bb9e17b6c57318cd0d3c17c086b;hpb=9659649d435c0436ce14048e56b03879ac641429;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 653577f63..6e7d9277a 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -32,9 +32,12 @@ #====================================================================== use SL::BP; +use Data::Dumper; 1; +require "bin/mozilla/common.pl"; + # end of main sub search { @@ -158,12 +161,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -176,15 +179,16 @@ sub search { # without JavaScript Calendar $button1 = qq| - |; + |; $button2 = qq| - |; + |; } - + $form->{javascript} .= qq||; $form->header; - + $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - +
{script}> @@ -310,6 +314,10 @@ sub yes { sub print { $lxdebug->enter_sub(); + $form->get_lists(printers => 'ALL_PRINTERS'); + # use the command stored in the databse or fall back to $myconfig{printer} + my $selected_printer = (grep { $_->{id} eq $form->{printer} } @{ $form->{ALL_PRINTERS} })[0]->{'printer_command'} || $myconfig{printer}; + if ($form->{callback}) { map { $form->{callback} .= "&checked_$_=1" if $form->{"checked_$_"} } (1 .. $form->{rowcount}); @@ -318,7 +326,7 @@ sub print { for $i (1 .. $form->{rowcount}) { if ($form->{"checked_$i"}) { - $form->{OUT} = "| $myconfig{printer}"; + $form->{OUT} = "| $selected_printer"; $form->info($locale->text('Printing ... ')); if (BP->print_spool(\%myconfig, \%$form, $spool)) { @@ -553,7 +561,7 @@ sub list_spool { {password}> |; - if ($myconfig{printer}) { +# if ($myconfig{printer}) { print qq| {transdateto}> {transdatefrom}> @@ -564,17 +572,18 @@ sub list_spool { {vendor}> - + |; - } - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } +$form->get_lists(printers=>"ALL_PRINTERS"); +print qq||; + +# } print qq|
@@ -583,7 +592,7 @@ sub list_spool { |; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub select_all { @@ -595,5 +604,5 @@ sub select_all { $lxdebug->leave_sub(); } -sub continue { &{ $form->{nextsub} } } +sub continue { call_sub($form->{"nextsub"}); }