Zusätzliche Rechnungsadressen: beim Ausdruck als Variablen verfügbar machen
[kivitendo-erp.git] / bin / mozilla / io.pl
index e889f2a..89e40d0 100644 (file)
@@ -172,12 +172,8 @@ sub display_row {
   );
   # serialnr is important for delivery_orders
   if ($form->{type} eq 'sales_delivery_order') {
-    for my $i (1 .. $form->{rowcount} - 1) {
-      next unless $form->{"has_sernumber_$i"};
-      splice @row2_sort, 0, 1;
-      splice @header_sort, 4, 0, "serialnr";
-      last;
-    }
+    splice @row2_sort, 0, 1;
+    splice @header_sort, 4, 0, "serialnr";
   }
 
   my %column_def = (
@@ -1396,6 +1392,8 @@ sub print_form {
     $form->get_shipto(\%myconfig);
   }
 
+  $form->set_addition_billing_address_print_variables;
+
   $form->{notes} =~ s/^\s+//g;
 
   delete $form->{printer_command};
@@ -1574,6 +1572,10 @@ sub print_form {
     today     => DateTime->today,
   };
 
+  if ($defaults->print_interpolate_variables_in_positions) {
+    $form->substitute_placeholders_in_template_arrays({ field => 'description', type => 'text' }, { field => 'longdescription', type => 'html' });
+  }
+
   $form->parse_template(\%myconfig);
 
   $form->{callback} = "";