X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/32421f9a8030b57a5713b992e55e9cba609493a9..a99fc9f6b84fbf0effae46eb41fe056c960a1602:/SL/Helper/PrintOptions.pm diff --git a/SL/Helper/PrintOptions.pm b/SL/Helper/PrintOptions.pm index da6cdf313..a4e1f0ef5 100644 --- a/SL/Helper/PrintOptions.pm +++ b/SL/Helper/PrintOptions.pm @@ -4,6 +4,7 @@ use strict; use List::MoreUtils qw(any); +sub opthash { +{ value => shift, selected => shift, oname => shift } } # generate the printing options displayed at the bottom of oe and is forms. # this function will attempt to guess what type of form is displayed, and will generate according options @@ -25,7 +26,6 @@ sub get_print_options { my $prefix = $options->{dialog_name_prefix} || ''; # names 3 parameters and returns a hashref, for use in templates - sub opthash { +{ value => shift, selected => shift, oname => shift } } my (@FORMNAME, @LANGUAGE_ID, @FORMAT, @SENDMODE, @MEDIA, @PRINTER_ID, @SELECTS) = (); # note: "||"-selection is only correct for values where "0" is _not_ a correct entry @@ -67,6 +67,9 @@ sub get_print_options { ($form->{type} =~ /_delivery_order$/) ? ( opthash($form->{type}, $form->{PD}{$form->{type}}, $locale->text('Delivery Order')), opthash('pick_list', $form->{PD}{pick_list}, $locale->text('Pick List')), + ) : undef, + ($form->{type} =~ /^letter$/) ? ( + opthash('letter', $form->{PD}{letter}, $locale->text('Letter')), ) : undef; push @SENDMODE, @@ -122,7 +125,6 @@ sub get_print_options { my %dont_display_groupitems = ( 'dunning' => 1, - 'letter' => 1, ); my %template_vars = (