From ee75e5986c75b6cf9886bf315e83d05ae210add0 Mon Sep 17 00:00:00 2001 From: Martin Helmling Date: Tue, 24 Nov 2015 16:35:50 +0100 Subject: [PATCH] =?utf8?q?MassRecordCreationAndPrinting:=20SessionFiles=20?= =?utf8?q?f=C3=BCr=20TaskServer=20Fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/BackgroundJob/MassRecordCreationAndPrinting.pm | 3 ++- SL/Controller/MassInvoiceCreatePrint.pm | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/BackgroundJob/MassRecordCreationAndPrinting.pm b/SL/BackgroundJob/MassRecordCreationAndPrinting.pm index 7c6f558ab..bd8783849 100644 --- a/SL/BackgroundJob/MassRecordCreationAndPrinting.pm +++ b/SL/BackgroundJob/MassRecordCreationAndPrinting.pm @@ -30,6 +30,7 @@ use constant DONE => 3; # conversion_errors => [ { id => 124, number => 'A981723', message => "Stuff went boom" }, ], # print_errors => [ { id => 234, number => 'L87123123', message => "Printer is out of coffee" }, ], # pdf_file_name => 'qweqwe.pdf', +# session_id => $::auth->get_session_id, # }; sub create_invoices { @@ -153,7 +154,7 @@ sub convert_invoices_to_pdf { if (!$printer_id) { my $file_name = 'mass_invoice' . $job_obj->id . '.pdf'; - my $sfile = SL::SessionFile->new($file_name, mode => 'w'); + my $sfile = SL::SessionFile->new($file_name, mode => 'w', session_id => $data->{session_id}); $sfile->fh->print($self->{merged_pdf}); $sfile->fh->close; diff --git a/SL/Controller/MassInvoiceCreatePrint.pm b/SL/Controller/MassInvoiceCreatePrint.pm index 7fc3388e7..cd96a73e7 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; -- 2.20.1