X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FHelper%2FPrintOptions.pm;h=cf4616f62554865fe846e3f3be207755d1e11b49;hb=00a6bdd7580be1c0cd0bc72eafc9af911ae63ff9;hp=a4e1f0ef5373292c25d92e93f619dcb7302f0127;hpb=529e6bf96e1ad74ae2e770a9e74f29f26a28d3c8;p=kivitendo-erp.git diff --git a/SL/Helper/PrintOptions.pm b/SL/Helper/PrintOptions.pm index a4e1f0ef5..cf4616f62 100644 --- a/SL/Helper/PrintOptions.pm +++ b/SL/Helper/PrintOptions.pm @@ -18,11 +18,15 @@ sub opthash { +{ value => shift, selected => shift, oname => shift } } sub get_print_options { my ($class, %params) = @_; + no warnings 'once'; + my $form = $params{form} || $::form; my $myconfig = $params{myconfig} || \%::myconfig; my $locale = $params{locale} || $::locale; my $options = $params{options}; + use warnings 'once'; + my $prefix = $options->{dialog_name_prefix} || ''; # names 3 parameters and returns a hashref, for use in templates @@ -60,6 +64,7 @@ sub get_print_options { ($form->{type} eq 'invoice') ? ( opthash("invoice", $form->{PD}{invoice}, $locale->text('Invoice')), opthash("proforma", $form->{PD}{proforma}, $locale->text('Proforma Invoice')), + opthash("invoice_copy", $form->{PD}{invoice_copy}, $locale->text('Invoice Copy')), ) : undef, ($form->{type} eq 'invoice' && $form->{storno}) ? ( opthash("storno_invoice", $form->{PD}{storno_invoice}, $locale->text('Storno Invoice')), @@ -133,7 +138,9 @@ sub get_print_options { display_copies => scalar @{ $form->{printers} || [] } && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email', display_remove_draft => (!$form->{id} && $form->{draft_id}), display_groupitems => !$dont_display_groupitems{$form->{type}}, + display_bothsided => $options->{show_bothsided}, groupitems_checked => $form->{groupitems} ? "checked" : '', + bothsided_checked => $form->{bothsided} ? "checked" : '', remove_draft_checked => $form->{remove_draft} ? "checked" : '' );