# 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 {
template => $ctrl->find_template(name => 'invoice', printer_id => $printer_id),
variables => Form->new(''),
return => 'file_name',
+ variable_content_types => { longdescription => 'html',
+ partnotes => 'html',
+ notes => 'html',}
);
+
+
$create_params{variables}->{$_} = $variables{$_} for keys %variables;
$invoice->flatten_to_form($create_params{variables}, format_amounts => 1);
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;