invoice_ids        => [ ],
     conversion_errors  => [ ],
     print_errors       => [ ],
+    session_id         => $::auth->get_session_id,
 
   )->update_next_run_at;
 
    query        => [
       '!customer_id' => undef,
       or             => [ closed    => undef, closed    => 0 ],
-      or             => [ delivered => undef, delivered => 0 ],
     ],
   );
 }
       template  => $self->find_template(name => 'invoice', printer_id => $params{printer_id}),
       variables => Form->new(''),
       return    => 'file_name',
+      variable_content_types => { longdescription => 'html',
+                                  partnotes       => 'html',
+                                  notes           => 'html',}
     );
 
     $create_params{variables}->{$_} = $params{variables}->{$_} for keys %{ $params{variables} };
     }
 
     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});
 
   my @filters = (
     [ $filter->{customer}{"name:substr::ilike"}, t8('Customer') ],
-    [ $filter->{"transdate:date::ge"},           t8('Delivery Date') . " " . t8('From Date') ],
-    [ $filter->{"transdate:date::le"},           t8('Delivery Date') . " " . t8('To Date')   ],
+    [ $filter->{"transdate:date::ge"},           t8('Transdate') . " " . t8('From Date') ],
+    [ $filter->{"transdate:date::le"},           t8('Transdate') . " " . t8('To Date')   ],
   );
 
   for (@filters) {