X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0878ce8165e72571703d06999a9972be4c5adb92..13f40529221ea3f6d8afbd5a047be7df7fa2a93c:/SL/Controller/MassInvoiceCreatePrint.pm diff --git a/SL/Controller/MassInvoiceCreatePrint.pm b/SL/Controller/MassInvoiceCreatePrint.pm index 7fc3388e7..c65d3b5ec 100644 --- a/SL/Controller/MassInvoiceCreatePrint.pm +++ b/SL/Controller/MassInvoiceCreatePrint.pm @@ -137,6 +137,7 @@ sub action_create_print_all_start { invoice_ids => [ ], conversion_errors => [ ], print_errors => [ ], + session_id => $::auth->get_session_id, )->update_next_run_at; @@ -324,12 +325,7 @@ sub download_or_print_documents { } my $printer = SL::DB::Printer->new(id => $params{printer_id})->load; - my $command = SL::Template::create(type => 'ShellCommand', form => Form->new(''))->parse($printer->printer_command); - - open my $out, '|-', $command or die $!; - binmode $out; - print $out $merged_pdf; - close $out; + $printer->print_document(content => $merged_pdf); flash_later('info', t8('The documents have been sent to the printer \'#1\'.', $printer->printer_description)); return $self->redirect_to(action => 'list_invoices', printer_id => $params{printer_id});