From 8298c2ea8ba03bb3d1eb85a3ce0a049a505433ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 5 Feb 2020 15:38:32 +0100 Subject: [PATCH] Massendruck: Option "beidseitig" auch beim Drucken aus Rechnungsberichten --- SL/Controller/MassInvoiceCreatePrint.pm | 4 ++-- js/kivi.MassInvoiceCreatePrint.js | 1 + templates/webpages/ar/ar_transactions_bottom.html | 5 +++++ .../mass_invoice_create_print_from_do/list_invoices.html | 5 +++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/SL/Controller/MassInvoiceCreatePrint.pm b/SL/Controller/MassInvoiceCreatePrint.pm index 78e7859c0..aab63731a 100644 --- a/SL/Controller/MassInvoiceCreatePrint.pm +++ b/SL/Controller/MassInvoiceCreatePrint.pm @@ -113,7 +113,7 @@ sub action_print { return $self->redirect_to(action => 'list_invoices'); } - $self->download_or_print_documents(printer_id => $::form->{printer_id}, invoices => \@invoices); + $self->download_or_print_documents(printer_id => $::form->{printer_id}, invoices => \@invoices, bothsided => $::form->{bothsided}); } sub action_create_print_all_start { @@ -295,7 +295,7 @@ sub download_or_print_documents { }); @pdf_file_names = $self->create_pdfs(%pdf_params); - my $merged_pdf = $self->merge_pdfs(file_names => \@pdf_file_names); + my $merged_pdf = $self->merge_pdfs(file_names => \@pdf_file_names, bothsided => $params{bothsided}); unlink @pdf_file_names; if (!$params{printer_id}) { diff --git a/js/kivi.MassInvoiceCreatePrint.js b/js/kivi.MassInvoiceCreatePrint.js index 93fa16261..20ecde075 100644 --- a/js/kivi.MassInvoiceCreatePrint.js +++ b/js/kivi.MassInvoiceCreatePrint.js @@ -104,6 +104,7 @@ namespace('kivi.MassInvoiceCreatePrint', function(ns) { $('#print_options').dialog('close'); $('#printer_id').val($('#print_options_printer_id').val()); + $('#bothsided').val($('#print_options_bothsided').prop('checked') ? 1 : 0); $('#action').val('MassInvoiceCreatePrint/print'); $('#report_form').submit(); diff --git a/templates/webpages/ar/ar_transactions_bottom.html b/templates/webpages/ar/ar_transactions_bottom.html index bb939a569..e24771b4d 100644 --- a/templates/webpages/ar/ar_transactions_bottom.html +++ b/templates/webpages/ar/ar_transactions_bottom.html @@ -2,6 +2,7 @@ [% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %] [% L.hidden_tag("printer_id") %] + [% L.hidden_tag("bothsided") %]
@@ -10,6 +11,10 @@ [% IF ALL_PRINTERS.size %]