is_templates: Kundenauswahl ohne dropdown fix.
[kivitendo-erp.git] / bin / mozilla / ir.pl
index f7dcd6a..c599c83 100644 (file)
@@ -153,7 +153,7 @@ sub invoice_links {
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   # forex
@@ -166,6 +166,8 @@ sub invoice_links {
       $form->{"select$key"} .= "<option>$ref->{accno}--$ref->{description}\n";
     }
 
+    next unless $form->{acc_trans}{$key};
+
     if ($key eq "AP_paid") {
       for my $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
         $form->{"AP_paid_$i"} =